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
Using a test, ensure that voting either up or down is not allowed on questions or answers by the original author, you know to avoid gaming the system. Ensure the proper exceptions are being thrown.
@Test(expected= VotingException.class) public void VotingMadeByAuthorThrowsException() throws Exception { bob.upVote(bobPost); bob.downVote(bobPost); alice.upVote(question); alice.downVote(question); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void downVotingQuestionsGetNoPoints() throws Exception {\n\n bob.upVote(question);\n charlie.downVote(question);\n\n assertEquals(5,alice.getReputation());\n }", "private void check4voteAndClean()\n\t{\n\t\tif( noBeepersPresent())\n\t\t{\tturnLeft();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "private void checkAsk(FyQuestion q, FyAnswer a) {\n\t\treturn;\r\n\t}", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "public static void doVote() {\n }", "@Test(expected= AnswerAcceptanceException.class)\n public void originalQuestionerCanAcceptAnswer() throws Exception {\n\n bob.acceptAnswer(bobAnswer);\n }", "@Test\n\tpublic void rejectedOfferCanNotBeAccepted() {\n\t}", "@Test\n public void acceptedAnswerGivesAnswererReputationPoints() throws Exception {\n\n alice.acceptAnswer(bobAnswer);\n\n assertEquals(\"Answer's reputation doesn't goes up by 15\",15,bob.getReputation());\n }", "@Test\n\tpublic void testSaveNewQuestionUnmoderated() {\n\t\tAssert.assertFalse(optionsLogic.getOptionsForLocation(LOCATION1_ID).isModerated());\n\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\n\t\t\n\t\tQnaQuestion question = new QnaQuestion();\n\t\tquestion.setQuestionText(\"blah blah blah\");\n\t\tquestion.setAnonymous(false);\n\t\tquestion.setNotify(false);\n\t\ttry {\n\t\t\tquestionLogic.saveQuestion(question, LOCATION1_ID);\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\n\t\tAssert.assertEquals(question.getOwnerId(), USER_UPDATE);\n\t\tAssert.assertEquals(question.getLocation(), LOCATION1_ID);\n\t\tAssert.assertEquals(question.getViews(), Integer.valueOf(0));\n\t\tAssert.assertTrue(question.isPublished());\n\t\tAssert.assertTrue(questionLogic.existsQuestion(question.getId()));\n\t}", "@Test(expected = AnswerException.class)\n public void questionNotMatchTest()throws Exception{\n Mockito.when(paperAnswerRepository.getMaxTimes(1L,1L)).thenReturn(Optional.of(2));\n Mockito.when(paperService.getPaperInfo(1L,1L)).thenReturn(paper);\n Mockito.when(userService.getUserInfo(1L)).thenReturn(user);\n Mockito.when(courseService.getCourseInfo(1L)).thenReturn(course);\n PaperAnswer paperAnswer1 = new PaperAnswer();\n PaperAnswerPrimaryKey paperAnswerPrimaryKey = new PaperAnswerPrimaryKey(user,paper,2);\n paperAnswer1.setPaperAnswerPrimaryKey(paperAnswerPrimaryKey);\n paperAnswer1.setState(PaperAnswerState.FINISHED);\n Mockito.when(paperAnswerRepository.getOne(new PaperAnswerPrimaryKey(user,paper,2))).thenReturn(paperAnswer1);\n Mockito.when(paperAnswerRepository.save(any(PaperAnswer.class))).thenAnswer(i -> i.getArguments()[0]);\n\n Mockito.when(paperRepository.getOne(1L)).thenReturn(paper);\n\n Question question2 = new Question();\n question2.setId(2L);\n Mockito.when(questionRepository.findById(2L)).thenReturn(Optional.of(question2));\n\n QuestionAnswer questionAnswer = new QuestionAnswer(2L,\"A\");\n SubmitAnswerForm submitAnswerForm = new SubmitAnswerForm(List.of(questionAnswer),\"FINISHED\");\n paperAnswerService.submitAnswer(1L,1L,1L,submitAnswerForm);\n\n }", "public static void doVoteAndComment() {\n }", "@Test\n\tpublic void acceptedOfferCanNotBeRejected() {\n\t}", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@Test\n public void testIllegalRating()\n {\n SalesItem salesIte1 = new SalesItem(\"Java For Complete Idiots, Vol 2\", 19900);\n assertEquals(false, salesIte1.addComment(\"Joshua Black\", \"Not worth the money. The font is too small.\", -5));\n }", "public void checkAnswer() {\n }", "@Test(expected = DontSellYourselfShortException.class)\n public void dontSellYourselfShort() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(seller, startingPrice, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n }", "@Override\r\n\tpublic void SAFE_TO_EAT() {\n\t\tSystem.out.println(\"Yes\");\r\n\t}", "@When(\"User enters rating\")\n\tpublic void user_enters_rating() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Test\n public void questionIfNotAlreadyAccusedTest() throws Exception {\n\n }", "void checkWinner() {\n\t}", "private void performSanityCheckForInput(NumericChoice[] correctNumericChoices)\n throws IllegalArgumentException {\n\n if (correctNumericChoices.length != 1) {\n throw new IllegalArgumentException(\"cannot have more than 1 correct option\");\n }\n }", "int getWrongAnswers();", "public IChoice losesAgainst();", "public void wrongAnswer() {\n if (quizGeneralState.checkAndPerformAction(QuizGeneralState.QuizAction.WRONG)) {\n quizStateChanger.wrongAnswerGiven();\n }\n }", "public void voteIdea(String username, Long ideaId, boolean vote) throws VotingException, DataAccessException {\n try {\n MyUser user = myUserFacade.getUser(username);\n Idea idea = this.find(ideaId);\n Boolean previousVote = user.getVotes().get(idea);\n if (previousVote == null) {\n // If the user never voted for this idea, then create a new Vote:\n user.addVote(idea, vote);\n if (vote) {\n idea.upvote();\n } else {\n idea.downvote();\n }\n } else {\n // The user had previously voted for this idea.\n // Case 1: trying to upvote twice the idea:\n if (previousVote && vote) {\n throw new VotingException((null), \"Cannot upvote twice the same post\");\n } // Case 2: trying to downvote twice the idea:\n else if (!previousVote && !vote) {\n throw new VotingException((null), \"Cannot downvote twice the same post\");\n } // Case 3: one is upvote and the other downvote. Vote is removed\n else {\n user.removeVote(idea);\n if (vote) {\n idea.setUpvotes(idea.getUpvotes() - 1);\n } else {\n idea.setDownvotes(idea.getDownvotes() - 1);\n }\n }\n }\n myUserFacade.edit(user);\n this.edit(idea);\n } catch (PersistenceException | EJBException pe) {\n throw new DataAccessException(pe, \"Error while voting post\");\n }\n }", "@When(\"User clicks disLike\")\n\tpublic void user_clicks_dis_like() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void testBidAcceptionNotification() {\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n //owner.acceptBid(thing1, bid);\n //assertTrue(borrower.notifiedOfAcceptedBid(bid));\n\n assertTrue(false);\n }", "@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}", "public static void hitWrong()\n\t{\n\t\troundEnd();\n\t\tlblUpdate.setText(\"You have answer incorrectly. You lose.\");\n\t}", "public void checkAuctions() {\n\n checkDutchAuctions();\n checkSecondPriceAuctions();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcheckAnswer(false);\n\t\t\t\t\n\t\t\t}", "@Test\n\tpublic void unlikeTest() {\n\t\tnew WebDriverWait(driver, 15).until(\n\t\t\t ExpectedConditions.presenceOfElementLocated(By.cssSelector(\"a[onclick*='tdlikecid418']\"))\n\t\t\t);//since the share throught part is load slower than the other parts, so it need wait until it diplayed then commit the test\n\t\t\n\t\t//look for the like button\n\t\tWebElement likeButton = driver.findElement(By.cssSelector(\"a[onclick*='tdlikecid418']\"));\n\t\t//click the like button\n\t\tlikeButton.click();\n\t\ttry{\n\t\t\t//the like button should be changed to unlike button\n\t\t\tassertTrue(likeButton.getText().equals(\"Unlike\"));\n\t\t} catch (NoSuchElementException nseex) {\n\t\t\tfail();\n\t\t}\n\t}", "@Override\n\tpublic Boolean answerQuestion(Test onlineTest, Questions question, Integer chosenAnswer) throws UserException {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"UnusedParameters\")\n private void openWrongAnswer(@SuppressWarnings(\"UnusedParameters\") View view) {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(MainActivity.this);\n alertDialogBuilder.setTitle(\"INCORRECT ANSWER\");\n alertDialogBuilder.setMessage(\"The correct answer is: \\n\" + currentQ.getANSWER() + \"\\n Ref: \" + currentQ.getREFERENCE());\n // set negative button: No message\n alertDialogBuilder.setNegativeButton(\"Continue\" ,new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n checkFinish();\n // cancel the alert box and put a Toast to the user\n dialog.cancel();\n }\n });\n alertDialogBuilder.setPositiveButton(\"Challenge Answer\" ,new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n submitBug();\n // Add information to Review List for display after completion of test\n\n\n // cancel the alert box and put a Toast to the user\n dialog.cancel();\n }\n });\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n // show alert\n alertDialog.show();\n alertDialog.getWindow().getAttributes();\n TextView msgTxt = (TextView) alertDialog.findViewById(android.R.id.message);\n msgTxt.setTextSize(20);\n msgTxt.setGravity(Gravity.CENTER_HORIZONTAL);\n }", "public void testBidDeclineNotification(){\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n // owner.declineBid(thing1, bid);\n //assertTrue(borrower.notifiedOfDeclinedBid(bid));\n\n assertTrue(false);\n }", "private void answerYesOrNo() {\n List<String> Yes = additionalDB.get(\"Yes\");\n List<String> No = additionalDB.get(\"No\");\n if (random.nextBoolean())\n \tresponsesList.add(new Response(getRandomElementFromList(Yes)));\n else responsesList.add(new Response(getRandomElementFromList(No)));\n }", "@Test\n public void TestIlegalCorrectInputCheck(){\n Assert.assertEquals(player.CorrectInputCheck(\"horisonaz\",5,1,1)\n ,false , \" check horisontal spelling\"\n );\n\n //illegal : check vertical\n Assert.assertEquals(player.CorrectInputCheck(\"verticles\",5,1,1)\n ,false , \" check vertical spelling\"\n );\n\n //illegal : place a 5 ship horisontal at 0,1 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,0,1)\n ,false,\" illegal : place a 5 ship horisontal at 0,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,0 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,0)\n ,false, \" illegal : place a 5 ship horisontal at 1,0 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 7,1 ship is to big it goes outside the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,7,1)\n ,false , \" illegal : place a 5 ship horisontal at 7,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,7)\n ,false , \" illegal : place a 5 ship horisontal at 1,7 outside of the grid \"\n );\n\n\n }", "@Override\n\tpublic void verifyRateQuestionEnabledWithEveryQuestion() {\n\t\t\n\t}", "@Test\n\tpublic void FRAN_5593_Verify_user_able_to_like_the_post() throws Exception {\n\t\tArrayList<ContentData> listReview = everContentAPI.getEverContent();\n\t\tContentData selectedContent = listReview.get(0);\n\t\tString postBody = selectedContent.getPostBody();\n\t\t//unlike content and get data again\n\t\teverContentAPI.unLikeContent(selectedContent.getContentKey());\n\t\tselectedContent = everContentAPI.getContentDetail(selectedContent.getContentKey());\n\t\tint beforeClickLikeCount = selectedContent.getLikeCount();\n\t\t\t\t\n\t\t\t\t\n\t\tloginPage = new LoginWithUsernamePage(driver);\n\t\tloginPage.doLoginProcess(Constant.ACCOUNT_EMAIL_1, Constant.ACCOUNT_PASSWORD_1);\n\t\thomePage = new HomePage(driver);\n\t\tassertTrue(homePage.isActive(), \"User is not in Homepage\", \"You're in Home page\");\n\n\t\tdriver.sleep(5);\n\t\treviewDetailPage = homePage.selectReviewNearYouByIndex(1);\n\t\tassertTrue(reviewDetailPage.isActive(), \"Review detail screen is not displayed\",\n\t\t\t\t\"Review detail screen is displayed\");\n\n\t\tString currentReviewBusinessName = reviewDetailPage.getBusinessName();\n\t\tString currentReviewDescription = reviewDetailPage.getReviewDescription();\n\n\t\tassertEquals(currentReviewBusinessName, selectedContent.getCorporateGroup().getDisplayName(),\n\t\t\t\t\"Business name of current review is displayed incorrectly\",\n\t\t\t\t\"Business name of current review is displayed correctly\");\n\t\tassertEquals(currentReviewDescription, postBody,\n\t\t\t\t\"Review description of current review is displayed incorrectly\",\n\t\t\t\t\"Review description of current review is displayed correctly\");\n\n\t\treviewDetailPage.clickLikeReview();\n\t\t//get content again from API\n\t\tselectedContent = everContentAPI.getContentDetail(selectedContent.getContentKey());\n\t\tassertEquals(selectedContent.getLikeCount(),beforeClickLikeCount + 1,\"API verification: Like count is not increased\",\"API verification: Like count is increased correctly\");\n\t}", "private void questionValidation(Question question) throws SurveyEngineException {\r\n if (\"\".equals(question.getDescription())) {\r\n throw new SurveyEngineException(\"Question description empty or null\");\r\n }\r\n HashMap<Integer, String> answers = question.getAnswers();\r\n if (answers.size() < 2) {\r\n throw new SurveyEngineException(\"Question has less than 2 answers\");\r\n }\r\n for (int i: answers.keySet()) {\r\n if (\"\".equals(answers.get(i))) {\r\n throw new SurveyEngineException(\"Answer for a question is empty or null\");\r\n }\r\n } \r\n }", "public static void changeQuestion(int qid, String username) {\n\t\t\tboolean flag = false;\n\t\t\tString a2 = null;\n \t\tint d = 0;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tif ((qid <= 12) || (qid == 14)) {\n\t\t\t\t\t\ta2 = JOptionPane.showInputDialog(null, qid + \" Update your answer\", \"QUESTIONNAIRE\", JOptionPane.PLAIN_MESSAGE);\n \t\t\t\tflag = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\td = JOptionPane.showConfirmDialog(null, qid + \" Update your answer\", \"QUESTIONNAIRE\", JOptionPane.YES_NO_OPTION,JOptionPane.PLAIN_MESSAGE);\n \t\t\t\ta2 = String.valueOf(d);\n \t\t\tflag = true;\n \t\t\t} \n \t\t\tif (a2.equals(null) || (d == -1)) {\n \t\t\t\tthrow new NullPointerException();\n \t\t\t}\n \t\t} catch (NullPointerException e1) {\n \t\t\tJOptionPane.showMessageDialog(null, \"Please insert your answer\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n \t\t\tflag = false;\n \t\t}\n \t\t}while (flag == false);\n\t\t\tif (checkQuestion(qid, a2) == false) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"We regret to inform you that you are no longer compatible as a blood donor.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\tSystem.exit(0);\n\t\t\t} else {\n\t\t\t\tupdateTableAnswers(qid, username, a2);\n\t\t\t}\n\t\t\t\n\t\t\treturn;\t\n\t\t}", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "@Test\n\tpublic void testPublishQuestion() {\n\t\t\n\t\t// try publish with invalid user (no update rights)\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\tAssert.assertFalse(question.isPublished());\n\t\texternalLogicStub.currentUserId = USER_LOC_3_NO_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.publishQuestion(question.getId(),LOCATION3_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch(SecurityException se){\n\t\t\tAssert.assertNotNull(se);\n\t\t}\n\t\tquestion = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\tAssert.assertFalse(question.isPublished());\n\t\tAssert.assertNotNull(question.getCategory());\n\t\t\n\t\t// try publish with valid user (update rights)\n\t\texternalLogicStub.currentUserId = USER_LOC_3_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.publishQuestion(question.getId(),LOCATION3_ID);\n\t\t\tquestion = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\t\tAssert.assertTrue(question.isPublished());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail(\"Should not have thrown Exception\");\n\t\t}\n\t}", "@Test\r\n\tpublic void testButtonPressedSafety() {\r\n\t\tSelectionButton button = vend.getSelectionButton(0);\r\n\t\tvend.enableSafety();\r\n\t\tbutton.press();\r\n\t\tassertTrue(vend.getDeliveryChute().removeItems().length==0);\r\n\t}", "public static void main(String[] args){\n Scanner keyboard = new Scanner(System.in);\n //declare variables for the answer, user's guess, and number fo guesses\n int answer;\n int guess;\n int numOfGuess = 0;\n \n boolean done = false;\n answer = (int)(100*Math.random())+1;\n \n //print an introduction that tells the user how to play this game\n System.out.println(\"Hello user! I will generate a number between 1-100 inclusive and you will try to guess it! I will tell you if your answer is too low or too high after each incorrect guess!\");\n do \n {\n System.out.print(\"Please enter your guess:\");\n guess = keyboard.nextInt();\n if (guess > answer){\n System.out.println(\"Too high!\");\n }\n else if( guess < answer){\n System.out.println(\"Too low!\");\n }\n else{\n done = true;\n }\n numOfGuess += 1;\n } while (done == false);\n \n System.out.println(\"Congratulations! You're score is \" + numOfGuess);\n if (numOfGuess >= 20){\n System.out.println(\"Rating: You are terrible at this game!\");\n }\n else if (numOfGuess >= 10 && numOfGuess <=19){\n System.out.println(\"Rating: You need more practice!\");\n }\n else if (numOfGuess >= 5 && numOfGuess <= 9){\n System.out.println(\"Rating: Not too bad, But can you get it in fewer than 5 guesses?\");\n }\n else if (numOfGuess >= 2 && numOfGuess <= 4){\n System.out.println(\"Rating: AWESOME. You win a trip to Hawaii!\");\n }\n else{\n System.out.println(\"Rating: That was pure LUCK and you know it!\");\n }\n \n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcheckAnswer(true);\n\t\t\t\t\n\t\t\t}", "@Test\n public void pickUpSomeGoldTest() {\n\tassertNotEquals(0,score);\n }", "private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }", "public void wrongClick(View view) {\n if (roundOne[questionId].getCorrect_answer().equals(\"False\")) {\n Toast.makeText(getApplicationContext(), \"Juiste Antwoord\",\n Toast.LENGTH_SHORT).show();\n score += 5;\n } else {\n Toast.makeText(getApplicationContext(), \"Foute Antwoord\",\n Toast.LENGTH_SHORT).show();\n }\n questionId++;\n setQuestion(questionId);\n }", "@When(\"User clicks Like\")\n\tpublic void user_clicks_like() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public static void checkAndClickBackButtonTriviaMode() {\r\n\t\tcheckNoSuchElementExceptionByID(\"btnback\", \"\\\"Back\\\" button in trivia mode\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"btnback\", \"\\\"Back\\\" button in trivia mode\");\r\n\t}", "@Given(\"User wants to dislike a meme\")\n\tpublic void user_wants_to_dislike_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Test\r\n\t public void feelingLucky() {\r\n\t \t Assert.fail();\r\n\t Assert.fail();\r\n\t }", "@Test\n public void trimsBidAndAsk() {\n }", "public void takeQuiz()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tRandom generator = new Random();\r\n\t\tint question;\r\n\t\tint right = 0;\r\n\t\tString answer;\r\n\t\t\r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tquestion = generator.nextInt(questions.size());\r\n\t\t\t\r\n\t\t\tSystem.out.println( (i+1) + \".\" + questions.get(question).toString());\r\n\t\t\tSystem.out.println(\"Answer: \");\r\n\t\t\tanswer = in.nextLine();\r\n\t\t\t\r\n\t\t\t//checks input\r\n\t\t\twhile( !( answer.equalsIgnoreCase(\"1\") || answer.equalsIgnoreCase(\"2\") || answer.equalsIgnoreCase(\"3\") || answer.equalsIgnoreCase(\"4\") ) )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid entry. Enter again:\");\r\n\t\t\t\tanswer = in.nextLine();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( answer.equalsIgnoreCase(questions.get(question).getCorrectAnswer()))\r\n\t\t\t{\r\n\t\t\t\tright++;\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"You got \" + right + \" questions right.\");\r\n\t}", "protected Response checkResponse(Response plainAnswer) throws WSException{\n if(plainAnswer!=null)\n switch(plainAnswer.getStatus()){\n //good answers\n case 200: {\n return plainAnswer;\n }//OK\n case 202: {\n return plainAnswer;\n }//ACCEPTED \n case 201: {\n return plainAnswer;\n }//CREATED\n //To be evaluate\n case 204: {\n return plainAnswer;\n }//NO_CONTENT\n //bad answers\n case 400: {\n throw new WSException400(\"BAD REQUEST! The action can't be completed\");\n }//BAD_REQUEST \n case 409: {\n throw new WSException409(\"CONFLICT! The action can't be completed\");\n }//CONFLICT \n case 403: {\n throw new WSException403(\"FORBIDDEN!The action can't be completed\");\n }//FORBIDDEN \n case 410: {\n throw new WSException410(\"GONE! The action can't be completed\");\n }//GONE\n case 500: {\n throw new WSException500(\"INTERNAL_SERVER_ERROR! The action can't be completed\");\n }//INTERNAL_SERVER_ERROR \n case 301: {\n throw new WSException301(\"MOVED_PERMANENTLY! The action can't be completed\");\n }//MOVED_PERMANENTLY \n case 406: {\n throw new WSException406(\"NOT_ACCEPTABLE! The action can't be completed\");\n }//NOT_ACCEPTABLE\n case 404: {\n throw new WSException404(\"NOT_FOUND! The action can't be completed\");\n }//NOT_FOUND\n case 304: {\n throw new WSException304(\"NOT_MODIFIED! The action can't be completed\");\n }//NOT_MODIFIED \n case 412: {\n throw new WSException412(\"PRECONDITION_FAILED! The action can't be completed\");\n }//PRECONDITION_FAILED \n case 303: {\n throw new WSException303(\"SEE_OTHER! The action can't be completed\");\n }//SEE_OTHER\n case 503: {\n throw new WSException503(\"SERVICE_UNAVAILABLE! The action can't be completed\");\n }//SERVICE_UNAVAILABLE\n case 307: {\n throw new WSException307(\"TEMPORARY_REDIRECT! The action can't be completed\");\n }//TEMPORARY_REDIRECT \n case 401: {\n throw new WSException401(\"UNAUTHORIZED! The action can't be completed\");\n }//UNAUTHORIZED \n case 415: {\n throw new WSException415(\"UNSUPPORTED_MEDIA_TYPE! The action can't be completed\");\n }//UNSUPPORTED_MEDIA_TYPE \n }\n return plainAnswer;\n }", "private void checkConditionsToInteroperate(AID client) {\r\n\t\tif (!client.equals(TRUSTED_AID_1))\r\n\t\t\tISOException.throwIt(SW_CLIENT_UNAUTHORISED);\r\n\t\tif (image.isActive())\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t}", "@Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnswered() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000.0);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\n }", "private void checkCorrectHelper(String checkCorrect){\n //may need to add curr later\n\n if(correct.equals(checkCorrect)){//right\n addCorrect++;\n if(addCorrect == 8){\n score++;\n scoreView.setText(\"Score: \"+score);\n addPoint();\n addCorrect = 0;\n }\n arrowTracker[currentNote].setImageResource(R.drawable.arrow_purple);\n currentNote++;\n if(currentNote < 8 && !currentNotes[currentNote].equals(\"\")) {\n correct = currentNotes[currentNote];\n arrowTracker[currentNote].setImageResource(R.drawable.arrowgreen);\n\n } else if (currentNote == 8 || currentNotes[currentNote].equals(\"\")) {\n if(setSong().length == notePointer){//no more notes\n finishPlayAlong();\n }else{\n currentNote = 0;//reset currentNote\n setNotes(setSong());\n correct = currentNotes[currentNote];\n arrowTracker[currentNote].setImageResource(R.drawable.arrowgreen);\n }\n }\n } else {//wrong\n if (lives > 0) {\n lives--;\n userList.addUserAttempt();\n decrementLife(lives);\n } else {//lives == 0\n finishPlayAlong();\n }\n }\n }", "private void checkAnswer() {\n this.convertAnswerString();\n\n StringBuilder answer = new StringBuilder(currentAnswer);\n\n if (answer.toString().equals(selectedWord)) {\n gameOver = true;\n Toast toast = Toast.makeText(getApplicationContext(), \"You Win!!!\", Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (currentAnswer.length() == this.selectedLength && !gameOver) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Sorry! Wrong Answer!\", Toast.LENGTH_LONG);\n toast.show();\n }\n }", "@Test\n\tpublic void likeTest() {\n\t\tnew WebDriverWait(driver, 15).until(\n\t\t\t ExpectedConditions.presenceOfElementLocated(By.cssSelector(\"a[onclick*='tdlikecid418']\"))\n\t\t\t);//since the share throught part is load slower than the other parts, so it need wait until it diplayed then commit the test\n\t\t\n\t\t//look for the unlike button\n\t\tWebElement unlikeButton = driver.findElement(By.cssSelector(\"a[onclick*='tdlikecid418']\"));\n\t\t//click the unlike button\n\t\tunlikeButton.click();\n\t\ttry{\n\t\t\t//the unlike button should be changed back to like button\n\t\t\tassertTrue(unlikeButton.getText().equals(\"Like\"));\n\t\t} catch (NoSuchElementException nseex) {\n\t\t\tfail();\n\t\t}\n\t}", "@Then(\"user inputs the answers of the questions as requirment information for GehaltsCheck\")\n public void user_inputs_the_answers_of_the_questions_as_requirment_information_for_GehaltsCheck() {\n throw new io.cucumber.java.PendingException();\n }", "public void compare(Application app, String userDecision){\n int intDecision = -1;\n String decision = userDecision.toLowerCase();\n\n if (decision.contains(\"harvard\")){ // decision making will be replaced by BUTTONS in processing\n intDecision = 1;\n }\n if (decision.contains(\"greendale\")){\n intDecision = 0;\n }\n if (decision.contains(\"mit\")){\n intDecision = 2;\n }\n\n //catches bad user input in which they try to submit multiple colleges to cheat the system... nice try.\n if ((decision.contains(\"harvard\") && decision.contains(\"mit\")) ||\n (decision.contains(\"harvard\") && decision.contains(\"greendale\")) ||\n (decision.contains(\"mit\") && decision.contains(\"greendale\")))\n {\n intDecision = -1;\n }\n\n if (intDecision == -1){ // catches bad user input, technically unnecessary but i like dissing people\n System.out.println(\"How can you call yourself an admissions officer when you can't even choose correctly?\");\n errorMade(); // runs failure\n }else if (intDecision == app.getCollege()){\n System.out.println(printAcceptance(intDecision));\n }\n else{\n errorMade();\n }\n }", "private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }", "@Test\n public void testPactOfNegationRollback() {\n setStrictChooseMode(true);\n\n addCard(Zone.HAND, playerA, \"Silvercoat Lion\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Plains\", 2);\n\n addCard(Zone.BATTLEFIELD, playerB, \"Island\", 5);\n // Counter target spell.\n // At the beginning of your next upkeep, pay {3}{U}{U}. If you don't, you lose the game.\n addCard(Zone.HAND, playerB, \"Pact of Negation\"); // Instant {0}\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Silvercoat Lion\");\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, \"Pact of Negation\", \"Silvercoat Lion\", \"Silvercoat Lion\");\n\n setChoice(playerB, true);\n\n rollbackTurns(2, PhaseStep.PRECOMBAT_MAIN, playerB, 0);\n\n setChoice(playerB, true);\n\n setStopAt(2, PhaseStep.BEGIN_COMBAT);\n execute();\n\n assertGraveyardCount(playerA, \"Silvercoat Lion\", 1);\n assertGraveyardCount(playerB, \"Pact of Negation\", 1);\n\n Assert.assertTrue(\"Player A is still in game\", playerA.isInGame());\n Assert.assertTrue(\"Player B is still in game\", playerB.isInGame());\n\n assertTappedCount(\"Island\", true, 5);\n\n }", "@Test\n\tpublic void acceptingAnOfferRejectsOffersOnSameCar() {\n\t}", "public void beginAskingQuestions() {\n if (players.size() == 0) {\n throw new GameStateInvalidException(\"You can't have a game without players!\");\n }\n setGameState(GameState.AWAITING_ANSWER);\n\n }", "public abstract AnswerStatus checkAnswer(String answer) throws SyntaxException;", "@Test\r\n public void testSubtractionAsReversion() {\r\n Application.loadQuestions();\r\n assertTrue(Application.allQuestions.contains(\"21 - 7 = ?\") || Application.allQuestions.contains(\"21 - 14 = ?\"));\r\n }", "@Test(expected = NotPlayingException.class)\n public void not_allow_picking_cards_if_not_playing(){\n\n Deck deck = new Deck();\n Game game = new Game(deck);\n\n game.join(\"susan\");\n\n game.pickCard(\"susan\");\n }", "@Ignore\n public void testDisapproveReason() throws Exception {\n\n }", "@Override\n public void onIncorrect(String answer) {\n System.out.println(\"incorrect\");\n }", "public void testNegativeBid(){\n try {\n Bid bid = new Bid(new Thing(new User()), new User(), -20);\n fail();\n } catch (BidNegativeException e){\n // ok!\n } catch (Exception e){\n //ok\n }\n\n }", "public void correct() {\n\n\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public void checkIfCorrect(Note answer){\n Note tmpNote = answer;\n Tone tmpTone = tmpNote.getTone();\n boolean isSharp = tmpNote.isSharp();\n String checkCorrect = \"\";\n\n //Normal Keys\n if(tmpTone.equals(Tone.A) && !isSharp)\n checkCorrect = \"A\";\n else if(tmpTone.equals(Tone.B) && !isSharp)\n checkCorrect = \"B\";\n else if(tmpTone.equals(Tone.C) && !isSharp)\n checkCorrect = \"C\";\n else if(tmpTone.equals(Tone.D) && !isSharp)\n checkCorrect = \"D\";\n else if(tmpTone.equals(Tone.E) && !isSharp)\n checkCorrect = \"E\";\n else if(tmpTone.equals(Tone.F) && !isSharp)\n checkCorrect = \"F\";\n else if(tmpTone.equals(Tone.G) && !isSharp)\n checkCorrect = \"G\";\n\n //Sharp Keys\n else if(tmpTone.equals(Tone.A) && isSharp)\n checkCorrect = \"A#\";\n else if(tmpTone.equals(Tone.C) && isSharp)\n checkCorrect = \"C#\";\n else if(tmpTone.equals(Tone.D) && isSharp)\n checkCorrect = \"D#\";\n else if(tmpTone.equals(Tone.F) && isSharp)\n checkCorrect = \"F#\";\n else if(tmpTone.equals(Tone.G) && isSharp)\n checkCorrect = \"G#\";\n\n checkCorrectHelper(checkCorrect);\n\n }", "private void checkAnswer(String input) {\n\t\tif(counter==0)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"moo\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==1)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"neigh\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==2)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"oink\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==3)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"baa\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==4)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"quack\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\t\n\t}", "void askLeaderCardThrowing();", "public void answer(Properties answers) {\n/* 56 */ setAnswer(answers);\n/* 57 */ QuestionParser.parseManageAllianceQuestion(this);\n/* */ }", "public static void checkRadioButtonTriviaMode(String xpath) {\r\n\t\tcheckNoSuchElementExceptionByXPath(xpath, \"\\\"Right answer\\\" radio button\");\r\n\t}", "@Test\n public void testPermitUpgradeUberNew() {\n assertFalse(underTest.permitCmAndStackUpgrade(\"2.2.0\", \"3.2.0\"));\n\n assertFalse(underTest.permitExtensionUpgrade(\"2.2.0\", \"3.2.0\"));\n }", "public void Verify_UnfortunatelyMessage() throws InterruptedException\r\n\t{\r\n\t\tExplicitWait(Checkavailability);\r\n\t\tThread.sleep(3000);\r\n\t\tif(showRoomInfo.getText().contains(\"Unfortunately, there are no available rooms.\")||(showRoomInfo.getText().contains(\"Or try our partner hotels below.\"))||(showRoomInfo.getText().contains(\"Please try adjusting your search criteria.\")))\r\n\t\t{\r\n\t\t\t//System.out.println(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\tlogger.info(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\ttest.log(Status.PASS, \"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlogger.error(\"Room/rate are not closed properly in Admin\");\r\n\t\t\ttest.log(Status.FAIL, \"Room/rate are not closed properly in Admin\");\r\n\t\t}\r\n\t}", "public static void russianRoulette(Scanner input,Questions thisSession){\n boolean isAlive=true;\n Random rand=new Random();\n int randomNumber,score=0;\n byte numberOfWeaponSlots=6,bullet,weaponFire;\n String userAnswer;\n System.out.println(\"Welcome to russian roulette, the game where you need to see how long can you survive.\"+\n \"\\nA random question from the ones you created will be shown on screen.\\nYou need to write your answer.\\n\"+\n \"If your answer is wrong, the gun will fire, and if the bullet comes out, you will lose.\\nLet's Begin!\");\n \n randomNumber=rand.nextInt(thisSession.getLength()); \n do{\n System.out.println(thisSession.getQuestion(randomNumber));\n userAnswer=input.nextLine();\n userAnswer=userAnswer.toLowerCase();\n if (userAnswer.equals(thisSession.getAnswer(randomNumber))){\n randomNumber=rand.nextInt(thisSession.getLength());\n System.out.println(\"That's the answer!\");\n numberOfWeaponSlots=6;\n score++;\n }else{\n System.out.println(\"Wrong answer.\");\n bullet=(byte) rand.nextInt(numberOfWeaponSlots);\n weaponFire=(byte) rand.nextInt(numberOfWeaponSlots);\n if (bullet==weaponFire){\n gunFiresBullet();\n System.out.println(\"Game over\");\n isAlive=false;\n }else{\n gunFiresNoBullet();\n numberOfWeaponSlots--;\n System.out.println(\"Try again\");\n }\n\n }\n\n }while (isAlive);\n System.out.println(\"Final score: \" + score+\"\\nThanks for playing! Returning to main menu...\");\n }", "private void checkUserInput() {\n }", "public void testBidNotification() {\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n //assertTrue(owner.notifiedOfBid(bid));\n\n assertTrue(false);\n }", "@Test\n\tpublic void testSaveNewQuestionModerated() {\n\t\tAssert.assertTrue(optionsLogic.getOptionsForLocation(LOCATION3_ID).isModerated());\n\n\t\tQnaQuestion question = new QnaQuestion();\n\t\tquestion.setQuestionText(\"blah blah blah\");\n\t\tquestion.setAnonymous(false);\n\t\tquestion.setNotify(false);\n\t\t\n\t\t// Test with invalid\n\t\texternalLogicStub.currentUserId = USER_LOC_3_NO_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.saveQuestion(question, LOCATION3_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException se) {\n\t\t\tAssert.assertNotNull(se);\n\t\t}\n\n\t\t\n\t\t// Test with valid\n\t\texternalLogicStub.currentUserId = USER_LOC_3_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.saveQuestion(question, LOCATION3_ID);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\n\t\tAssert.assertEquals(question.getOwnerId(), USER_LOC_3_UPDATE_1);\n\t\tAssert.assertEquals(question.getLocation(), LOCATION3_ID);\n\t\tAssert.assertEquals(question.getViews(), Integer.valueOf(0));\n\t\tAssert.assertFalse(question.isPublished());\n\t\tAssert.assertNull(question.getCategory());\n\n\t\tAssert.assertTrue(questionLogic.existsQuestion(question.getId()));\n\t}", "boolean hasCorrect();", "boolean hasCorrectAnswer();", "@Test\r\n public void testPurChaseBeverageWithNonValidRecipe() {\r\n coffeeMaker.addRecipe(recipe3); // add mocha which use 20 chocolate while we only have 15 chocolate\r\n assertEquals(75, coffeeMaker.makeCoffee(1, 75)); // non valid recipe\r\n }", "public void verifyTextSignUpToLetsKodeIt() {\n verifyTextAssertMethod(signUpToLetsKodeIt, \"Sign Up to Let's Kode It\");\n }", "@SmallTest\n\tpublic void testBadMatchPenalty() {\n\t\tbadMatch();\n\t\tassertEquals((Integer) (START_SCORE - BAD_MATCH_PENALTY), Integer.valueOf(solo.getText(1).getText().toString()));\n\t}", "@Test(priority = 2)\n public void testVerifyQuestionOne() {\n\t\tassertTrue(true);\n }", "public synchronized void verifyMayWeSuggestSection(WebDriver driver)\n\t\t\tthrows Exception, InterruptedException, AssertionError, IOException {\n\t\tStringBuffer errorBuffer = new StringBuffer();\n\n\t\t// Verification : May We Suggest section on PDP\n\t\ttry {\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVSection\",\n\t\t\t\t\t\"People like you also viewed : Section not showing up on PDP\"));\n\t\t\tReporter.log(\n\t\t\t\t\tConstants.DELIMITER + Constants.PASS + \"| People like you also viewed : section showing up on PDP\");\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : May We Suggest Header\n\t\ttry {\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVHeader\",\n\t\t\t\t\t\"People like you also viewed : Header not showing up on PDP\"));\n\t\t\tReporter.log(\n\t\t\t\t\tConstants.DELIMITER + Constants.PASS + \"| People like you also viewed : Header showing up on PDP\");\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\t\t// Verification : People like you also viewed : Product Image\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t}\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : People like you also viewed : Product Price\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t}\n\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : People like you also viewed : Product Name\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t}\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\t\t// Verification : People like you also viewed : Product Image\n\t\t// redirecting to PDP\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tWebElement elProduct = utils.findElementByLocator(driver, \"AT_PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\telProduct.click();\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tWebElement e2Product = utils.findElementByLocator(driver, \"LO_PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\te2Product.click();\n\n\t\t\t} else {\n\t\t\t\tWebElement e3Product = utils.findElementByLocator(driver, \"PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\te3Product.click();\n\t\t\t}\n\n\t\t\tUtils.waitForPageLoaded(driver);\n\n\t\t\taddToBag(driver, 0, 0);\n\t\t\tUtils.waitForPageLoaded(driver);\n\n\t\t} catch (AssertionError e) {\n\t\t\tReporter.log(Constants.DELIMITER + Constants.FAIL\n\t\t\t\t\t+ \"| People like you also viewed : Product Image not redirecting to PDP\");\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t}", "@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Disallowed - Category\", description = \"Validating Disallowed category\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-236:EVQAAND-229\" })\n\tpublic void verifydisallowedCategory() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"Verifying Disallowed Category MOBANDEVER-236:EVQAAND-229\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickNews();\n\t\t\tcommon.scrollUntilTextExists(\"News/Public Radio\");\n\t\t\tgetPageFactory().getEvehome().clickSubCatNews();\n\t\t\tgetPageFactory().getEvehome().clickNewsChannel1();\n\t\t\tgetPageFactory().getEvehome().validateNPLScreen();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}", "@Ignore\n @Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnsweredWithInts() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "public void areYouAAAmemberRadioButtonTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.yesRadioButtonLocator, \"Yes radio button\", 5) &&\r\n\t\t\t\tStep.Wait.forElementVisible(QuoteForm_ComponentObject.noRadioButtonLocator, \"No radio button\", 5)){\r\n\t\t\tStep.Wait.forElementVisible(QuoteForm_ComponentObject.yesButtonInvalidLocator, \"Yes button invalid (your quote button has already been pressed before)\", 5);\r\n\t\t\tStep.Wait.forElementVisible(QuoteForm_ComponentObject.noButtonInvalidLocator, \"No button invalid (your quote button has already been pressed before)\", 5);\r\n\t\t\t\r\n\t\t\tStep.Action.click(QuoteForm_ComponentObject.yesRadioButtonLocator, \"AAA member (yes radio button)\");\r\n\t\t\tStep.Wait.forElementVisible(QuoteForm_ComponentObject.yesButtonValidLocator, \"Yes button is now valid\", 5);\r\n\t\t\tStep.Wait.forElementVisible(QuoteForm_ComponentObject.noButtonValidLocator, \"No button is now valid\", 5);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tRandom rand = new Random();\n\t\tScanner scan = new Scanner(System.in);\n\t\tint randNum;\n\t\tString userGuess;\n\t\tString outcome;\n\t\tString goAgain;\n\t\tboolean goAgainValid=false;\n\t\tboolean quit=false;\n\t\t\n\t\ttry {\n\t\t\t// declaring the questions and answers\n\t\t\tString[] jokeQuestions = { \"Largest planet ? \", \"Worse song ever ? \", \"Capital of Peru?\", \"Roman god of War ?\" };\n\t\t\tString[] jokeAnswers = { \"Jupiter\", \"Baby\", \"Lima\", \"Mars\" };\n\t\n\t\t\tSystem.out.println(\"General knowledge quiz...\");\n\t\t\n\t\t\tdo {\n\t\t\t\t// generate random number (between 0-3)\n\t\t\t\trandNum = rand.nextInt(4);\n\t\t\t\t\n\t\t\t\t// user given random question\n\t\t\t\tSystem.out.println(\"\\nQ: \"+jokeQuestions[randNum]);\n\t\t\t\t// user responds\n\t\t\t\tSystem.out.printf(\"A: \");\n\t\t\t\tuserGuess = scan.next();\n\t\t\t\t// user answer checked against correct answer\n\t\t\t\tif (userGuess.equalsIgnoreCase(jokeAnswers[randNum])) {\n\t\t\t\t\t// correct\n\t\t\t\t\toutcome = \"Well done, your answer was correct!\";\n\t\t\t\t} else {\n\t\t\t\t\t// wrong\n\t\t\t\t\toutcome = \"Sorry, your answer was incorrect\";\n\t\t\t\t}\n\t\t\t\t// user is notified of outcome\n\t\t\t\tSystem.out.println(\"\\n\"+outcome);\n\t\t\t\t// user is prompted to continue or quit (loop until they give a valid response\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"Would you like another question? (Y or N)\");\n\t\t\t\t\tgoAgain = scan.next();\n\t\t\t\t\tif (goAgain.equalsIgnoreCase(\"y\")) {\n\t\t\t\t\t\t// repeat\n\t\t\t\t\t\tgoAgainValid=true;\n\t\t\t\t\t} else if (goAgain.equalsIgnoreCase(\"n\")) {\n\t\t\t\t\t\t// quit\n\t\t\t\t\t\tgoAgainValid=true;\n\t\t\t\t\t\tquit=true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// choose again\n\t\t\t\t\t\tSystem.out.println(\"That was an invlaid response, please respond with Y or N\");\n\t\t\t\t\t}\n\t\t\t\t} while (!goAgainValid);\n\t\t\t} while (!quit);\n\t\t} catch (Exception exception) {\n\t\t\tSystem.out.println(\"The quiz master has had a problem...\");\n\t\t} finally {\n\t\t\tSystem.out.println(\"Thanks for playing!\");\n\t\t\tscan.close();\n\t\t}\n\t}", "@Test\n public void updateDecline() throws Exception {\n }" ]
[ "0.7085448", "0.6341703", "0.6309605", "0.6253146", "0.61927396", "0.6133216", "0.603896", "0.6031962", "0.59917873", "0.5975886", "0.5962263", "0.5958004", "0.59493876", "0.5889557", "0.577614", "0.5752902", "0.574784", "0.5687315", "0.5685376", "0.5667159", "0.5660526", "0.5632569", "0.55970913", "0.55678815", "0.5556294", "0.55522543", "0.55387855", "0.5522658", "0.5516185", "0.55142087", "0.55137473", "0.5506869", "0.5505347", "0.55037767", "0.5481621", "0.5474933", "0.5464443", "0.54623014", "0.5452139", "0.54484475", "0.5442412", "0.54419804", "0.5440593", "0.5437077", "0.54332536", "0.54308856", "0.54154164", "0.5415125", "0.54150426", "0.5411543", "0.5411181", "0.54067487", "0.5404048", "0.53994924", "0.53742665", "0.5368528", "0.53662497", "0.53656644", "0.5358101", "0.5346266", "0.53402334", "0.5331919", "0.5325759", "0.53243786", "0.531049", "0.5310055", "0.53015846", "0.5300509", "0.52882546", "0.52751476", "0.52723634", "0.5269948", "0.5268232", "0.52553326", "0.52524984", "0.52505565", "0.52491546", "0.52474976", "0.52397245", "0.52382743", "0.5236638", "0.52338386", "0.52288187", "0.52228695", "0.5222534", "0.5205499", "0.5203386", "0.5202487", "0.51964146", "0.5191389", "0.51896954", "0.5184532", "0.518331", "0.51821077", "0.518155", "0.5178981", "0.5173593", "0.5170897", "0.5168957", "0.5168301" ]
0.74969
0
Write a test to make sure that only the original questioner can accept an answer. Ensure the intended messaging is being sent to back to the caller.
@Test(expected= AnswerAcceptanceException.class) public void originalQuestionerCanAcceptAnswer() throws Exception { bob.acceptAnswer(bobAnswer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void acceptedAnswerGivesAnswererReputationPoints() throws Exception {\n\n alice.acceptAnswer(bobAnswer);\n\n assertEquals(\"Answer's reputation doesn't goes up by 15\",15,bob.getReputation());\n }", "@Test\n\tpublic void acceptedOfferCanNotBeRejected() {\n\t}", "@Test\n\tpublic void rejectedOfferCanNotBeAccepted() {\n\t}", "private void checkAsk(FyQuestion q, FyAnswer a) {\n\t\treturn;\r\n\t}", "public void reply(){\n ArrayList<String> potentialReceivers= messageController.replyOptionsForSpeaker(speaker);\n ArrayList<String> options = listBuilderWithIntegers(potentialReceivers.size());\n speakerMessageScreen.replyOptions(messageController.replyOptionsForSpeakerInString(speaker));\n if(messageController.replyOptionsForSpeakerInString(speaker).size() != 0) {\n String answerInString = scanner.nextLine();\n while(!options.contains(answerInString)){\n speakerMessageScreen.invalidInput(answerInString);\n answerInString = scanner.nextLine();\n }\n\n // now answer is valid\n\n int answerInInteger = Integer.parseInt(answerInString);\n String receiver = potentialReceivers.get(answerInInteger - 1);\n\n speakerMessageScreen.whatMessage();\n String messageContext = scanner.nextLine();\n messageController.sendMessage(speaker, receiver, messageContext);\n speakerMessageScreen.congratulations();\n }\n\n }", "@Test\r\n\tpublic void testConfirmFriendRequest() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tp1.receiveFriendRequest(\"JavaLord\", \"JavaLordDisplayName\");\r\n\t\tassertTrue(p1.hasFriendRequest(\"JavaLord\"));\r\n\t\tp1.confirmFriendRequest(\"JavaLord\");\r\n\t\tassertFalse(p1.hasFriendRequest(\"JavaLord\"));\r\n\t}", "@Test(expected = AnswerException.class)\n public void questionNotMatchTest()throws Exception{\n Mockito.when(paperAnswerRepository.getMaxTimes(1L,1L)).thenReturn(Optional.of(2));\n Mockito.when(paperService.getPaperInfo(1L,1L)).thenReturn(paper);\n Mockito.when(userService.getUserInfo(1L)).thenReturn(user);\n Mockito.when(courseService.getCourseInfo(1L)).thenReturn(course);\n PaperAnswer paperAnswer1 = new PaperAnswer();\n PaperAnswerPrimaryKey paperAnswerPrimaryKey = new PaperAnswerPrimaryKey(user,paper,2);\n paperAnswer1.setPaperAnswerPrimaryKey(paperAnswerPrimaryKey);\n paperAnswer1.setState(PaperAnswerState.FINISHED);\n Mockito.when(paperAnswerRepository.getOne(new PaperAnswerPrimaryKey(user,paper,2))).thenReturn(paperAnswer1);\n Mockito.when(paperAnswerRepository.save(any(PaperAnswer.class))).thenAnswer(i -> i.getArguments()[0]);\n\n Mockito.when(paperRepository.getOne(1L)).thenReturn(paper);\n\n Question question2 = new Question();\n question2.setId(2L);\n Mockito.when(questionRepository.findById(2L)).thenReturn(Optional.of(question2));\n\n QuestionAnswer questionAnswer = new QuestionAnswer(2L,\"A\");\n SubmitAnswerForm submitAnswerForm = new SubmitAnswerForm(List.of(questionAnswer),\"FINISHED\");\n paperAnswerService.submitAnswer(1L,1L,1L,submitAnswerForm);\n\n }", "@Override\n\tpublic Boolean answerQuestion(Test onlineTest, Questions question, Integer chosenAnswer) throws UserException {\n\t\treturn null;\n\t}", "private void verifyQuestion(Answer answer) {\n // If is running, stop the question timer\n //(Hard mode)\n timerQuestion.stop();\n \n //if (challengeModel.getChallenge().getCurrentCorrectAnswer()) {\n if (challengeModel.getChallenge().getQuestionsList().get(challengeModel.getChallenge().getCurrentQuestionNumber()-1).getAnswer() == answer) {\n imgCenter.setIcon(Resources.getImageCorrect());\n labelAnswerResult.setText(\"Correto \");\n labelClarification.setText(\"\");\n }\n else {\n imgCenter.setIcon(Resources.getImageIncorrect());\n // Show clarification\n labelAnswerResult.setText(\"\");\n labelClarification.setText(\"<HTML><B>Esclarecimento: </B>\"+challengeModel.getChallenge().getCurrentRuleClarification()+\"</HTML>\");\n }\n \n showAnswerResult(answer);\n }", "public boolean callIntoQuestion();", "@SuppressLint(\"NewApi\")\n\t@Override\n\tpublic void questionReceivedFromDoctor(QuestionData question) {\n\t\tlogger.info(\"questionReceivedFromDoctor(): prompting participant for question: '\" + question.getQuestion()\n\t\t\t\t+ \"'\");\n\n\t\t// TODO Expand this to include responses other than yes / no.\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(WorkoutActivity.this);\n\t\tfinal Boolean[] answer = new Boolean[1];\n\t\tanswer[0] = null;\n\t\tbuilder.setTitle(\"question\").setMessage(question.getQuestion())\n\t\t\t\t.setPositiveButton(QuestionData.RESPONSE_YES, new DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tanswer[0] = Boolean.TRUE;\n\t\t\t\t\t}\n\n\t\t\t\t}).setNegativeButton(QuestionData.RESPONSE_NO, new DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tanswer[0] = Boolean.FALSE;\n\t\t\t\t\t}\n\n\t\t\t\t}).setOnDismissListener(new DialogInterface.OnDismissListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\n\t\t\t\t\t\tAnswerData answerData = new AnswerData();\n\t\t\t\t\t\tif (answer[0] == Boolean.TRUE) {\n\t\t\t\t\t\t\tanswerData.setAnswer(QuestionData.RESPONSE_YES);\n\t\t\t\t\t\t} else if (answer[0] == Boolean.FALSE) {\n\t\t\t\t\t\t\tanswerData.setAnswer(QuestionData.RESPONSE_NO);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tanswerData.setAnswer(QuestionData.DID_NOT_RESPOND);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tworkoutService.getService().replyToQuestion(answerData);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "boolean hasCorrectAnswer();", "public boolean replyResult(int answer){\n \t_numberOfChoice = answer;\r\n return false;\r\n }", "@Test\n void testCheckPossibleAnswersPathOne() throws IOException {\n var testUserID = 1;\n var replies = new String[]{\"test_dialog\", \"0\", \"0\"};\n var expectedPossibleAnswers = new String[]{\n \"YES\",\n \"NO\",\n \"OKAY\",\n \"test_dialog_2\",\n \"test_dialog\",\n };\n\n var testIO = new TestOnlyPossibleAnswersIO(replies);\n var backend = new Backend();\n\n for (var i = 0; i < 3; ++i) {\n backend.updateUser(testUserID, testIO);\n }\n\n Assertions.assertArrayEquals(expectedPossibleAnswers, testIO.getMessages().toArray());\n }", "@Test\r\n\tpublic void testDenyFriendRequest() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tp1.receiveFriendRequest(\"JavaLord\", \"JavaLordDisplayName\");\r\n\t\tassertTrue(p1.hasFriendRequest(\"JavaLord\"));\r\n\t\tassertTrue(p1.denyFriendRequest(\"JavaLord\"));\r\n\t\tassertFalse(p1.denyFriendRequest(\"JavaLord\"));\r\n\t}", "@Test(priority = 2)\n public void testVerifyQuestionOne() {\n\t\tassertTrue(true);\n }", "public void question() {\n\t\tlead.answer(this);\n\t}", "@Test\n\tpublic void testSaveNewQuestionUnmoderated() {\n\t\tAssert.assertFalse(optionsLogic.getOptionsForLocation(LOCATION1_ID).isModerated());\n\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\n\t\t\n\t\tQnaQuestion question = new QnaQuestion();\n\t\tquestion.setQuestionText(\"blah blah blah\");\n\t\tquestion.setAnonymous(false);\n\t\tquestion.setNotify(false);\n\t\ttry {\n\t\t\tquestionLogic.saveQuestion(question, LOCATION1_ID);\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\n\t\tAssert.assertEquals(question.getOwnerId(), USER_UPDATE);\n\t\tAssert.assertEquals(question.getLocation(), LOCATION1_ID);\n\t\tAssert.assertEquals(question.getViews(), Integer.valueOf(0));\n\t\tAssert.assertTrue(question.isPublished());\n\t\tAssert.assertTrue(questionLogic.existsQuestion(question.getId()));\n\t}", "@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}", "static void confirm_A(Messenger messenger, Response_e response)\n {\n sendToClient(messenger, Request_e.Request_A_en.valueOf(), response, null);\n }", "@Override\n public void submitAnswer(PlayerAnswer playerAnswer) {\n\n\n }", "@Test\n\tpublic void testSayMessageOnRequest(){\n\t\tSystem.out.println(\"\\nMensajes aleatorios al aparecer el Meesek:\\n\");\n\t\tMrMe.sayMessageOnRequest();\n\t\tMrMe.sayMessageOnRequest();\n\t\tMrMe.sayMessageOnRequest();\n\t}", "@Test\n\tpublic void acceptingAnOfferRejectsOffersOnSameCar() {\n\t}", "@Test\n void testCheckPossibleAnswersPathTwo() throws IOException {\n var testUserID = 1;\n var replies = new String[]{\"test_dialog\", \"1\", \"0\"};\n var expectedPossibleAnswers = new String[]{\n \"YES\",\n \"NO\",\n \"GOODBYE\",\n \"test_dialog_2\",\n \"test_dialog\",\n };\n\n var testIO = new TestOnlyPossibleAnswersIO(replies);\n var backend = new Backend();\n\n for (var i = 0; i < 3; ++i) {\n backend.updateUser(testUserID, testIO);\n }\n\n Assertions.assertArrayEquals(expectedPossibleAnswers, testIO.getMessages().toArray());\n }", "@Test\n public void bogusReplySilentlyIgnored() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().headers(false, 41, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().ping(false, 2, 0);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(2, ping.payload1);\n }", "@Test\n public void testSendMessage()\n {\n System.out.println(\"sendMessage\");\n Account sender = new Account(\"Henk\");\n String message = \"Test\";\n Party instance = new Party(sender);\n boolean expResult = true;\n boolean result = instance.sendMessage(sender, message);\n assertEquals(\"The message gave a 'not send' answer.\", expResult, result);\n ArrayList<Message> chat = instance.getChat();\n boolean result2 = false;\n for (Message chatMessage : chat)\n {\n if (chatMessage.getText().equals(message))\n {\n result2 = true;\n break;\n }\n }\n assertEquals(\"The message isn't in the chat.\", expResult, result2);\n }", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "@Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnswered() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000.0);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "@Test\r\n public void JokeQuestionWrong()\r\n {\r\n var answerInput = 3;\r\n var punchlineInput = \"one to hold the joke and two to turn the question\";\r\n var questionInput = \"How many Junit tests does it take to test a joke question?\";\r\n\r\n var responseAnswer = 4;\r\n var expectedText = \"How many Junit tests does it take to test a joke question?\\n\" +\r\n \"No!\\n\" +\r\n \"\\r\\n\" +\r\n \"3, one to hold the joke and two to turn the question\\n\" +\r\n \"\\r\\n\";\r\n\r\n var testOutputByteArray = new ByteArrayOutputStream();\r\n var testOutputStream = new PrintStream(testOutputByteArray );\r\n\r\n // Check joke question logic\r\n var mathQuestionAdd = new JokeQuestion(answerInput, questionInput, testOutputStream, punchlineInput);\r\n mathQuestionAdd.showQuestion();\r\n assertFalse(mathQuestionAdd.checkAnswer(responseAnswer));\r\n\r\n // Check joke question console outputs\r\n var content = testOutputByteArray.toString();\r\n assertEquals(content,expectedText);\r\n }", "@java.lang.Override\n public boolean hasCorrectAnswer() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "Boolean getIsAnswered();", "@Test\n\tpublic void testSaveNewQuestionModerated() {\n\t\tAssert.assertTrue(optionsLogic.getOptionsForLocation(LOCATION3_ID).isModerated());\n\n\t\tQnaQuestion question = new QnaQuestion();\n\t\tquestion.setQuestionText(\"blah blah blah\");\n\t\tquestion.setAnonymous(false);\n\t\tquestion.setNotify(false);\n\t\t\n\t\t// Test with invalid\n\t\texternalLogicStub.currentUserId = USER_LOC_3_NO_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.saveQuestion(question, LOCATION3_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException se) {\n\t\t\tAssert.assertNotNull(se);\n\t\t}\n\n\t\t\n\t\t// Test with valid\n\t\texternalLogicStub.currentUserId = USER_LOC_3_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.saveQuestion(question, LOCATION3_ID);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\n\t\tAssert.assertEquals(question.getOwnerId(), USER_LOC_3_UPDATE_1);\n\t\tAssert.assertEquals(question.getLocation(), LOCATION3_ID);\n\t\tAssert.assertEquals(question.getViews(), Integer.valueOf(0));\n\t\tAssert.assertFalse(question.isPublished());\n\t\tAssert.assertNull(question.getCategory());\n\n\t\tAssert.assertTrue(questionLogic.existsQuestion(question.getId()));\n\t}", "@SuppressWarnings(\"PMD.EmptyMethodInAbstractClassShouldBeAbstract\")\n protected void prepareForSetAnswer() {\n // Default implementation does nothing.\n }", "@Override\n public void resetQuestion() {\n super.resetQuestion();\n hadSecondChance = false;\n currentTeam = null;\n originalTeam = null;\n teamHasAnswered.clear();\n //reset teamHasAnswered map so all teams get a chance to anaswer again\n for (int i = 0; i < numTeams; i++) teamHasAnswered.put(i, false);\n }", "public boolean askQuestion(Question curentQuestion, int level) {\n this.level = level;\n System.out.println(\"Die \"+(1+level)*100+\" Euro Frage!\");\n System.out.println(curentQuestion.getQuestion());\n //Sets the position of the right answer so it will be random\n int positionCorrectAnswer = (int) (Math.random() * ((curentQuestion.getWrongAnswers().size()) + 1));\n curentQuestion.getWrongAnswers().add(positionCorrectAnswer, curentQuestion.getCorrectAnswer());\n for (int j = 0; j < curentQuestion.getWrongAnswers().size(); j++) {\n System.out.println(\"\\t\" + (1 + j) + \". \" + curentQuestion.getWrongAnswers().get(j));\n }\n int amountOfAnswers = curentQuestion.getWrongAnswers().size();\n if (joker) {\n System.out.println(\"\\t5. 50:50 Joker\");\n amountOfAnswers = 5;\n\n }\n return getUserInput(amountOfAnswers, positionCorrectAnswer, curentQuestion);\n\n }", "protected boolean guessAnswer(String answer) {\n if (answer.equals(correctAnswer)) {\n currentScore++;\n nextQuestion();\n return true;\n } else {\n nextQuestion();\n return false;\n }\n }", "protected abstract void askResponse();", "@Test\r\n public void MathQuestionWrong()\r\n {\r\n var answerInput = 8;\r\n var questionInput = \"4 + 4\";\r\n\r\n var responseAnswer = 9;\r\n var expectedText = \"What is 4 + 4?\\n9 is wrong. 4 + 4 equals 8\\n\\r\\n\";\r\n\r\n var testOutputByteArray = new ByteArrayOutputStream();\r\n var testOutputStream = new PrintStream(testOutputByteArray );\r\n\r\n // Check math question logic\r\n var mathQuestionAdd = new MathQuestion(answerInput, questionInput, testOutputStream);\r\n mathQuestionAdd.showQuestion();\r\n assertFalse(mathQuestionAdd.checkAnswer(responseAnswer));\r\n\r\n // Check math question console outputs\r\n var content = testOutputByteArray.toString();\r\n assertEquals(content,expectedText);\r\n }", "boolean hasReply();", "private void answerResultAlert(String feedback){\n AlertDialog.Builder showResult = new AlertDialog.Builder(this);\n\n showResult.setTitle(feedback);\n showResult.setMessage(currentQuestion.getExplanation());\n showResult.setCancelable(false); //if this is not set, the user may click outside the alert, cancelling it. no cheating this way\n showResult.setNeutralButton(\"ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //only when the ok is clicked will continue to run the program\n setUpQuestions();\n }\n });\n showResult.create();\n showResult.show();\n }", "public void testReceiveFeedback() {\n\n\t}", "@Order(1)\n\t\t@Test\n\t\tpublic void sendMessageInvalidFromAndTo() throws IOException, ParseException {\n\t\t\t boolean response = Requests.createMessageBoolReturn(JSONUtils.createMessageObject(INVALID_USER_ID, INVALID_USER_ID, \"Test message\"));\n\t\t\t assertFalse(response);\n\t\t\t \n\t\t\t \n\t\t}", "java.lang.String getCorrectAnswer();", "public void answer(Properties answers) {\n/* 56 */ setAnswer(answers);\n/* 57 */ QuestionParser.parseManageAllianceQuestion(this);\n/* */ }", "@Test(priority = 3)\n public void testVerifyQuestionTwo() {\n\t\tassertTrue(true);\n }", "@Ignore\n\t@Test\n\tpublic void testAgentAccepts() {\n\t\tparty.connect(connection);\n\t\tparty.notifyChange(settings);\n\n\t\tBid bid = makeBid(\"1\", \"1\");// best pssible\n\t\tparty.notifyChange(new ActionDone(new Offer(otherparty, bid)));\n\t\tparty.notifyChange(new YourTurn());\n\t\tassertEquals(1, connection.getActions().size());\n\t\tassertTrue(connection.getActions().get(0) instanceof Accept);\n\n\t}", "@Test\n public void scenario5_sendMessageToContact_encrypted() {\n // go to channel\n Espresso.onView(withId(R.id.sn_channel_list_recycler_view))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // go to addMessage\n Espresso.onView(withId(R.id.snChannelViewMenuAddMessage))\n .perform(click());\n\n // add message with recipient\n Espresso.onView(withId(R.id.snMessage))\n .perform(typeText(TEST_MESSAGE));\n Espresso.onView(withId(R.id.selectRecipients))\n .perform(click());\n Espresso.onView(withId(R.id.person_list_recycler_view))\n .perform(RecyclerViewActions.actionOnItem(hasDescendant(withText(TEST_RECIPIENT)), click())\n .atPosition(0));\n Espresso.onView(withId(R.id.personListSelectionDoneButton))\n .perform(click());\n // encrypt message\n Espresso.onView(withId(R.id.snEncrypted))\n .perform(click());\n Espresso.onView(withId(R.id.addButton))\n .perform(click());\n\n // go to sent message\n Espresso.onView(withId(R.id.sn_channel_view_recycler_view))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n validateSentMessage(TEST_RECIPIENT, true, false);\n }", "@Override\n\tpublic void verifyRateQuestionEnabledWithEveryQuestion() {\n\t\t\n\t}", "public boolean hasCorrectAnswer() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "@Test\n @DisplayName(\"Test far Id proof response\")\n public void proofResponseFarId() {\n Record record = new Record(\"client3\", 0, 10, 10);\n InvalidRecordException e = Assertions.assertThrows(InvalidRecordException.class, () -> {\n user1.getListeningService().proveRecord(record);\n });\n Assertions.assertEquals(InvalidRecordException.TOO_FAR, e.getMessage());\n }", "public void beginAskingQuestions() {\n if (players.size() == 0) {\n throw new GameStateInvalidException(\"You can't have a game without players!\");\n }\n setGameState(GameState.AWAITING_ANSWER);\n\n }", "@Test\n\tpublic void testPublishQuestion() {\n\t\t\n\t\t// try publish with invalid user (no update rights)\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\tAssert.assertFalse(question.isPublished());\n\t\texternalLogicStub.currentUserId = USER_LOC_3_NO_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.publishQuestion(question.getId(),LOCATION3_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch(SecurityException se){\n\t\t\tAssert.assertNotNull(se);\n\t\t}\n\t\tquestion = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\tAssert.assertFalse(question.isPublished());\n\t\tAssert.assertNotNull(question.getCategory());\n\t\t\n\t\t// try publish with valid user (update rights)\n\t\texternalLogicStub.currentUserId = USER_LOC_3_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.publishQuestion(question.getId(),LOCATION3_ID);\n\t\t\tquestion = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\t\tAssert.assertTrue(question.isPublished());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail(\"Should not have thrown Exception\");\n\t\t}\n\t}", "@Test\r\n public void MathQuestionCorrect()\r\n {\r\n var answerInput = 8;\r\n var questionInput = \"4 + 4\";\r\n\r\n var responseAnswer = 8;\r\n var expectedText = \"What is 4 + 4?\\n8 is correct!\\n\\r\\n\";\r\n\r\n var testOutputByteArray = new ByteArrayOutputStream();\r\n var testOutputStream = new PrintStream(testOutputByteArray );\r\n\r\n // Check math question logic\r\n var mathQuestionAdd = new MathQuestion(answerInput, questionInput, testOutputStream);\r\n mathQuestionAdd.showQuestion();\r\n assertTrue(mathQuestionAdd.checkAnswer(responseAnswer));\r\n\r\n // Check math question console outputs\r\n var content = testOutputByteArray.toString();\r\n assertEquals(content,expectedText);\r\n }", "@Override\n\tpublic void testAnswerSubnegotiation() {\n\t\tint subn[] = { TelnetCommand.IAC, TelnetCommand.SB, 4, 1, TelnetCommand.IAC, TelnetCommand.SE, };\n\n\t\tint resp1[] = opthand1.answerSubnegotiation(subn, subn.length);\n\n\t\tassertEquals(resp1, null);\n\t}", "@Test\n\tpublic void testSaveQuestion() {\n\t\tAssert.assertEquals(\"qna.sms.question-posted.no-replies\", questionSmsCommand.execute(\n\t\t\t\tnew ParsedMessage(USER_UPDATE, CMD, SITE, \"new question\", 1), ShortMessageCommand.MESSAGE_TYPE_SMS,\"1234\" ));\n\t\tString id = bundleLogicStub.getLastParameters()[1].toString();\n\t\tQnaQuestion question = questionLogic.getQuestionById(Long.valueOf(id));\n\t\tAssert.assertEquals(\"new question\", question.getQuestionText());\n\t\tAssert.assertEquals(USER_UPDATE, question.getOwnerId());\n\t\tAssert.assertEquals(\"1234\", question.getOwnerMobileNr());\n\t\tAssert.assertEquals(1, questionLogic.getAllQuestions(LOCATION1_ID).size()); \n\t}", "private String promptForAnswer(AnswerChecker answerChecker) {\n String answer;\n while (true) {\n regularPresenter.newAnswerPrompter();\n answer = scanner.nextLine();\n if (answerChecker.isValidAnswerForm(answer)) break;\n else regularPresenter.illegalAnswerReporter();\n }\n return answer;\n }", "protected boolean processSayTell(String username, String titles, int gameNumber, String message){return false;}", "@Test\n public void testCheckAnswer_whenCorrectAnswerProvided() throws Exception {\n\n LinkedMultiValueMap<String, String> requestParams = new LinkedMultiValueMap<>();\n requestParams.add(\"category\", \"10\");\n requestParams.add(\"difficulty\", \"easy\");\n\n String questionRepo = mvc.perform(get(\"/questions\").params(requestParams)).andExpect(status().isOk())\n .andReturn().getResponse().getContentAsString();\n\n JSONArray questionRepoJson = new JSONArray(questionRepo);\n\n int currQues = 1;\n JSONObject userAnswerJson = new JSONObject();\n userAnswerJson.put(\"userAnswer\", questionRepoJson.getJSONObject(1).getString(\"correct_answer\"));\n String requestBody = userAnswerJson.toString();\n\n mvc.perform(post(String.format(\"/checkanswer/%d\", currQues)).contentType(MediaType.APPLICATION_JSON)\n .content(requestBody)).andExpect(status().isOk()).andExpect(jsonPath(\"$\", hasSize(2)))\n .andExpect(jsonPath(\"$.[0]\").value(true)).andExpect(jsonPath(\"$.[1]\")\n .value(questionRepoJson.getJSONObject(1).getString(\"correct_answer\")));\n\n }", "@Override\n\tpublic boolean match(Answer answer) {\n\t\treturn this.answer.match(answer); /** call relation -> DecideAnswer.java */\n\t}", "@Test\n\tpublic void testNoMdcThrowupForPlainMessage() throws Exception {\n\t\tdoAnswer(x -> {\n\t\t\tassertThat(MDC.get(\"state\")).isEqualTo(\"sent\");\n\t\t\tassertThat(MDC.get(\"success\")).isNull();\n\t\t\tassertThat(MDC.get(\"duration\")).isNull();\n\t\t\tassertThat(MDC.get(\"osuApiRateBlockedTime\")).isNull();\n\t\t\treturn null;\n\t\t}).when(botInfo).setLastSentMessage(123L);\n\t\tPrivateMessage event = new PrivateMessage(1, \"nick\", 2, \"yo\");\n\t\tevent.getMeta().setRateLimiterBlockedTime(32);\n\t\twhen(clock.currentTimeMillis()).thenReturn(123L);\n\t\tresponsePostprocessor.onResponse(new Message(\"yeah\"), event);\n\t\tverify(botInfo).setLastSentMessage(123L);\n\t}", "private boolean getUserInput(int amountOfAnswers, int positionCorrectAnswer, Question curentQuestion) {\n int userAnswer = Tastatur.intInput();\n //Checks if the user input is valid\n while (userAnswer < 1 || userAnswer > amountOfAnswers) {\n System.out.println(\"Invalide Antwort\");\n userAnswer = Tastatur.intInput();\n }\n //checks if the users input is correct\n if (userAnswer == positionCorrectAnswer + 1) {\n System.out.println(\"Korrekt!\\n\");\n return true;\n // If the user uses the joker\n } else if (joker && userAnswer == 5) {\n //gets one wrong answer\n String wrongAnswer = curentQuestion.joker(positionCorrectAnswer);\n List<String> wrongAnswers = new ArrayList<>();\n wrongAnswers.add(wrongAnswer);\n //Creates a new Question Object\n Question question = new Question(curentQuestion.getQuestion(), 0, curentQuestion.getCorrectAnswer(), wrongAnswers);\n joker = false;\n //Ask the question again with only two answer possibilities\n return askQuestion(question, level);\n\n } else {\n System.out.println(\"Falsch\\n\");\n return false;\n }\n }", "public abstract String chooseAnswer();", "@Test\n public void testClient(){\n received=false;\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.clientHandle(null,new TestUtilizer());\n assertTrue(received);\n }", "protected Answer(){\r\n\t\t\r\n\t}", "void acceptQueAnswersClicked();", "com.google.protobuf.ByteString\n getCorrectAnswerBytes();", "public void verifyAnswer() {\n\t\tint i=0;\n\t\tSystem.out.println(\"in verify answer function\");\n\t\tSystem.out.println(\"Number of Answers: \"+ansCount);\n\t\tSystem.out.println(\"User ans: \"+userEquation);\n\t\tif (ansCount==0)\n\t\t\tlb2.setText(\"There is no solution for this set\");\n\t\telse{\n\t\t\tint c=0;\n\t\t\t\n\t\t\twhile(c<ansCount) {\n\t\t\t\tif (solutions[i].equals(userEquation)) {\n\t\t\t\t\tSystem.out.println(\"Ans was Correct\");\n\t\t\t\t\tfinal long duration = System.nanoTime() - startTime;\n\t\t\t\t\tseconds = TimeUnit.NANOSECONDS.toSeconds(duration);\n\t\t\t\t\tlb2.setText(\"Congradulations! You took \"+seconds+\" seconds to find an answer.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tc++;\n\t\t\t\tSystem.out.println(\"C: \"+c);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Ans was not Correct\");\n\t}\n\t}", "protected abstract String answer();", "@Test\r\n\tpublic void testOutgoingFriendRequest() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tp1.nonDatabase = true;\r\n\t\tassertTrue(p1.newOutgoingFriendRequest(\"test\"));\r\n\t\tassertFalse(p1.newOutgoingFriendRequest(\"test\")); // Fail if duplicate\r\n\t}", "@Test\n void questionAnswered() {\n }", "@Test\n\tpublic void testRespondible2(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.minusDays(2));\n\t\tassertFalse(ej1.sePuedeResponder());\n\t}", "protected Response checkResponse(Response plainAnswer) throws WSException{\n if(plainAnswer!=null)\n switch(plainAnswer.getStatus()){\n //good answers\n case 200: {\n return plainAnswer;\n }//OK\n case 202: {\n return plainAnswer;\n }//ACCEPTED \n case 201: {\n return plainAnswer;\n }//CREATED\n //To be evaluate\n case 204: {\n return plainAnswer;\n }//NO_CONTENT\n //bad answers\n case 400: {\n throw new WSException400(\"BAD REQUEST! The action can't be completed\");\n }//BAD_REQUEST \n case 409: {\n throw new WSException409(\"CONFLICT! The action can't be completed\");\n }//CONFLICT \n case 403: {\n throw new WSException403(\"FORBIDDEN!The action can't be completed\");\n }//FORBIDDEN \n case 410: {\n throw new WSException410(\"GONE! The action can't be completed\");\n }//GONE\n case 500: {\n throw new WSException500(\"INTERNAL_SERVER_ERROR! The action can't be completed\");\n }//INTERNAL_SERVER_ERROR \n case 301: {\n throw new WSException301(\"MOVED_PERMANENTLY! The action can't be completed\");\n }//MOVED_PERMANENTLY \n case 406: {\n throw new WSException406(\"NOT_ACCEPTABLE! The action can't be completed\");\n }//NOT_ACCEPTABLE\n case 404: {\n throw new WSException404(\"NOT_FOUND! The action can't be completed\");\n }//NOT_FOUND\n case 304: {\n throw new WSException304(\"NOT_MODIFIED! The action can't be completed\");\n }//NOT_MODIFIED \n case 412: {\n throw new WSException412(\"PRECONDITION_FAILED! The action can't be completed\");\n }//PRECONDITION_FAILED \n case 303: {\n throw new WSException303(\"SEE_OTHER! The action can't be completed\");\n }//SEE_OTHER\n case 503: {\n throw new WSException503(\"SERVICE_UNAVAILABLE! The action can't be completed\");\n }//SERVICE_UNAVAILABLE\n case 307: {\n throw new WSException307(\"TEMPORARY_REDIRECT! The action can't be completed\");\n }//TEMPORARY_REDIRECT \n case 401: {\n throw new WSException401(\"UNAUTHORIZED! The action can't be completed\");\n }//UNAUTHORIZED \n case 415: {\n throw new WSException415(\"UNSUPPORTED_MEDIA_TYPE! The action can't be completed\");\n }//UNSUPPORTED_MEDIA_TYPE \n }\n return plainAnswer;\n }", "@Test(priority = 4)\n public void testVerifyQuestionThree() {\n\t\tassertTrue(true);\n }", "@Test\n\tpublic void testRemoveQuestion() {\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.removeQuestion(tdp.question1_location1.getId(), LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} catch (AttachmentException e) {\n\t\t\tAssert.fail(\"Should throw SecurityException\");\n\t\t}\n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.removeQuestion(tdp.question1_location1.getId(), LOCATION1_ID);\n\t\t\tAssert.assertFalse(questionLogic.existsQuestion(tdp.question1_location1.getId()));\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t} catch (AttachmentException e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t\t\n\t\tAssert.assertNull(questionLogic.getQuestionById(tdp.question1_location1.getId()));\n\t}", "public boolean checkAnswer(Answer userResponse) {\n\t\t// Check if userResponse is in choices \n\t\tString urStr = userResponse.toString(); \n\t\tif(correctAnswer.toString().equals(urStr)) {\n\t\t\treturn true; \n\t\t}\n\t\treturn false; \n\t}", "@Test\r\n public void JokeQuestionCorrect()\r\n {\r\n var answerInput = 3;\r\n var punchlineInput = \"one to hold the joke and two to turn the question\";\r\n var questionInput = \"How many Junit tests does it take to test a joke question?\";\r\n\r\n var responseAnswer = 3;\r\n var expectedText = \"How many Junit tests does it take to test a joke question?\\n\" +\r\n \"That is right, one to hold the joke and two to turn the question\\n\" +\r\n \"\\r\\n\";\r\n\r\n var testOutputByteArray = new ByteArrayOutputStream();\r\n var testOutputStream = new PrintStream(testOutputByteArray );\r\n\r\n // Check joke question logic\r\n var mathQuestionAdd = new JokeQuestion(answerInput, questionInput, testOutputStream, punchlineInput);\r\n mathQuestionAdd.showQuestion();\r\n assertTrue(mathQuestionAdd.checkAnswer(responseAnswer));\r\n\r\n // Check joke question console outputs\r\n var content = testOutputByteArray.toString();\r\n assertEquals(content,expectedText);\r\n }", "@Test\n public void UserCanWriteAndSendAMessage() {\n proLogin(proWait);\n handler.getDriver(\"user\").navigate().refresh();\n // User to queue\n waitAndFillInformation(userWait);\n // User from queue\n\n waitAndPickFromQueue(proWait);\n\n // User can write message\n waitChatWindowsAppear(userWait).sendKeys(\"yy kaa koo\");\n\n // Can send it By Pressing Submit\n waitElementPresent(userWait, By.name(\"send\")).submit();\n assertEquals(\"\", waitChatWindowsAppear(userWait).getText());\n assertTrue(waitForTextToAppear(userWait, \"yy kaa koo\"));\n\n // Can send it By Pressing Enter\n waitChatWindowsAppear(userWait).sendKeys(\"kaa koo yy\");\n waitChatWindowsAppear(userWait).sendKeys(Keys.ENTER);\n\n assertEquals(\"\", waitChatWindowsAppear(userWait).getText());\n assertTrue(waitForTextToAppear(userWait, \"kaa koo yy\"));\n endConversationPro(proWait);\n }", "public void userShouldGetMessage() {\n assertTextMessage(getTextFromElement(_emailResult), expected, \"Your message has been sent\");\n\n }", "@Test\n\tpublic void testResponse() {\n\t\tquestions.setResponse(\"No\");\n\t\tassertEquals(\"No\",questions.getResponse());\n\t}", "int getWrongAnswers();", "public static boolean makeSure(String message){\n char answer;\n boolean validChar = false;\n do {\n answer = Console.readCharacter(message + \" (S/N) \");\n if (Console.validateQuestion(answer))\n validChar = true;\n else\n System.out.println(\"Opción no válida... \");\n } while(!validChar);\n if (Character.toLowerCase(answer) == 's')\n return true;\n else\n return false;\n }", "public void wrongAnswer() {\n if (quizGeneralState.checkAndPerformAction(QuizGeneralState.QuizAction.WRONG)) {\n quizStateChanger.wrongAnswerGiven();\n }\n }", "@Test\n\tpublic void testFastRejectRequestMessageInvalid2() throws Exception {\n\n\t\t// Given\n\t\tfinal PieceDatabase pieceDatabase = MockPieceDatabase.create (\"0\", 16384);\n\t\tpieceDatabase.start (true);\n\t\tfinal BlockDescriptor requestDescriptor = new BlockDescriptor (0, 0, 16384);\n\t\tPeerServices peerServices = mock (PeerServices.class);\n\t\tPeerSetContext peerSetContext = new PeerSetContext (peerServices, pieceDatabase, mock (RequestManager.class), null);\n\t\twhen(peerSetContext.requestManager.piecesAvailable (any (ManageablePeer.class))).thenReturn (true);\n\t\twhen(peerSetContext.requestManager.allocateRequests (any (ManageablePeer.class), anyInt(), eq (false)))\n\t\t\t\t.thenReturn (Arrays.asList (new BlockDescriptor[] { requestDescriptor }))\n\t\t\t\t.thenReturn (new ArrayList<BlockDescriptor>());\n\t\tMockConnection mockConnection = new MockConnection();\n\t\tPeerHandler handler = new PeerHandler (peerSetContext, mockConnection, new PeerID(), new PeerStatistics(), true, false);\n\n\t\t// When\n\t\t// They allow us to make a request\n\t\tmockConnection.mockInput (PeerProtocolBuilder.haveAllMessage());\n\t\tmockConnection.mockInput (PeerProtocolBuilder.unchokeMessage());\n\t\thandler.connectionReady (mockConnection, true, true);\n\n\t\t// Then\n\t\tmockConnection.mockExpectOutput (PeerProtocolBuilder.haveNoneMessage());\n\t\tmockConnection.mockExpectOutput (PeerProtocolBuilder.interestedMessage());\n\t\tmockConnection.mockExpectOutput (PeerProtocolBuilder.requestMessage (requestDescriptor));\n\t\tmockConnection.mockExpectNoMoreOutput();\n\t\tassertTrue (mockConnection.isOpen());\n\n\t\t// When\n\t\t// We choke and reject the request\n\t\tmockConnection.mockInput (PeerProtocolBuilder.chokeMessage());\n\t\tmockConnection.mockInput (PeerProtocolBuilder.rejectRequestMessage (requestDescriptor));\n\t\thandler.connectionReady (mockConnection, true, true);\n\n\t\t// Then\n\t\tmockConnection.mockExpectNoMoreOutput();\n\t\tassertTrue (mockConnection.isOpen());\n\n\t\t// When\n\t\t// We re-reject the request\n\t\tmockConnection.mockInput (PeerProtocolBuilder.rejectRequestMessage (requestDescriptor));\n\t\thandler.connectionReady (mockConnection, true, true);\n\n\t\t// Then\n\t\tmockConnection.mockExpectNoMoreOutput();\n\t\tverify(peerServices).peerDisconnected (handler);\n\t\tassertFalse (mockConnection.isOpen());\n\n\n\t\tpieceDatabase.terminate (true);\n\n\t}", "private void detectCorrectAnswer() {\n switch (chapterSection) {\n case 5:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\")) {\n ansCorrect = true;\n }\n break;\n case 6:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\")) {\n ansCorrect = true;\n }\n break;\n case 7:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\")) {\n ansCorrect = true;\n }\n break;\n case 8:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\")) {\n ansCorrect = true;\n }\n break;\n }\n }", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }", "@Test\n\tpublic void testModifyQuestion() {\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\n\t\tquestion.setQuestionText(\"Testing update\");\n\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} \n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tQnaQuestion changedQuestion = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\t\t\tAssert.assertEquals(changedQuestion.getQuestionText(), \"Testing update\");\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t}", "public IChoice losesAgainst();", "@Ignore\n @Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnsweredWithInts() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "@SuppressWarnings(\"UnusedParameters\")\n private void openWrongAnswer(@SuppressWarnings(\"UnusedParameters\") View view) {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(MainActivity.this);\n alertDialogBuilder.setTitle(\"INCORRECT ANSWER\");\n alertDialogBuilder.setMessage(\"The correct answer is: \\n\" + currentQ.getANSWER() + \"\\n Ref: \" + currentQ.getREFERENCE());\n // set negative button: No message\n alertDialogBuilder.setNegativeButton(\"Continue\" ,new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n checkFinish();\n // cancel the alert box and put a Toast to the user\n dialog.cancel();\n }\n });\n alertDialogBuilder.setPositiveButton(\"Challenge Answer\" ,new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n submitBug();\n // Add information to Review List for display after completion of test\n\n\n // cancel the alert box and put a Toast to the user\n dialog.cancel();\n }\n });\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n // show alert\n alertDialog.show();\n alertDialog.getWindow().getAttributes();\n TextView msgTxt = (TextView) alertDialog.findViewById(android.R.id.message);\n msgTxt.setTextSize(20);\n msgTxt.setGravity(Gravity.CENTER_HORIZONTAL);\n }", "public abstract boolean verifyInput();", "public abstract void sendConfirmationMessage(Player player);", "pb4server.GiveRansomAskReq getGiveRansomAskReq();", "public void checkAnswer() {\n }", "@Test\n\tpublic void testBidirectionalCommunicationWithResponses() {\n\n\t\t// due to TIME_WAIT after closing a connection we cannot reuse a fixed\n\t\t// port since this would cause multiple test runs in a row to fail.\n\t\t// therefore, get two free ports we can use.\n\t\tint port0, port1;\n\t\ttry {\n\t\t\tport0 = PortFinder.findOpen();\n\t\t\tport1 = PortFinder.findOpen();\n\t\t} catch (IOException e2) {\n\t\t\tfail(\"could not allocate local ports\");\n\t\t\treturn;\n\t\t}\n\n\t\tfinal Socket sock1 = new Socket();\n\n\t\tThread adminThread = null;\n\n\t\t// sock0 is \"server\", waiting for sock1 to connect\n\t\ttry {\n\t\t\tfinal ServerSocket tempServer = new ServerSocket();\n\t\t\ttempServer.bind(new InetSocketAddress(\"localhost\", port0));\n\n\t\t\tadminThread = new Thread(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tSocket sock0 = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsock0 = tempServer.accept();\n\t\t\t\t\t\ttempServer.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tfail(\"connection failed (3)\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttempServer.close();\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tFullDuplexMPI party0 = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparty0 = new FullDuplexMPI(sock0, System.out, true) {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic IMessage processIncomingMessage(IMessage message) {\n\t\t\t\t\t\t\t\tassertTrue(message instanceof ConfirmationMessage);\n\t\t\t\t\t\t\t\tassertTrue(((ConfirmationMessage) message).STATUS_CODE == party1Counter);\n\t\t\t\t\t\t\t\treturn new ConfirmationMessage(--party1Counter, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tsendRecursiveAsyncMessages(party0, true);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tfail(\"connection failed (0)\");\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// moderate timeout to make sure we eventually get a\n\t\t\t\t\t\t// failure\n\t\t\t\t\t\tlatch.await(20, TimeUnit.SECONDS);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tfail(\"unexpected interruption\");\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (party0 != null) {\n\t\t\t\t\t\t\tparty0.close();\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} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tfail(\"connection failed (2)\");\n\t\t}\n\n\t\tadminThread.start();\n\n\t\tFullDuplexMPI party1 = null;\n\n\t\t// sock1 is \"client\"\n\t\ttry {\n\t\t\tsock1.bind(new InetSocketAddress(\"localhost\", port1));\n\t\t\tsock1.connect(new InetSocketAddress(\"localhost\", port0));\n\t\t\tparty1 = new FullDuplexMPI(sock1, System.out, true) {\n\n\t\t\t\t@Override\n\t\t\t\tpublic IMessage processIncomingMessage(IMessage message) {\n\t\t\t\t\tassertTrue(message instanceof ConfirmationMessage);\n\t\t\t\t\tassertTrue(((ConfirmationMessage) message).STATUS_CODE == party0Counter);\n\t\t\t\t\treturn new ConfirmationMessage(++party0Counter, null);\n\t\t\t\t}\n\t\t\t};\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"connection failed (1)\");\n\t\t}\n\n\t\tassert party1 != null;\n\t\tsendRecursiveAsyncMessages(party1, false);\n\n\t\ttry {\n\t\t\t// moderate timeout to make sure we eventually get a failure\n\t\t\tlatch.await(20, TimeUnit.SECONDS);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"unexpected interruption (1)\");\n\t\t}\n\n\t\t// check if all messages were acknowledged\n\t\tassertEquals(99, party0Counter);\n\t\tassertEquals(1, party1Counter);\n\n\t\ttry {\n\t\t\tsock1.close();\n\t\t} catch (IOException e) {\n\t\t\t// ignore\n\t\t}\n\t\ttry {\n\t\t\tadminThread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"unexpected interruption (2)\");\n\t\t}\n\t}", "@Override\r\n\tpublic void testPrivateBelongsToOtherUser() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateBelongsToOtherUser();\r\n\t\t}\r\n\t}", "public boolean presenceCheck()\r\n\t{\r\n\t\treturn validateAnswer();\r\n\t}", "private boolean verifyInput() {\r\n double comp = 0;\r\n try {\r\n comp = Double.parseDouble(compensation.getText());\r\n } catch (NumberFormatException e) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Compensation must be a number.\");\r\n return false;\r\n }\r\n\r\n if(comp < 0 || comp > MAX_COMPENSATION) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Compensation must be between 0 and \" + MAX_COMPENSATION + \".\");\r\n return false;\r\n }\r\n\r\n if(reply.getText().isEmpty()) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Reply body empty.\");\r\n return false;\r\n }\r\n\r\n if(complaintListView.getSelectionModel().isEmpty()) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"No complaint selected.\");\r\n return false;\r\n }\r\n\r\n if(complaintListView.getSelectionModel().getSelectedItem().getStatus() != Complaint.Status.FILED) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Cannot reply to an already closed complaint.\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "@Test\n public void basicPromptConfirmHandlingAcceptTest(){\n\n WebElement promptButton = driver.findElement(By.id(\"promptexample\"));\n WebElement promptResult = driver.findElement(By.id(\"promptreturn\"));\n\n assertEquals(\"pret\", promptResult.getText());\n promptButton.click();\n String alertMessage = \"I prompt you\";\n Alert promptAlert = driver.switchTo().alert();\n\n // IE prompt now shows the correct message so no need for any caveat\n assertEquals(alertMessage,promptAlert.getText());\n promptAlert.accept();\n assertEquals(\"change me\", promptResult.getText());\n }", "protected boolean processPersonalTell(String username, String titles, String message){return false;}" ]
[ "0.6742436", "0.66197836", "0.65240717", "0.65063405", "0.64075947", "0.6370028", "0.63206357", "0.6085129", "0.60715085", "0.6060608", "0.603971", "0.6005965", "0.5989582", "0.59463656", "0.5940901", "0.59320784", "0.5928962", "0.592731", "0.5857489", "0.5824558", "0.5798125", "0.57899684", "0.57794046", "0.5776357", "0.5755592", "0.5734493", "0.5730924", "0.5716954", "0.5709401", "0.570132", "0.56984824", "0.5683159", "0.56809825", "0.568015", "0.56777155", "0.56770504", "0.5676216", "0.5675608", "0.5660932", "0.56594014", "0.5657505", "0.565304", "0.5639374", "0.5627512", "0.5613288", "0.5604395", "0.5587847", "0.55865383", "0.5580447", "0.55789626", "0.5569195", "0.5564223", "0.5560684", "0.55483025", "0.5539002", "0.55321527", "0.55320275", "0.55142164", "0.55026597", "0.5500468", "0.54952544", "0.54894316", "0.5486518", "0.5484539", "0.5464963", "0.5457824", "0.5444987", "0.5444694", "0.5439849", "0.54325694", "0.5431064", "0.5425598", "0.5425295", "0.54227495", "0.5387898", "0.53850037", "0.5381435", "0.5374017", "0.5365311", "0.5364351", "0.5341887", "0.53377473", "0.5333059", "0.53293264", "0.5329291", "0.5319907", "0.53192544", "0.53190994", "0.53146297", "0.53133935", "0.5312631", "0.5312538", "0.52944535", "0.52931327", "0.52872306", "0.52859676", "0.527753", "0.52769595", "0.5274242", "0.52710974" ]
0.73854554
0
Reviewing the User.getReputation method may expose some code that is not requested to be tested in the Meets Project instructions. Write the missing test(EXTRA CREDIT).
@Test public void downVotingQuestionsGetNoPoints() throws Exception { bob.upVote(question); charlie.downVote(question); assertEquals(5,alice.getReputation()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getReputation() {\n return reputation;\n }", "@Test\n public void acceptedAnswerGivesAnswererReputationPoints() throws Exception {\n\n alice.acceptAnswer(bobAnswer);\n\n assertEquals(\"Answer's reputation doesn't goes up by 15\",15,bob.getReputation());\n }", "public void setReputation(double reputation) {\n if(reputation >= 0.0 && reputation <= 100.0){\n this.reputation = reputation;\n }\n else if(reputation > 100.0){\n this.reputation = 100.0;\n }\n else{\n this.reputation = 0.0;\n }\n}", "public int getReputation() {\n\t\treturn Integer.parseInt(Reputation);\n\t}", "public void addReputation(User user, Date time, int reputation) {\n \t\treputations[0].add(user);\n \t\treputations[1].add(time);\n \t\treputations[2].add(reputation);\n \t}", "public double getCredits(User user) throws Exception;", "public abstract boolean checkPolicy(User user);", "@Test\n public void getDefensiveModifierTest() {\n \n assertEquals(0.2, hawthorn1.getDefenseModifier(), 0.1);\n }", "@Test\n\t// Delivery 2 Use Case 1. Grant/Deny Access to commands based on profile's role\n\tpublic void test() {\n\n\t\tUsers user1 = new Users(\"Test1\", \"PARENT\");\n\t\tUsers user2 = new Users(\"Test2\", \"STRANGER\");\n\t\tUsers user3 = new Users(\"Test3\", \"CHILDREN\");\n\t\tUsers user4 = new Users(\"Test4\", \"GUEST\");\n\n\t\t// Checking if users have permissions\n\t\tassertEquals(\"PARENT\", user1.getPermission());\n\t\tassertEquals(\"STRANGER\", user2.getPermission());\n\t\tassertEquals(\"CHILDREN\", user3.getPermission());\n\t\tassertEquals(\"GUEST\", user4.getPermission());\n\n\t}", "@Override\n public boolean test(User user) {\n return user.getPoints() > 160;\n }", "int getAllowedCredit();", "int getBonusExp();", "int getBonusExp();", "@When(\"User clicks rate\")\n\tpublic void user_clicks_rate() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "private void evaluateProbabilities()\n\t{\n\t}", "@When(\"User enters rating\")\n\tpublic void user_enters_rating() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void setBonusRepurchase(Float bonusRepurchase) {\n this.bonusRepurchase = bonusRepurchase;\n }", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "int getBonusHP();", "@Test(priority=2)\n\tpublic void ValidateNewUser() {\n\t\t\n\t\tString apiEndPoint = \"https://gorest.co.in/public-api/users/\"+newUserId;\n\t\tSystem.out.println(\"API EndPoint is: \"+apiEndPoint);\n\t\t\t\t\t\t\n\t\tGetUser getuser= given()\n\t\t\t.proxy(\"internet.ford.com\", 83)\n\t\t\t.contentType(\"application/json\")\n\t\t\t.baseUri(apiEndPoint)\t\t\t\n\t\t.when()\n\t\t\t.get(apiEndPoint).as(GetUser.class);\n\t\t\n\t\tAssert.assertEquals(getuser.getCode(),200);\n\t\tAssert.assertEquals(getuser.getData().getName(),\"Stephen M D\");\n\t\tAssert.assertEquals(getuser.getData().getStatus(),\"Active\");\n\t}", "public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}", "void redoExpenseTracker() throws NoUserSelectedException;", "Achievements getPostDetails();", "@Test\n\tpublic void testUpdateActionIsPerformedWhenPermissionInheritedAndUserAuthenticatedAndAllowed()\n\t\t\tthrows Throwable {\n\t\tcheck(getAllowedUser(), HttpStatus.SC_OK);\n\t}", "int getUnapprovedUserNumber();", "@Pointcut(\"@annotation(com.revature.aspects.CorrectUser)\")\n\tprivate void correctUserHook() {}", "boolean canRedoExpenseTracker() throws NoUserSelectedException;", "public int getGold();", "boolean hasUserInterest();", "boolean hasUserInterest();", "private void rewardPlayer(Player player) {\n\t\tRandom number = new Random();\n\t\tint num = number.nextInt(100);\n\t\t\n\t\tif(num >= 80 && num < 90) {\n\t\t\tplayer.increaseAttacks();\n\t\t\tserver.addTextToLoggingWindow(\"Player (\" + player.getName() + \") got rewarded one attack\");\n\t\t\tserver.sendMessageToClient(player.getName(), \"@134@\" + \"0\" + \"@\");\n\t\t}\n\t\telse if(num >= 90 && num <= 100) {\n\t\t\tplayer.increaseSafeTP();\n\t\t\tserver.addTextToLoggingWindow(\"Player (\" + player.getName() + \") got rewarded one safe teleport\");\n\t\t\tserver.sendMessageToClient(player.getName(), \"@134@\" + \"1\" + \"@\");\n\t\t}\n\t}", "int getBonusMoney();", "public boolean basicEligibilityCheck(User user) {\n\t\tif(checkUser( user)) \r\n\t\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void getAttackModifierTest() {\n \n assertEquals(1.4, hawthorn1.getAttackModifier(), 0.1);\n }", "@Override\n protected double getScore(TestUser testUser, double[] predictions) {\n\n int[] recommendations = Search.findTopN(predictions, this.numberOfRecommendations);\n\n int recommendedAndRelevant = 0, recommended = 0;\n\n for (int pos : recommendations) {\n if (pos == -1) break;\n\n double rating = testUser.getTestRatingAt(pos);\n if (rating >= this.relevantThreshold) {\n recommendedAndRelevant++;\n }\n\n recommended++;\n }\n\n if (recommended == 0) return Double.NEGATIVE_INFINITY;\n return (double) recommendedAndRelevant / (double) recommended;\n }", "@Test\n\tpublic void testCardCoinDiscount() throws NotEnoughResourcesException, NotEnoughPointsException{\n\t\t// bonus is 1 coin\n\t\tInteger expectedCoins = 3;\n\t\t// card 3 is Triumphal Arch (cost: 2 stones and 2 coins)\n\t\ttestResourcesDecorator.resourcesForBuilding(testPlayer,testGameHandler.mainBoard.buildingMap.get(3));\n\t\t// card 1 is Preacher (cost: 2 coins)\n\t\ttestResourcesDecorator.coinsForCharacter(testPlayer,testGameHandler.mainBoard.characterMap.get(1));\n\t\t// card 3 is Repairing the Church (cost: 1 wood, 1 stone, 1 coin)\n\t\ttestResourcesDecorator.resourcesForVenture(testPlayer,testGameHandler.mainBoard.ventureMap.get(3));\n\t\tassertEquals(expectedCoins,testPlayer.resources.getCoins());\n\t\t\n\t}", "@Test\r\n public void testGetRating() {\r\n }", "@Override\r\n\tpublic void personalLoanInterest() {\n\t\t\r\n\t}", "public void fixTeacherRating()\n {\n // put your code here\n if(profQuality < 5)\n profQuality++;\n }", "@Given(\"User wants to rate a meme\")\n\tpublic void user_wants_to_rate_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void performAbility() { return; }", "public abstract int getBonus();", "@Then(\"rate gets updated with new rating\")\n\tpublic void rate_gets_updated_with_new_rating() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "float getBonusPercentHP();", "int getAchievementsCount();", "@Override\n protected int getBonusPoints() {\n return leadership + experience;\n }", "private BonusMember checkGoldLimit(BonusMember member, LocalDate date) {\n\t\tif (member == null)\n\t\t\tthrow new IllegalArgumentException(\"Could not find member\");\n\t\t\n\t\tint points = member.findQualificationPoints(date);\n\n\t\tif (points > GOLD_LIMIT) {\n\t\t\tGoldMember goldMember = new GoldMember(member.getMemberNo(), member.getPersonals(), date, points);\n\t\t\treturn goldMember;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public abstract double getCredit(Answer rightAnswer);", "public void action(Player myPlayer)\n {\n if (getNbUtilisation() == 0) {\n System.out.println(\"Not possible\");\n } else {\n int nHealthy = getPointsHealthy();\n myPlayer.addLifePoints(nHealthy);\n\n }\n }", "@Test\n\tpublic void FRAN_5593_Verify_user_able_to_like_the_post() throws Exception {\n\t\tArrayList<ContentData> listReview = everContentAPI.getEverContent();\n\t\tContentData selectedContent = listReview.get(0);\n\t\tString postBody = selectedContent.getPostBody();\n\t\t//unlike content and get data again\n\t\teverContentAPI.unLikeContent(selectedContent.getContentKey());\n\t\tselectedContent = everContentAPI.getContentDetail(selectedContent.getContentKey());\n\t\tint beforeClickLikeCount = selectedContent.getLikeCount();\n\t\t\t\t\n\t\t\t\t\n\t\tloginPage = new LoginWithUsernamePage(driver);\n\t\tloginPage.doLoginProcess(Constant.ACCOUNT_EMAIL_1, Constant.ACCOUNT_PASSWORD_1);\n\t\thomePage = new HomePage(driver);\n\t\tassertTrue(homePage.isActive(), \"User is not in Homepage\", \"You're in Home page\");\n\n\t\tdriver.sleep(5);\n\t\treviewDetailPage = homePage.selectReviewNearYouByIndex(1);\n\t\tassertTrue(reviewDetailPage.isActive(), \"Review detail screen is not displayed\",\n\t\t\t\t\"Review detail screen is displayed\");\n\n\t\tString currentReviewBusinessName = reviewDetailPage.getBusinessName();\n\t\tString currentReviewDescription = reviewDetailPage.getReviewDescription();\n\n\t\tassertEquals(currentReviewBusinessName, selectedContent.getCorporateGroup().getDisplayName(),\n\t\t\t\t\"Business name of current review is displayed incorrectly\",\n\t\t\t\t\"Business name of current review is displayed correctly\");\n\t\tassertEquals(currentReviewDescription, postBody,\n\t\t\t\t\"Review description of current review is displayed incorrectly\",\n\t\t\t\t\"Review description of current review is displayed correctly\");\n\n\t\treviewDetailPage.clickLikeReview();\n\t\t//get content again from API\n\t\tselectedContent = everContentAPI.getContentDetail(selectedContent.getContentKey());\n\t\tassertEquals(selectedContent.getLikeCount(),beforeClickLikeCount + 1,\"API verification: Like count is not increased\",\"API verification: Like count is increased correctly\");\n\t}", "@Test\n public void testPostOverrideAccess2() {\n // create discussion which will be limited for user\n Discussion limitedDiscussion = new Discussion(-11L, \"Limited discussion\");\n limitedDiscussion.setTopic(topic);\n Post p = new Post(\"Post in limited discussion\");\n p.setDiscussion(limitedDiscussion);\n\n // set permissions\n // has full access to every post in category except the ones in the limited discussion\n // note that limitedDiscussion permission is added as the second one so that sorting in PermissionService.checkPermissions is tested also\n PermissionData categoryPostPerms = new PermissionData(true, true, true, true);\n PermissionData discussionPostPerms = new PermissionData(true, false, false, true);\n pms.configurePostPermissions(testUser, limitedDiscussion, discussionPostPerms);\n pms.configurePostPermissions(testUser, category, categoryPostPerms);\n\n // override mock so that correct permissions are returned\n when(permissionDao.findForUser(any(IDiscussionUser.class), anyLong(), anyLong(), anyLong())).then(invocationOnMock -> {\n Long discusionId = (Long) invocationOnMock.getArguments()[1];\n if(discusionId != null && discusionId == -11L) {\n return testPermissions;\n } else {\n return testPermissions.subList(1,2);\n }\n });\n\n // test access control in category\n assertTrue(accessControlService.canViewPosts(discussion), \"Test user should be able to view posts in discussion!\");\n assertTrue(accessControlService.canAddPost(discussion), \"Test user should be able to add posts in discussion!\");\n assertTrue(accessControlService.canEditPost(post), \"Test user should be able to edit posts in discussion!\");\n assertTrue(accessControlService.canRemovePost(post), \"Test user should be able to delete posts from discussion!\");\n\n // test access in user's discussion\n assertTrue(accessControlService.canViewPosts(limitedDiscussion), \"Test user should be able to view posts in limited discussion!\");\n assertTrue(accessControlService.canAddPost(limitedDiscussion), \"Test user should be able to add posts in limited discussion!\");\n assertFalse(accessControlService.canEditPost(p), \"Test user should not be able to edit post in limited discussion!\");\n assertFalse(accessControlService.canRemovePost(p), \"Test user should not be able to remove post from limited discussion!\");\n }", "@Test\n public void shouldDecrementCredibilityScore(){\n mEventsReport.userUpVote();\n mEventsReport.userDownVote();\n assertEquals(0, mEventsReport.getReportCredibilityScore());\n }", "@Test\n public void userRankingFailure2() {\n List<ATrip> trips = new ArrayList<ATrip>();\n ATrip trip = new ATrip();\n trip.setDriverid(DRIVER_ID);\n trip.setPassengerid(\"\");\n trip.setTripid(TRIP_ID);\n trip.setStatus(1);\n trip.setStartdate(4);\n trip.setEnddate(5);\n trips.add(trip);\n\n List<ATripRepository.userTripRanking> response = repo.getUserRankings(1, 10, trips, \"Passenger\");\n\n assertTrue(response.isEmpty());\n }", "public int bonusScore(Player p){\n int score = p.getBombRange() + p.getNumberBombRemaining() + p.getNumberMoveRemaining();\n return score;\n }", "public NotEnoughReputationException(String playerIdentifier) {\n this.message = String.format(NOT_ENOUGH_REPUTATION, playerIdentifier);\n }", "@Test\n public void testGetNumberDieMoreThanTwoTroops() {\n RiskPlayer player = new RiskPlayer(UUID.randomUUID());\n RiskBoard board = new RiskBoard();\n player.conqueredTerritory(TerritoryEnum.GREENLAND);\n board.getTerritory(TerritoryEnum.GREENLAND).changePlayer(player, 3);\n ValidDieDefendAction action = new ValidDieDefendAction(player, board,\n TerritoryEnum.GREENLAND);\n assertTrue(action.getMaxNumberDie() == 2);\n }", "@Override\n\tint getRateOfInterest() {\n\t\treturn 7;\n\t}", "@Test\r\n public void testgetUserRatedTop() throws ServletException, IOException {\r\n final Question question = createQuestion(\"abcdefg\", \"pattern\");\r\n createTweetPollPublicated(Boolean.TRUE, Boolean.TRUE, new Date(),\r\n getSpringSecurityLoggedUserAccount(), question);\r\n createPoll(new Date(), question, getSpringSecurityLoggedUserAccount(),\r\n Boolean.TRUE, Boolean.TRUE);\r\n initService(\"/api/common/frontend/topusers.json\", MethodJson.GET);\r\n setParameter(\"status\", \"1\");\r\n final JSONObject response = callJsonService();\r\n final JSONObject success = getSucess(response);\r\n final JSONArray items = (JSONArray) success.get(\"profile\");\r\n Assert.assertNotNull(items);\r\n Assert.assertEquals(items.size(), 1);\r\n }", "@Test\n public void pickUpSomeGoldTest() {\n\tassertNotEquals(0,score);\n }", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "@Override\n\tpublic void challenge10() {\n\n\t}", "public Float getBonusRepurchase() {\n return bonusRepurchase;\n }", "@Test\n\t@Category(TesteGetPromovabilitate.class)\n\tpublic void testPromovabilitate() {\n\t\tGrupa grupa=new Grupa(1078);\n\t\tfor(int i=0;i<7;i++) {\n\t\t\tStudent student=new Student(\"Valentin\");\n\t\t\tstudent.adaugaNota(4);\n\t\t\tstudent.adaugaNota(3);\n\t\t\tstudent.adaugaNota(2);\n\t\t\tgrupa.adaugaStudent(student);\n\t\t}\n\t\tfor(int i=0;i<5;i++) {\n\t\t\tStudent student=new Student(\"Ana\");\n\t\t\tstudent.adaugaNota(7);\n\t\t\tstudent.adaugaNota(8);\n\t\t\tstudent.adaugaNota(10);\n\t\t\tgrupa.adaugaStudent(student);\n\t\t}\n\t\tassertEquals(0.41, grupa.getPromovabilitate(),0.02);\n\t}", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "int getLuckyTicket();", "public int getWorth()\n {\n return worth;\n }", "public void createGoldReward() {\n try {\n int gold = RandomBenefitModel.getGoldReward(encounter, characterVM.getDistance());\n if (gold > 0) characterVM.goldChange(gold);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Test\r\n\tpublic void calculMetricSuperiorTeacherBetterScoreButNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(25f, 1f), 12f, 11f), new Float(0));\r\n\t}", "boolean hasBonusPercentHP();", "@Override\r\n\tpublic boolean checkUser(User user) {\n\t\tint age = user.getAge();\r\n\t\tint height = user.getHeight();\r\n\t\tint weight = user.getWeight();\r\n\t\tString country =user.getCountry();\r\n\t\t if((age>=18 && age<=35) && (height>=155 && height<=170) && (weight>=55 && weight<=90) && country.equals(\"ProGrad\")) \r\n\t\t\t return true;\r\n\t\t else \r\n\t\t\t return false;\r\n\t }", "double getTotalReward();", "String getPlus4_contestable();", "KingdomRank getRank(KingdomUser user);", "static void bestgirl(User user, String content, MessageChannel chan) {\n if(!content.toLowerCase().startsWith(\"!bestgirl\")) {\n return;\n }\n\n String girlToPost;\n String[] arguments = content.split(\" \");\n\n // sets user's best girl\n if(content.toLowerCase().startsWith(\"!bestgirl set \") && arguments.length >= 3){\n girlToPost = content.substring(\"!bestgirl set \".length());\n bestGirlMap.put(user.getIdLong(), girlToPost);\n if(!saveMap(bestGirlMap, Config.best_girl_data_filename)){\n chan.sendMessage(\"Ahh, I couldn't save your best girl to my data file. \" +\n \"I'll keep it in mind until I restart, though!\").queue();\n }\n else {\n chan.sendMessage(\"Ok, recognized your best girl.\").queue();\n }\n }\n else {\n girlToPost = bestGirlMap.get(user.getIdLong());\n if(girlToPost == null){\n chan.sendMessage(\"Set your best girl with the `!bestgirl set <character>` command first.\").queue();\n return;\n }\n chan.sendMessage(Util.cleanNameTag(girlToPost) + \"!\").queue();\n }\n\n String nsfwTag = null;\n if(arguments.length >= 2) {\n try {\n nsfwTag = getNSFWTag(chan, arguments[1]);\n } catch (Exception e) {\n chan.sendMessage(\"Channel is not set as a NSFW channel.\").queue();\n return;\n }\n }\n if(nsfwTag == null) nsfwTag = \" rating:safe\";\n\n Request request = new Request(chan, user, 0,\n girlToPost + \" 1girl\" + nsfwTag + \" \" + excludeMap.getOrDefault(user.getIdLong(), \"\"));\n postController.schedulePostOnce(request);\n }", "private static int chargeRate(Thing b, Thing s) {\n \t\tint rate=b.getStat(\"WP\");\r\n \t\t\r\n \t\t// bonus for appropraite recharge skill\r\n \t\trate=rate*(1+b.getStat(rechargeSkill(s)));\r\n \t\t\r\n \t\t// spell specific charge rate\r\n \t\t// default is 100\r\n \t\trate=(rate*s.getStat(\"ChargeRate\"));\r\n \t\t\r\n \t\t// more costly spells take longer to recharge\r\n \t\trate=rate/s.getStat(\"SpellCost\");\r\n \t\t\r\n \t\tif (rate<=0) {\r\n \t\t\tGame.warn(\"Spell.chargeRate(...)==0 for \"+s.name());\r\n \t\t}\r\n \t\t\r\n \t\treturn rate;\r\n \t}", "@Test\r\n public void testGetRaty() {\r\n System.out.println(\"getRaty\");\r\n Faktura instance = new Faktura();\r\n String expResult = \"\";\r\n String result = instance.getRaty();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public abstract void onContribution(int amount, Player player);", "@Override\n public boolean updateExpenseLimit(int userId, double limit){\n return userDAO.updateExpenseLimit(userId,limit);\n }", "float getBonusExp();", "UsabilityGoal createUsabilityGoal();", "@Test\n public void testDenialWithPrejudice() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // Request the permission and deny it\n BasePermissionActivity.Result firstResult = requestPermissions(\n permissions, REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class, () -> {\n try {\n clickDenyButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is not granted\n assertPermissionRequestResult(firstResult, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {false});\n\n // Request the permission and choose don't ask again\n BasePermissionActivity.Result secondResult = requestPermissions(new String[] {\n Manifest.permission.WRITE_CONTACTS}, REQUEST_CODE_PERMISSIONS + 1,\n BasePermissionActivity.class, () -> {\n try {\n denyWithPrejudice();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is not granted\n assertPermissionRequestResult(secondResult, REQUEST_CODE_PERMISSIONS + 1,\n permissions, new boolean[] {false});\n\n // Request the permission and do nothing\n BasePermissionActivity.Result thirdResult = requestPermissions(new String[] {\n Manifest.permission.WRITE_CONTACTS}, REQUEST_CODE_PERMISSIONS + 2,\n BasePermissionActivity.class, null);\n\n // Expect the permission is not granted\n assertPermissionRequestResult(thirdResult, REQUEST_CODE_PERMISSIONS + 2,\n permissions, new boolean[] {false});\n }", "public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}", "private boolean isApproved() {\r\n if (rnd.nextInt(10) < 5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "public double getRating(){\n\t\treturn this.user_rating;\n\t}", "@Test\n public void isMyPetHungry() {\n int isHungry = underTest.getHungerLevel();\n // Assert\n assertThat(isHungry, is(5));\n }", "@java.lang.Override\n public int getAllowedCredit() {\n return allowedCredit_;\n }", "@Test\r\n\tpublic void basicTests() {\r\n\t\t\r\n\t\tuserPool.addFamily(\"family1\");\r\n\t\tuserPool.addLsfUser(\"family1\", \"user1\", false);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertEquals(\"Should get user1 for family1\", userPool.getUserForFamily(\"family1\"), \"user1\" );\r\n\t\t} catch (InternalException e) {\r\n\t\t\tfail(\"Get user for family1 threw exception: \" + e.getMessage() );\r\n\t\t}\r\n\t\t\r\n\t\t// family1 should now have no free users\r\n\t\ttry {\r\n\t\t\tuserPool.getUserForFamily(\"family1\");\r\n\t\t\tfail(\"family1 should have no free users, exception expected\");\r\n\t\t} catch (InternalException e) {\r\n\t\t\tassertEquals(\"Get user for family1 should throw expected exception\", e.getMessage(), \"No free LSF users at present\" );\r\n\t\t}\r\n\t\t\r\n\t\tuserPool.freeUser(\"user1\");\r\n\t\ttry {\r\n\t\t\tassertEquals(\"user1 should be free again\", userPool.getUserForFamily(\"family1\"), \"user1\" );\r\n\t\t} catch (InternalException e) {\r\n\t\t\tfail(\"Get user for family1 threw exception: \" + e.getMessage() );\r\n\t\t}\r\n\t\t\r\n\t\t// Add an already-assigned user\r\n\t\tuserPool.addLsfUser(\"family1\", \"user2\", true);\r\n\t\t\r\n\t\t// family1 should now have no free users (still)\r\n\t\ttry {\r\n\t\t\tuserPool.getUserForFamily(\"family1\");\r\n\t\t\tfail(\"family1 should have no free users, exception expected\");\r\n\t\t} catch (InternalException e) {\r\n\t\t\tassertEquals(\"Get user for family1 should throw expected exception\", e.getMessage(), \"No free LSF users at present\" );\r\n\t\t}\r\n\t\t\r\n\t\tuserPool.freeUser(\"user2\");\r\n\t\ttry {\r\n\t\t\tassertEquals(\"user2 should be free\", userPool.getUserForFamily(\"family1\"), \"user2\" );\r\n\t\t} catch (InternalException e) {\r\n\t\t\tfail(\"Get user for family1 threw exception: \" + e.getMessage() );\r\n\t\t}\r\n\t\t\r\n\t\tuserPool.freeUser(\"user1\");\r\n\t\tuserPool.freeUser(\"user2\");\r\n\t\t\r\n\t\t// Add a third, assigned user. We should not get this back from getUserForFamily\r\n\t\t\r\n\t\tuserPool.addLsfUser(\"family1\", \"user3\", true);\r\n\t\t\r\n\t\t// Now get one of the free users\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString user = userPool.getUserForFamily(\"family1\");\r\n\t\t\tassertTrue(\"User should be either user1 or user2\", \"user1\".equals(user) || \"user2\".equals(user));\r\n\t\t} catch (InternalException e) {\r\n\t\t\tfail(\"Get user for family1 threw exception: \" + e.getMessage() );\r\n\t\t}\r\n\t\t\r\n\t\t// ... and get the other one\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString user = userPool.getUserForFamily(\"family1\");\r\n\t\t\tassertTrue(\"User should be either user1 or user2\", \"user1\".equals(user) || \"user2\".equals(user));\r\n\t\t} catch (InternalException e) {\r\n\t\t\tfail(\"Get user for family1 threw exception: \" + e.getMessage() );\r\n\t\t}\r\n\t\t\r\n\t\t// All users should now be assigned, so can't get any more\r\n\t\t\r\n\t\ttry {\r\n\t\t\tuserPool.getUserForFamily(\"family1\");\r\n\t\t\tfail(\"family1 should have no free users, exception expected\");\r\n\t\t} catch (InternalException e) {\r\n\t\t\tassertEquals(\"Get user for family1 should throw expected exception\", e.getMessage(), \"No free LSF users at present\" );\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void computeSatisfaction() {\n\n }", "public int getBestGuy () {\r\n return poblac.getBestGuy();\r\n }", "public boolean isApplicable(BlockState state, Player player) {\n if (getRewardLimit() == 0) {\n debug(\"Group \" + this.getName() + \" was skipped because it has a reward limit of 0\");\n return false;\n }\n if (!isWorldAllowed(player.getWorld().getName())) {\n debug(\"Player was denied access to rewards in reward group because the reward group is not allowed in this world.\");\n return false;\n }\n WorldGuardManager wgm = cmr.getWGManager();\n if (wgm.usingWorldGuard() && !wgm.isAllowedInRegions(this, state.getBlock())) {\n debug(\"Player was denied access to rewards in reward group because the reward group is not allowed in this region.\");\n return false;\n }\n return true;\n }", "public void updatePriority() {//determines todays suggestion and updats queue\n\t\t \n\t\t if(newUser == true) {\n\t\t\t System.out.println(\"NEW USER\");\n\t\t\t int count = 14;\n\t\t\t \n\t\t\t if(getLikesAmerican() == \"Yes\") {\n\t\t\t\t AmericanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t AmericanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesAsian() == \"Yes\") {\n\t\t\t\t AsianPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t AsianPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesBakery() == \"Yes\") {\n\t\t\t\t BakeryPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t BakeryPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesBar() == \"Yes\") {\n\t\t\t\t BarPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t BarPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesBreakfast() == \"Yes\") {\n\t\t\t\t BreakfastPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t BreakfastPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesCafe() == \"Yes\") {\n\t\t\t\t CafePriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t CafePriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesCaribbean() == \"Yes\") {\n\t\t\t\t CaribbeanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t CaribbeanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesChicken() == \"Yes\") {\n\t\t\t\t ChickenPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t ChickenPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesEuropean() == \"Yes\") {\n\t\t\t\t EuropeanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t EuropeanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesFastFood() == \"Yes\") {\n\t\t\t\t FastFoodPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t FastFoodPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesHealthFood() == \"Yes\") {\n\t\t\t\t HealthFoodPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t HealthFoodPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesLatinAmerican() == \"Yes\") {\n\t\t\t\t LatinAmericanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t LatinAmericanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesPizza() == \"Yes\") {\n\t\t\t\t PizzaPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t PizzaPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesSandwich() == \"Yes\") {\n\t\t\t\t SandwichPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t SandwichPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesSeafood() == \"Yes\") {\n\t\t\t\t SeafoodPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t SeafoodPriority = -99;\n\t\t\t }\n\t\t\t\n\t\t }\n\t\t else {\n\t\t\t System.out.println(\"CURRENT USER\");\n\t\t\t int i = GenerateRandom(12, 14);\n\t\t\t int min = 14-yesCount();\n\t\t\t \n\t\t\t if(AmericanPriority == i) {\n\t\t\t\t todaySuggestion = \"American\";\n\t\t\t\t AmericanPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(AsianPriority == i) {\n\t\t\t\t todaySuggestion = \"Asian\";\n\t\t\t\t AsianPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(BakeryPriority == i) {\n\t\t\t\t todaySuggestion = \"Bakery\";\n\t\t\t\t BakeryPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(BarPriority == i) {\n\t\t\t\t todaySuggestion = \"Bar\";\n\t\t\t\t BarPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(BreakfastPriority == i) {\n\t\t\t\t todaySuggestion = \"Breakfast\";\n\t\t\t\t BreakfastPriority = min;\n\t\t\t }\n\n\t\t\t if(CafePriority == i) {\n\t\t\t\t todaySuggestion = \"Cafe\";\n\t\t\t\t CafePriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(CaribbeanPriority == i) {\n\t\t\t\t todaySuggestion = \"Caribbean\";\n\t\t\t\t CaribbeanPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(ChickenPriority == i) {\n\t\t\t\t todaySuggestion = \"Chicken\";\n\t\t\t\t ChickenPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(EuropeanPriority == i) {\n\t\t\t\t todaySuggestion = \"European \";\n\t\t\t\t EuropeanPriority = min;\n\t\t\t }\n\n\t\t\t if(FastFoodPriority == i) {\n\t\t\t\t todaySuggestion = \"Fast Food\";\n\t\t\t\t FastFoodPriority = min;\n\t\t\t }\n\n\t\t\t if(HealthFoodPriority == i) {\n\t\t\t\t todaySuggestion = \"Health food\";\n\t\t\t\t HealthFoodPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(LatinAmericanPriority == i) {\n\t\t\t\t todaySuggestion = \"Latin American\";\n\t\t\t\t LatinAmericanPriority = min;\n\t\t\t }\n\n\t\t\t if(PizzaPriority == i) {\n\t\t\t\t todaySuggestion = \"Pizza\";\n\t\t\t\t PizzaPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(SandwichPriority == i) {\n\t\t\t\t todaySuggestion = \"Sandwich\";\n\t\t\t\t SandwichPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(SeafoodPriority == i) {\n\t\t\t\t todaySuggestion = \"Seafood\";\n\t\t\t\t SeafoodPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t if(i == 14) {//update everything -99<x +1\n\t\t\t\t if(AmericanPriority > -50) {\n\t\t\t\t\t AmericanPriority++;\n\t\t\t\t }\n\t\t\t\t if(AsianPriority > -50) {\n\t\t\t\t\t AsianPriority++;\n\t\t\t\t }\n\t\t\t\t if(BakeryPriority > -50) {\n\t\t\t\t\t BakeryPriority++;\n\t\t\t\t }\n\t\t\t\t if(BarPriority > -50) {\n\t\t\t\t\t BarPriority++;\n\t\t\t\t }\n\t\t\t\t if(BreakfastPriority > -50) {\n\t\t\t\t\t BreakfastPriority++;\n\t\t\t\t }\n\t\t\t\t if(CafePriority > -50) {\n\t\t\t\t\t CafePriority++;\n\t\t\t\t }\n\t\t\t\t if(CaribbeanPriority > -50) {\n\t\t\t\t\t CaribbeanPriority++;\n\t\t\t\t }\n\t\t\t\t if(ChickenPriority > -50) {\n\t\t\t\t\t ChickenPriority++;\n\t\t\t\t }\n\t\t\t\t if(EuropeanPriority > -50) {\n\t\t\t\t\t EuropeanPriority++;\n\t\t\t\t }\n\t\t\t\t if(FastFoodPriority > -50) {\n\t\t\t\t\t FastFoodPriority++;\n\t\t\t\t }\n\t\t\t\t if(HealthFoodPriority > -50) {\n\t\t\t\t\t HealthFoodPriority++;\n\t\t\t\t }\n\t\t\t\t if(LatinAmericanPriority > -50) {\n\t\t\t\t\t LatinAmericanPriority++;\n\t\t\t\t }\n\t\t\t\t if(PizzaPriority > -50) {\n\t\t\t\t\t PizzaPriority++;\n\t\t\t\t }\n\t\t\t\t if(SandwichPriority > -50) {\n\t\t\t\t\t SandwichPriority++;\n\t\t\t\t }\n\t\t\t\t if(SeafoodPriority > -50) {\n\t\t\t\t\t SeafoodPriority++;\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\tif(i == 13) {//update everything -99<x<13 +1\n\t\t\t\t if(AmericanPriority > -50 && AmericanPriority < 13) {\n\t\t\t\t\t AmericanPriority++;\n\t\t\t\t }\n if(AsianPriority > -50 && AsianPriority < 13) {\n\t\t\t\t\t AsianPriority++;\n\t\t\t\t }\n if(BakeryPriority > -50 && BakeryPriority < 13) {\n\t\t\t\t\t BakeryPriority++;\n\t\t\t\t }\n if(BarPriority > -50 && BarPriority < 13) {\n\t\t\t\t\t BarPriority++;\n\t\t\t\t }\n if(BreakfastPriority > -50 && BreakfastPriority < 13) {\n\t\t\t\t\t BreakfastPriority++;\n\t\t\t\t }\n if(CafePriority > -50 && CafePriority < 13) {\n\t\t\t\t\t CafePriority++;\n\t\t\t\t }\n if(CaribbeanPriority > -50 && CaribbeanPriority < 13) {\n\t\t\t\t\t CaribbeanPriority++;\n\t\t\t\t }\n if(ChickenPriority > -50 && ChickenPriority < 13) {\n\t\t\t\t\t ChickenPriority++;\n\t\t\t\t }\n if(EuropeanPriority > -50 && EuropeanPriority < 13) {\n\t\t\t\t\t EuropeanPriority++;\n\t\t\t\t }\n if(FastFoodPriority > -50 && FastFoodPriority < 13) {\n\t\t\t\t\t FastFoodPriority++;\n\t\t\t\t }\n if(HealthFoodPriority > -50 && HealthFoodPriority < 13) {\n\t\t\t\t\t HealthFoodPriority++;\n\t\t\t\t }\n if(LatinAmericanPriority > -50 && LatinAmericanPriority < 13) {\n\t\t\t\t\t LatinAmericanPriority++;\n\t\t\t\t }\n if(PizzaPriority > -50 && PizzaPriority < 13) {\n\t\t\t\t\t PizzaPriority++;\n\t\t\t\t }\n if(SandwichPriority > -50 && SandwichPriority < 13) {\n\t\t\t\t\t SandwichPriority++;\n\t\t\t\t }\n if(SeafoodPriority > -50 && SeafoodPriority < 13) {\n\t\t\t\t\t SeafoodPriority++;\n\t\t\t\t }\n\t\t\t }\n\n if(i == 12){//update everything -99<x<12 +1\n\t\t if(AmericanPriority > -50 && AmericanPriority < 12) {\n\t\t\t\t\t AmericanPriority++;\n\t\t\t\t }\n if(AsianPriority > -50 && AsianPriority < 12) {\n\t\t\t\t\t AsianPriority++;\n\t\t\t\t }\n if(BakeryPriority > -50 && BakeryPriority < 12) {\n\t\t\t\t\t BakeryPriority++;\n\t\t\t\t }\n if(BarPriority > -50 && BarPriority < 12) {\n\t\t\t\t\t BarPriority++;\n\t\t\t\t }\n if(BreakfastPriority > -50 && BreakfastPriority < 12) {\n\t\t\t\t\t BreakfastPriority++;\n\t\t\t\t }\n if(CafePriority > -50 && CafePriority < 12) {\n\t\t\t\t\t CafePriority++;\n\t\t\t\t }\n if(CaribbeanPriority > -50 && CaribbeanPriority < 12) {\n\t\t\t\t\t CaribbeanPriority++;\n\t\t\t\t }\n if(ChickenPriority > -50 && ChickenPriority < 12) {\n\t\t\t\t\t ChickenPriority++;\n\t\t\t\t }\n if(EuropeanPriority > -50 && EuropeanPriority < 12) {\n\t\t\t\t\t EuropeanPriority++;\n\t\t\t\t }\n if(FastFoodPriority > -50 && FastFoodPriority < 12) {\n\t\t\t\t\t FastFoodPriority++;\n\t\t\t\t }\n if(HealthFoodPriority > -50 && HealthFoodPriority < 12) {\n\t\t\t\t\t HealthFoodPriority++;\n\t\t\t\t }\n if(LatinAmericanPriority > -50 && LatinAmericanPriority < 12) {\n\t\t\t\t\t LatinAmericanPriority++;\n\t\t\t\t }\n if(PizzaPriority > -50 && PizzaPriority < 12) {\n\t\t\t\t\t PizzaPriority++;\n\t\t\t\t }\n if(SandwichPriority > -50 && SandwichPriority < 12) {\n\t\t\t\t\t SandwichPriority++;\n\t\t\t\t }\n if(SeafoodPriority > -50 && SeafoodPriority < 12) {\n\t\t\t\t\t SeafoodPriority++;\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t }", "public static double difficultyRating()\r\n {\r\n double howhard = 4.0;\r\n return howhard;\r\n }", "public boolean takeRelicReward(){\n if(!isGameOver() || character.getHp() <= 0 )return false;\n if( relicRewardGiven )return false;\n character.addRelic( reward.getRelic() );\n relicRewardGiven=true;\n return true;\n }", "public int getInstabilityScore();", "String getReviewrate();", "@Override\r\n\tpublic int attack() {\r\n\t\treturn rnd.nextInt(MAX_MONSTER_ATTACK_DAMAGE);\r\n\t}", "public void rechargePrayerPoints() {\r\n prayerPoints = staticLevels[PRAYER];\r\n if (entity instanceof Player) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, PRAYER));\r\n }\r\n }", "static void healing_challenge2() {\n System.out.println(username + \" opens up the bag to check if there are any potions left in there...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"GASP!!! It's just a sock from granny Boo.\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You have no more potions left, SORRY YOU'RE ON YOUR OWN...\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 310) {\n System.out.println(username + \" found a potion in the bag...\");\n System.out.println(username + \" takes the red potion, throws the cap, and slowly let the potion heal the wounds.\");\n System.out.println(username + \" gained 80 HP points.\");\n playerhealth = playerhealth + 80; //player's health is healed\n potions--;\n if(playerhealth > 310){ //in case of player heals and adds 80 and health goes higher than 310\n playerhealth = 310;\n }\n //in case if player tries to increase their health over the maximum\n }else if(playerhealth == 310) {\n System.out.println(\"You are at maximum health.\");\n }\n }" ]
[ "0.694912", "0.6316922", "0.62031275", "0.60845476", "0.5722585", "0.5659994", "0.537451", "0.532266", "0.53216004", "0.5318524", "0.5315763", "0.5282342", "0.5282342", "0.5231312", "0.5202847", "0.51702446", "0.51620775", "0.51434886", "0.5115341", "0.5105961", "0.51038396", "0.5103612", "0.5101796", "0.5088481", "0.5072121", "0.50718176", "0.5050918", "0.5046213", "0.5044699", "0.5044699", "0.5041475", "0.50363034", "0.50347894", "0.50299805", "0.5020455", "0.50061494", "0.49966228", "0.4995765", "0.49874166", "0.49831408", "0.49746206", "0.49692363", "0.4962758", "0.49547663", "0.49429068", "0.49413082", "0.49377137", "0.4936056", "0.4934591", "0.4930538", "0.49243551", "0.49177063", "0.49104786", "0.49099517", "0.49052814", "0.49022636", "0.48940206", "0.489173", "0.48855823", "0.48849934", "0.4884949", "0.48817587", "0.48724523", "0.48717827", "0.48649862", "0.48647568", "0.4852969", "0.48527077", "0.48466247", "0.48449475", "0.48446634", "0.4843043", "0.4836989", "0.48331454", "0.4832838", "0.483022", "0.48300442", "0.48265076", "0.48236632", "0.48225865", "0.48195744", "0.4813374", "0.48117983", "0.48106244", "0.48102057", "0.48097822", "0.4804485", "0.4804084", "0.47996736", "0.47974324", "0.4794245", "0.47880375", "0.47825187", "0.4773986", "0.47735417", "0.47687653", "0.4763796", "0.47615162", "0.47574803", "0.4757439" ]
0.54494953
6
Constructor appends the group member names in a list passed as parameter.
public GroupName(List<String> theNames) { memberName = new StringBuilder(); for (int i = 0; i < theNames.size(); i++) { memberName.append(theNames.get(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Group(String name) {\n super(name);\n this.members = new HashSet<>();\n }", "Group(String name) {\n this(name, new ArrayList<>());\n }", "public Group()\n\t{\n\t\tthis.members = new ArrayList<>();\n\t\tthis.groupID= idCounter;\n\t\tidCounter++;\n\t}", "public Group() {\n\t\t\tmembers = new ArrayList<String>();\n\t\t\tcreatorName = null;\n\t\t\tdemotedCreatorName = null;\n\t\t}", "public void appendGroups (String format, Object ... args)\n {\n \n String string = String.format (format, args);\n // Attach string to list\n if (groups == null)\n groups = new ArrayList <String> ();\n groups.add (string);\n }", "public Group(int groupID, String groupName, ArrayList<Integer> members, ArrayList<Integer> adminIDs) {\n this.groupID = groupID;\n this.groupName = groupName;\n this.memberIDs = memberIDs;\n this.adminIDs = adminIDs;\n }", "public MemberList(List members)\n/* 10: */ {\n/* 11:10 */ this.members = members;\n/* 12: */ }", "public GroupFragment() {\n groupList= new ArrayList<String>();\n //The group list should come from the server\n groupList.add(\"Lordaeron\");\n groupList.add(\"Institute of War\");\n groupList.add(\"BJTU-LOL\");\n groupList.add(\"High school\");\n groupList.add(\"We are a team\");\n groupList.add(\"Killing\");\n groupList.add(\"Less is more\");\n groupList.add(\"Come on baby\");\n groupList.add(\"Breaking the news\");\n groupList.add(\"DL\");\n groupList.add(\"Taste my blade\");\n groupList.add(\"Little\");\n groupList.add(\"Double kill\");\n groupList.add(\"Victory \");\n groupList.add(\"Huskar\");\n groupList.add(\"First blood\");\n groupList.add(\"Ironwood Branch\");\n groupList.add(\"Medusa\");\n groupList.add(\"Slithice\");\n groupList.add(\"Zeus\");\n groupList.add(\"It's lucky time\");\n }", "public ClassGroup(String a, ArrayList<Student> b) {\n\n\t\tthis.gName = a;\n\t\tthis.studentList = b;\n\t}", "public Group withMembers(Set<TCSObjectReference<?>> members) {\n return new Group(getName(),\n getProperties(),\n getHistory(),\n members);\n }", "public void buildMembership() {\r\n\t\tif (pointList == null || pointList.isEmpty())\r\n\t\t\treturn;\r\n\r\n\t\t/* clear previous membership records */\r\n\t\tfor (Group g : groupList)\r\n\t\t\tg.memberList.clear();\r\n\r\n\t\t/* update membership */\r\n\t\tList<Double> distanceList;\r\n\t\tfor (int i = 0; i < pointList.size(); i++) {\r\n\t\t\tdistanceList = new ArrayList<>();\r\n\r\n\t\t\tfor (double[] centerPoint : centerList)\r\n\t\t\t\tdistanceList.add(MathLib.Distance.euclidean(centerPoint, pointList.get(i)));\r\n\t\t\tint idx = MathLib.getRank(distanceList, true)[0];\r\n\t\t\tcenterAssignment.set(i, idx);\r\n\t\t\tgroupList.get(idx).memberList.add(i);\r\n\t\t}\r\n\t}", "public void setMembers( List<String> list )\r\n {\r\n specifiedMembers = new ArrayList<Dependency>();\r\n for ( String str: list )\r\n {\r\n Member member = null;\r\n int index = str.lastIndexOf( '.' );\r\n String className = str.substring( 0, index );\r\n String memberName = str.substring( index + 1 );\r\n Class<?> clazz = createClass( className );\r\n if ( memberName.endsWith( \"()\" ) )\r\n {\r\n memberName = memberName.substring( 0, memberName.lastIndexOf( \"()\" ) );\r\n member = findSimpleSetterMethod( clazz, memberName );\r\n }\r\n else\r\n {\r\n member = findField( clazz, memberName );\r\n }\r\n specifiedMembers.add( createDependency( member, \"\" ) );\r\n }\r\n }", "public SimpleGroup(final String name) {\n super(name);\n }", "public Group()\r\n {\r\n endpoints = new ArrayList<>();\r\n name = \"NewGroup\";\r\n }", "public void add(String name)\n/* 15: */ {\n/* 16:14 */ this.members.add(name);\n/* 17: */ }", "public UserGroupMemberRecord() {\n super(UserGroupMember.USER_GROUP_MEMBER);\n }", "public Team(ArrayList<String> input)\n\t{\n\t\tthis.piece = new Piece(input.get(1),input.get(2),input.get(3));\n\t\tthis.year = Integer.parseInt(input.get(4));\n\t\tint lastIndex = input.indexOf(null);\n\t\tint currentIndex = 5;\n\t\tthis.members = new ArrayList<Person>();\n\t\twhile(currentIndex<lastIndex)\n\t\t{\n\t\t\tthis.addMember(new Person(input.get(currentIndex),input.get(++currentIndex),input.get(++currentIndex)));\n\t\t\tcurrentIndex++;\n\t\t}\n\t}", "public NamedList() {\n\t\tnvPairs = new ArrayList<Object>();\n\t}", "public void addGroup(String groupHeader, List<Object> groupElements, boolean allowSingleSelection) throws Exception;", "public static GroupList newInstance() {\n\t\tGroupList f = new GroupList();\n\t\tBundle b = new Bundle();\n\t\tf.setArguments(b);\n\t\treturn f;\n\t}", "public Group() {\r\n\t}", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setMembersFromDB(ArrayList<ArrayList<String>> memberList)\n{\n\tfor(int i =0; i < memberList.size(); i++)\n\t{\n\t\tPerson newMember = new Person();\n\t\t//arbitrary order\n\t\t//TODO generalize this method\n\t\tnewMember.setLastName(memberList.get(i).get(0));\n\t\tnewMember.setFirstName(memberList.get(i).get(1));\n\t\tnewMember.setInstrument(memberList.get(i).get(2));\n\t\tthis.addMember(newMember);\n\t}\n}", "public synchronized void addGroupMember(String groupName, String member) {\n\t\t\tgroupList.get(groupName).addMember(member);\n\t\t}", "public void setMembers(List<DN> members) {\n\t\tthis.members = members;\n\t}", "interface WithMembers {\n /**\n * Specifies members.\n * @param members Members of the target group\n * @return the next definition stage\n */\n WithCreate withMembers(List<JobTarget> members);\n }", "@SuppressWarnings(\"unchecked\")\n public Builder withMembers(Member... members) {\n if (members == null)\n throw new NullPointerException(\"members cannot be null\");\n return withMembers(Arrays.asList(members));\n }", "public void setGroup (String format, Object ... args)\n {\n group = String.format (format, args);\n }", "public void setGroup (String format, Object ... args)\n {\n group = String.format (format, args);\n }", "public GroupAccessBean constructGroups() throws Exception {\n\n\tif (groups == null) {\t\n\t\t// Construct groups bean\n\t\tif (getGroupcode() != null) {\n\t\t\tgroups = new GroupAccessBean();\n\t\t\tgroups.setInitKey_division(getGroupcode().intValue());\n\t\t\tgroups.refreshCopyHelper();\n\t\t}\n\t}\n\treturn groups;\n}", "public Group(){\n\n }", "void setGroupName(String groupName) {\n this.groupName = new String(groupName);\n }", "private void addGroup(StreamTokenizer st) throws IOException {\n\t\tcurrentGroups.clear();\n\t\tst.nextToken();\n\t\tString gName = \"default\";\n\t\tif (st.ttype == StreamTokenizer.TT_EOL) {\n\t\t\tLoggingSystem.getLogger(this).fine(\"Warning: empty group name\");\n\t\t\tst.pushBack();\n\t\t} else\n\t\t\tgName = st.sval;\n\t\t// System.out.println(\"adding \"+gName+\" to current groups. [\"+st.nval+\",\"+st.sval+\",\"+st.ttype+\"]\");\n\t\tcurrentGroups.add(gName);\n\t\tif (groups.get(gName) == null) {\n\t\t\tGroup g = new Group(gName);\n\t\t\tgroups.put(gName, g);\n\t\t}\n\t\twhile (st.nextToken() != StreamTokenizer.TT_EOL) {\n\t\t}\n\t}", "public void setGroupMembersAll(java.lang.String[] groupMembersAll) {\n this.groupMembersAll = groupMembersAll;\n }", "public Builder withMembers(Collection<Member> members) {\n if (members == null)\n throw new NullPointerException(\"members cannot be null\");\n\n this.members.members.clear();\n this.members.list.clear();\n for (Member member : members) {\n this.members.members.put(member.id(), member);\n this.members.list.add(member);\n }\n return this;\n }", "public UserGroup(String name, boolean [] permissions)\n {\n \tthis.name = name;\n \tthis.permissions = permissions;\n }", "public Group() {\n\t\t\tfirst = last = null;\n\t\t\tsize = 0;\n\t\t}", "public MultiList(){}", "public void addMember()\r\n\t{\r\n\t\tlistOfMembers.add(new Member(\r\n\t\t\t\tgetUserString(\"Enter Member's First Name\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Surname\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Email\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Telephone\"),\r\n\t\t\t\tgetUserInt(\"Enter Member's Number\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Type\")\r\n\t\t\t\t));\r\n\t\t\r\n\t}", "public void addNames() {}", "public void addNames() {}", "public MyList(String name) {\n nameList = name;\n }", "public Group(GroupManager gm, String groupName) {\n this.groupManager = gm;//GroupManager.getInstance();\n this.groupName = groupName;\n }", "public Group() {\n\n }", "public GetMembers(String fn,String ln){\r\n\t\tfname = fn;\r\n\t\tlname = ln;\r\n\t\tmembers ++;\r\n\t\t\r\n\t\tSystem.out.printf(\"Constructor for %s %s, Members in the club %d.\\n\", fname,lname,members);\r\n\t}", "public int countGroups()\n/* 25: */ {\n/* 26:22 */ return this.members.size();\n/* 27: */ }", "private void group(String[] args){\n String name;\n \n switch(args[1]){\n case \"view\":\n this.checkArgs(args,2,2);\n ms.listGroups(this.groups);\n break;\n case \"add\":\n this.checkArgs(args,3,2);\n name = args[2];\n db.createGroup(name);\n break;\n case \"rm\":\n this.checkArgs(args,3,2);\n name = args[2];\n Group g = this.findGroup(name);\n if(g == null)\n ms.err(4);\n db.removeGroup(g);\n break;\n default:\n ms.err(3);\n break;\n }\n }", "private void buildGroups() {\n if(groups.size() == 1){\n Group aGroup = groups.get(0);\n for (Team team : teams) {\n aGroup.add(team);\n }\n return;\n }\n\n for (Team team : teams) {\n groups.get(getIndex()).add(team);\n }\n }", "public PostgroupHelper(String groupName, String groupPassword, ArrayList<String> members,\n ArrayList<String> memberIds, Context context,\n PostgroupHelper.CallbackPost cb) {\n this.groupName = groupName;\n this.groupPassword = groupPassword;\n this.members = members;\n this.activity = cb;\n this.memberIds = memberIds;\n RequestQueue queue = Volley.newRequestQueue(context);\n PostgroupHelper.PostRequest request = new PostgroupHelper.PostRequest(Request.Method.POST,\n \"https://ide50-johadiep.legacy.cs50.io:8080/groups\", this,\n this);\n queue.add(request);\n }", "public PersonRecord(){\n\t\tlistNames = new ArrayList<String>();\n\t}", "public GroupCreateBean() {\n\t\tsuper();\n\t\tthis.initializeNumbers();\t\t\n\t}", "@Override\n public void cacheGroupsAdd(List<String> groups) throws IOException {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.726 -0500\", hash_original_method = \"9948141C64D53CA8E17E7FD2EBA08DA8\", hash_generated_method = \"CD57B10B47E4384F9C72F867F5045C16\")\n \nprivate GroupMembership() {}", "@Override\n public void cacheGroupsAdd(List<String> groups) throws IOException {\n for(String group: groups) {\n if(group.length() == 0) {\n // better safe than sorry (should never happen)\n } else if(group.charAt(0) == '@') {\n if(!NetgroupCache.isCached(group)) {\n NetgroupCache.add(group, getUsersForNetgroup(group));\n }\n } else {\n // unix group, not caching\n }\n }\n }", "public void addGroup(String groupName) throws UnsupportedOperationException;", "public MotorGroup(Motor... motors) {\n\t\tfor (Motor motor : motors) {\n\t\t\tsuper.add(motor);\n\t\t}\n\t}", "@Override\r\n\tpublic void update(List<GroupMember> list) {\n\t\tif(list == null) return;\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t\tupdate(list.get(i));\r\n\t}", "public final void rule__AstConstructor__Group_2_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7461:1: ( ( ( rule__AstConstructor__MembersAssignment_2_1_1 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7462:1: ( ( rule__AstConstructor__MembersAssignment_2_1_1 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7462:1: ( ( rule__AstConstructor__MembersAssignment_2_1_1 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7463:1: ( rule__AstConstructor__MembersAssignment_2_1_1 )\n {\n before(grammarAccess.getAstConstructorAccess().getMembersAssignment_2_1_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7464:1: ( rule__AstConstructor__MembersAssignment_2_1_1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7464:2: rule__AstConstructor__MembersAssignment_2_1_1\n {\n pushFollow(FOLLOW_rule__AstConstructor__MembersAssignment_2_1_1_in_rule__AstConstructor__Group_2_1__1__Impl15437);\n rule__AstConstructor__MembersAssignment_2_1_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstConstructorAccess().getMembersAssignment_2_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public DataNormalizerImpl (String... groupLabels) {\n\t\tthis.groupLabels = groupLabels;\n\t}", "public void newGroup() {\n addGroup(null, true);\n }", "public static GroupMembers createEntity() {\n GroupMembers groupMembers = new GroupMembers()\n .groupId(DEFAULT_GROUP_ID)\n .subscriptionId(DEFAULT_SUBSCRIPTION_ID)\n .msisdn(DEFAULT_MSISDN)\n .groupRole(DEFAULT_GROUP_ROLE)\n .endReasonCode(DEFAULT_END_REASON_CODE)\n .remarks(DEFAULT_REMARKS)\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .createdDate(DEFAULT_CREATED_DATE)\n .createdBy(DEFAULT_CREATED_BY)\n .lastUpdatedDate(DEFAULT_LAST_UPDATED_DATE)\n .lastUpdatedBy(DEFAULT_LAST_UPDATED_BY)\n .tenantId(DEFAULT_TENANT_ID);\n return groupMembers;\n }", "@SuppressWarnings(\"serial\")\n\tpublic Member addMember(final String name,final String group,Boolean force_unique) throws Exception{\n\t\tif(force_unique)\n\t\t\tdelAllMember(name);\n\t\tGroup grp=addGroup(group);\t\t\n\t\treturn Member.findOrCreate(grp,new HashMap<String, String>(){{\n\t\t\tput(\"username\",name);\n\t\t}});\t\t\t\t\n\t}", "public StudentGroup(int length) {\r\n\t\tthis.students = new Student[length];\r\n\t}", "public Builder members(Collection collection) {\n return set(\"members\", collection);\n }", "private void editValidItems(GroupOwnerModel group, String[] grps) {\r\n\t\tgroup.setGroupNameList(new ArrayList<String>());\r\n\t\tfor(String str:grps){\r\n\t\t\t for(SelectItem item: groupOwnerModel.getGroupSelectList()){\r\n\t\t\t\tif(str.trim().equalsIgnoreCase(item.getLabel())){\r\n\t\t\t\t\tgroup.getGroupNameList().add(item.getValue().toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main (String[] arg){\n\n Student student1 = new Student();\n Student student2 = new Student(12345,\"Anh\",\"Pham\");\n Student student3 = new Student(27485,\"New\",\"Student\");\n\n System.out.println(student1);\n System.out.println(student2);\n System.out.println(student3);\n\n //Test Student Group\n long groupCode = 123456;\n Student contactStudent = new Student(987654,\"HyHy\",\"Phan\");\n List<Student> studentList = new ArrayList<>();\n\n StudentGroup newGroup = new StudentGroup(groupCode, contactStudent, studentList);\n newGroup.getInfo();\n newGroup.addStudent(student2);\n newGroup.addStudent(student3);\n newGroup.getInfo();\n }", "private NameBuilderGroup(int groupNumber, String minimalWidth) {\r\n\t\t\tthis.groupNumber = groupNumber;\r\n\t\t\tthis.minimalWidth = minimalWidth;\r\n\t\t}", "private static void initializeNames() {\n _names.add(\"Raymond\");\n _names.add(\"Mia\");\n _names.add(\"Maximus\");\n _names.add(\"Thomas\");\n _names.add(\"Candice\");\n\n _names.add(\"Maggie\");\n _names.add(\"Grant\");\n _names.add(\"Joni\");\n _names.add(\"Shirley\");\n _names.add(\"Alaska\");\n\n _names.add(\"Alice\");\n _names.add(\"Bob\");\n _names.add(\"Clark\");\n _names.add(\"Bill\");\n _names.add(\"Mike\");\n\n _names.add(\"Sara\");\n _names.add(\"Jim\");\n _names.add(\"Laura\");\n _names.add(\"Steve\");\n _names.add(\"Chris\");\n }", "private void init(){\n //Get instance of Members to access Members Lists\n Members members = Members.getInstance();\n \n //add to patient members list\n members.getPatients().addMember(this);\n }", "private boolean checkMembers(ArrayList <String> group1, ArrayList <String> group2) {\n\t\tCollections.sort(group1);\n\t\tCollections.sort(group2);\n\t\treturn(group1.equals(group2));\n\t}", "public final void rule__XConstructorCall__Group__4__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13882:1: ( ( ( rule__XConstructorCall__Group_4__0 )? ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13883:1: ( ( rule__XConstructorCall__Group_4__0 )? )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13883:1: ( ( rule__XConstructorCall__Group_4__0 )? )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13884:1: ( rule__XConstructorCall__Group_4__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXConstructorCallAccess().getGroup_4()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13885:1: ( rule__XConstructorCall__Group_4__0 )?\r\n int alt89=2;\r\n alt89 = dfa89.predict(input);\r\n switch (alt89) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13885:2: rule__XConstructorCall__Group_4__0\r\n {\r\n pushFollow(FOLLOW_rule__XConstructorCall__Group_4__0_in_rule__XConstructorCall__Group__4__Impl28172);\r\n rule__XConstructorCall__Group_4__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXConstructorCallAccess().getGroup_4()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void setOtherMembers(String value) {\r\n \r\n \t\t_otherMembersList = new ArrayList<String>();\r\n \r\n \t\tif (value.matches(\"\"))\r\n \t\t\treturn;\r\n \r\n \t\tLog.d(\"DEBUG\", value);\r\n \r\n \t\tString[] others = value.split(\"(\\\\s+)?,(\\\\s+)?\");\r\n \r\n \t\tfor (String member : others) {\r\n \t\t\t_otherMembersList.add(member);\r\n \t\t}\r\n \r\n \t\tCollections.sort(_otherMembersList);\r\n \t}", "public final void rule__AstMemberAccess__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21952:1: ( ( ( rule__AstMemberAccess__NameAssignment_1 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21953:1: ( ( rule__AstMemberAccess__NameAssignment_1 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21953:1: ( ( rule__AstMemberAccess__NameAssignment_1 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21954:1: ( rule__AstMemberAccess__NameAssignment_1 )\n {\n before(grammarAccess.getAstMemberAccessAccess().getNameAssignment_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21955:1: ( rule__AstMemberAccess__NameAssignment_1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21955:2: rule__AstMemberAccess__NameAssignment_1\n {\n pushFollow(FOLLOW_rule__AstMemberAccess__NameAssignment_1_in_rule__AstMemberAccess__Group__1__Impl43983);\n rule__AstMemberAccess__NameAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstMemberAccessAccess().getNameAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "PersonGroupListAdapter() {\n personGroupIdList = new ArrayList<>();\n\n Set<String> personGroupIds\n = StorageHelper.getAllPersonGroupIds(MainActivity.this);\n\n for (String personGroupId: personGroupIds) {\n personGroupIdList.add(personGroupId);\n if (mPersonGroupId != null && personGroupId.equals(mPersonGroupId)) {\n personGroupIdList.set(\n personGroupIdList.size() - 1,\n mPersonGroupListAdapter.personGroupIdList.get(0));\n mPersonGroupListAdapter.personGroupIdList.set(0, personGroupId);\n }\n }\n }", "public void setJoinedGroups(List<Group> joinedGroups) {\n this.joinedGroups = joinedGroups;\n }", "protected VoltexGroup() {\n\t\tsuper();\n\t}", "interface WithMembers {\n /**\n * Specifies members.\n * @param members Members of the target group\n * @return the next update stage\n */\n Update withMembers(List<JobTarget> members);\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic void buildMemberSummary(List elements) throws Exception {\n\t\tCustomMemberSummaryBuilder.getInstance(writer, configuration, targetContractMap).build(elements);\n\n\t\twriter.completeMemberSummaryBuild();\n\t}", "public StudentGroup(int length) {\n\t\tthis.students = new Student[length];\n\t}", "public final void rule__XConstructorCall__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9532:1: ( ( ( rule__XConstructorCall__Group_3__0 )? ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9533:1: ( ( rule__XConstructorCall__Group_3__0 )? )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9533:1: ( ( rule__XConstructorCall__Group_3__0 )? )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9534:1: ( rule__XConstructorCall__Group_3__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXConstructorCallAccess().getGroup_3()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9535:1: ( rule__XConstructorCall__Group_3__0 )?\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==20) ) {\n alt61=1;\n }\n switch (alt61) {\n case 1 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9535:2: rule__XConstructorCall__Group_3__0\n {\n pushFollow(FOLLOW_rule__XConstructorCall__Group_3__0_in_rule__XConstructorCall__Group__3__Impl19218);\n rule__XConstructorCall__Group_3__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXConstructorCallAccess().getGroup_3()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "void initializeGroup(GroupType group)\n throws IllegalArgumentException, UnsupportedOperationException;", "public Builder(final Collection<String> names) {\n this.names.addAll(Validator.of(names).get());\n }", "@Override\r\n\tpublic Map<String, MemberDto> nameList() {\n\t\tMap<String, MemberDto> list = new HashMap<>();\r\n\t\tfor (String email : emailList()) {\r\n\t\t\tlist.put(email, myInfo(email));\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public NcrackClient usingUsernameList(Collection<String> usernameList) {\n this.usernameList = ImmutableList.copyOf(usernameList);\n return this;\n }", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public GroupValidator()\n {\n this(new HashMap<Object, IValidator>());\n }", "@Override\n\tpublic void gotMember(Member member) {\n\t\tDebug.log(\"netbeansgui.GroupPanel\",Debug.DEBUG,\"Tab for \" + groupName + \" got member \" + member);\n\t\t((DefaultListModel)nodeList.getModel()).addElement(member);\n\t\t//nodeList.repaint();\n\t\tappend(String.format(\">>> %s joined group (%s)\",member.getName(),member.getID()));\n\t}", "public void addListMembers(String cat, String[] inputs) {\n clearKeyCategory(cat);\n int i = 0;\n\n for (String v : inputs) {\n setProperty(cat + keyDigs.format(i++), v);\n }\n }", "public final void rule__XConstructorCall__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13781:1: ( rule__XConstructorCall__Group__1__Impl rule__XConstructorCall__Group__2 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13782:2: rule__XConstructorCall__Group__1__Impl rule__XConstructorCall__Group__2\r\n {\r\n pushFollow(FOLLOW_rule__XConstructorCall__Group__1__Impl_in_rule__XConstructorCall__Group__127959);\r\n rule__XConstructorCall__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XConstructorCall__Group__2_in_rule__XConstructorCall__Group__127962);\r\n rule__XConstructorCall__Group__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\n public void Mesibo_onGroupCreated(MesiboProfile profile) {\n toast(\"New Group Created: \" + profile.getName());\n addGroupMembers(profile);\n }", "public final void rule__XConstructorCall__Group__3__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13853:1: ( ( ( rule__XConstructorCall__Group_3__0 )? ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13854:1: ( ( rule__XConstructorCall__Group_3__0 )? )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13854:1: ( ( rule__XConstructorCall__Group_3__0 )? )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13855:1: ( rule__XConstructorCall__Group_3__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXConstructorCallAccess().getGroup_3()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13856:1: ( rule__XConstructorCall__Group_3__0 )?\r\n int alt88=2;\r\n alt88 = dfa88.predict(input);\r\n switch (alt88) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13856:2: rule__XConstructorCall__Group_3__0\r\n {\r\n pushFollow(FOLLOW_rule__XConstructorCall__Group_3__0_in_rule__XConstructorCall__Group__3__Impl28111);\r\n rule__XConstructorCall__Group_3__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXConstructorCallAccess().getGroup_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XListLiteral__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:9090:1: ( rule__XListLiteral__Group__0__Impl rule__XListLiteral__Group__1 )\r\n // InternalDroneScript.g:9091:2: rule__XListLiteral__Group__0__Impl rule__XListLiteral__Group__1\r\n {\r\n pushFollow(FOLLOW_64);\r\n rule__XListLiteral__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XListLiteral__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private List<Expression<?>> constructGroupBy(CriteriaBuilderImpl cb, AbstractQuery<?> q, Tree groupByDef) {\n \t\tfinal List<Expression<?>> groupBy = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < groupByDef.getChildCount(); i++) {\n \t\t\tgroupBy.add(this.getExpression(cb, q, groupByDef.getChild(i), null));\n \t\t}\n \n \t\treturn groupBy;\n \t}", "public static void initializeGroupMember(Group group){\n\t\tHibernate.initialize(group.getGroupMembers());\n\t}", "@Override\r\n\tpublic void remove(List<GroupMember> list) {\n\t\tfor(int i = 0;i<list.size();i++)\r\n\t\t\tremove(list.get(i));\r\n\t}", "protected void addMember(MondrianMember member) {\r\n aMembers.add(member);\r\n }", "public Person(String name, ArrayList<String> pnArray) {\n\n\t}", "public final void rule__XConstructorCall__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9460:1: ( rule__XConstructorCall__Group__1__Impl rule__XConstructorCall__Group__2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9461:2: rule__XConstructorCall__Group__1__Impl rule__XConstructorCall__Group__2\n {\n pushFollow(FOLLOW_rule__XConstructorCall__Group__1__Impl_in_rule__XConstructorCall__Group__119066);\n rule__XConstructorCall__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XConstructorCall__Group__2_in_rule__XConstructorCall__Group__119069);\n rule__XConstructorCall__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public String getGroupNamesAsString() {\n return String.format(\"%s\", StringUtils.join(getGroupNames(), \", \"));\n }", "@Override\n public int getGroupCount() {\n return groupNames.length;\n }" ]
[ "0.6991033", "0.68001735", "0.66040933", "0.63827395", "0.6073352", "0.6045", "0.5961561", "0.5916693", "0.5881474", "0.58401513", "0.58175874", "0.5770955", "0.5629205", "0.5625299", "0.562128", "0.55707455", "0.55690706", "0.55620044", "0.54686666", "0.54011893", "0.5345389", "0.53384763", "0.53251976", "0.53036064", "0.5299672", "0.52974755", "0.52926946", "0.5279574", "0.5279574", "0.5252385", "0.52179384", "0.520694", "0.5196285", "0.5193547", "0.5181466", "0.51813245", "0.51774156", "0.5173726", "0.5167041", "0.5156383", "0.5156383", "0.5121743", "0.5103294", "0.50954664", "0.50930035", "0.5090727", "0.50827587", "0.5079007", "0.50682914", "0.50658816", "0.5058831", "0.5057533", "0.504237", "0.5041211", "0.5035079", "0.50175035", "0.50154704", "0.5012015", "0.49924424", "0.49766943", "0.4971914", "0.4969172", "0.49612486", "0.49599886", "0.49530068", "0.49472097", "0.4945568", "0.49429357", "0.49355796", "0.49345914", "0.4933323", "0.49136198", "0.49071833", "0.49053293", "0.49017507", "0.48953032", "0.48833507", "0.48771107", "0.48707056", "0.48699", "0.48617285", "0.48580316", "0.4857922", "0.48522878", "0.48468554", "0.48435518", "0.48389566", "0.4838833", "0.48357406", "0.4830596", "0.4829633", "0.48288134", "0.48284167", "0.48199388", "0.48162553", "0.48141676", "0.48077932", "0.48044807", "0.479064", "0.47842917" ]
0.6981538
1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_recipe3, container, false); ArrayList<Review_data> review_list = new ArrayList<>(); review_list.clear(); review_view = (ListView)rootView.findViewById(R.id.recipe_review_list); HashMap re_map= ((Recipe_Info)Recipe_Info.context_main).review_map_key; HashMap re_map_data; for(Object key: re_map.keySet()){ re_map_data = (HashMap)re_map.get(key); Review_data review_data = new Review_data(); review_data.setdata(re_map_data.get("name").toString(),(String)re_map_data.get("text").toString(), Float.parseFloat(String.valueOf(re_map_data.get("star"))),re_map_data.get("date").toString()); review_list.add(review_data); } listAdapter = new ListAdapter(getActivity(),R.layout.review_layout,review_list); review_view.setAdapter(listAdapter); return rootView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public HttpUrlFetcher(Call.Factory factory) { super(factory); Intrinsics.checkParameterIsNotNull(factory, "callFactory"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_6349() {\r\n super.method_6349();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void method_6191() {\r\n super.method_6191();\r\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}", "@Override\n protected void prot() {\n }", "@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 einkaufen() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void dosomething2() {\n\t\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void c(int paramInt)\r\n/* 101: */ {\r\n/* 102:122 */ this.b = false;\r\n/* 103:123 */ super.c(paramInt);\r\n/* 104: */ }", "public int b()\r\n/* 45: */ {\r\n/* 46: 58 */ g();\r\n/* 47: */ \r\n/* 48: 60 */ return super.b();\r\n/* 49: */ }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public void avvia() {\n /** invoca il metodo sovrascritto della superclasse */\n super.avvia();\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "@Override\n public void b() {\n }", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "@Override\r\n public void salir() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void preorder() {\n\n\t}", "private stendhal() {\n\t}", "public void doSomething() {\n Outer.this.doSomething();\r\n // this stops the pretty printer and gives an\r\n //parser exception (stumbling over the .super)\r\n Outer.super.doSomething();\r\n }", "@Override\n\tpublic void deneme() {\n\t\tsuper.deneme();\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void preRun() {\n super.preRun();\n }", "public abstract void mo70713b();", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "protected void h() {}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "public void method_4270() {}", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "@Override\n protected void initialize() \n {\n \n }", "public void callP(){\n super.walks(\"called parent method\");\n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n protected void initialize() {\n\n \n }" ]
[ "0.7415376", "0.7120564", "0.7120564", "0.7120564", "0.71153504", "0.70223135", "0.7006699", "0.6959695", "0.69354844", "0.68295795", "0.6789057", "0.6759874", "0.6727165", "0.6727165", "0.6680012", "0.6670413", "0.6636899", "0.66286534", "0.6619911", "0.6605483", "0.6603786", "0.65827864", "0.6582374", "0.6549963", "0.65440935", "0.6521893", "0.65033007", "0.64430153", "0.6418491", "0.6415374", "0.6402436", "0.6399175", "0.63874805", "0.6380345", "0.63703823", "0.636628", "0.6361068", "0.63538253", "0.6352187", "0.63364285", "0.6320418", "0.63070816", "0.63070816", "0.6295037", "0.629354", "0.629354", "0.6286359", "0.6273603", "0.6262495", "0.62398976", "0.622353", "0.6220281", "0.62041765", "0.61982226", "0.61772496", "0.6173603", "0.61712366", "0.6169294", "0.6160802", "0.6130551", "0.61259943", "0.61221814", "0.6102809", "0.60933787", "0.6091748", "0.6089609", "0.6085169", "0.60627353", "0.6061544", "0.6055915", "0.60450166", "0.60438436", "0.60397464", "0.60341513", "0.60323876", "0.60323876", "0.60323876", "0.60323876", "0.60323876", "0.60323876", "0.60318136", "0.60297084", "0.6026534", "0.6025891", "0.6024079", "0.6018422", "0.6014384", "0.6010973", "0.60091984", "0.6001627", "0.5998774", "0.599578", "0.5995695", "0.5991061", "0.59895426", "0.59802836", "0.5971288", "0.5970281", "0.5967115", "0.59662133", "0.59614575" ]
0.0
-1
int[] a = null; a[0] = 0; lalalalalalalalala
public String t1() { return "111"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void l()\r\n/* 190: */ {\r\n/* 191:221 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 192:222 */ this.a[i] = null;\r\n/* 193: */ }\r\n/* 194: */ }", "public void l()\r\n/* 606: */ {\r\n/* 607:650 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 608:651 */ this.a[i] = null;\r\n/* 609: */ }\r\n/* 610:653 */ for (i = 0; i < this.b.length; i++) {\r\n/* 611:654 */ this.b[i] = null;\r\n/* 612: */ }\r\n/* 613: */ }", "void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }", "public static void mess( int[] a ) {\n for( int i = 0 ; i<a.length; i++ )\n a[i] = 0;\n }", "public static void mess( int[] a ) {\n for( int i = 0 ; i<a.length; i++ )\n a[i] = 0;\n }", "public static void mess( int[] a ) {\n\tfor( int i = 0 ; i<a.length; i++ )\n\t a[i] = 0;\n }", "public static void mess( int[] a ) {\n\tfor( int i = 0 ; i<a.length; i++ )\n\t a[i] = 0;\n }", "public void aendereWertFunktioniert(int[] arr) {\n\t\tif (arr.length > 0)\n\t\t\tarr[0] = 0;\n\t}", "public void init(int[] a){\n this.array = a;\n moves = 0; \n }", "public void initializeArray(){\n if(topOfStack==-1){\n for(int i=0;i<this.arr.length;i++){\n this.arr[i]=Integer.MIN_VALUE;\n }\n }\n }", "private static void test() {\n\t\tint i = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[++i] = 0;\n\t\tprintArray(arr);\n\t\ti = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[i++] = 0;\n\t\tprintArray(arr);\n\t\t\n\t}", "Array() {\n\t\tarray = new int[0];\n\t}", "private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }", "public static void main(String[] args) {\nint[] a= new int[10];\nfor(int i=0;i<10;i++) {\na[i]=i;\n}\nfor(int i=0;i<10;i++) {\n\tSystem.out.println(a[i]);\n}\n\n}", "private static void modifyArray(int[] array) {\n\t\t\n\t\tarray[0] = 99;\n\t\t\n\t\tarray = new int[5] ;\n\t\treturn;\n\t}", "private static void test3(int[] arr) {\r\n\t\tarr[0]=999;\r\n\t\tarr[1]= 998;\r\n\t}", "public final void a() {\n this.j = null;\n this.f = 0;\n this.e = 0;\n this.d = 0;\n this.c = 0;\n this.b = 0;\n this.a = 0;\n this.g = null;\n synchronized (i) {\n if (h != null) {\n this.j = h;\n }\n h = this;\n }\n }", "public V[] tilArray(V[] a) {\n Node node = listehode;\n\n if (node.neste == null) {\n return null;\n } else {\n for (int i = 0; i < antall; i++) {\n a[i] = (V) node.neste.verdi;\n node = node.neste;\n }\n }\n return a;\n }", "@Override\n public void sort(int[] a) {\n a[0] = 0;\n a[a.length - 1] = 0;\n }", "void mo12207a(int[] iArr);", "@Test\n\tpublic void testSortNullArray() {\n\t\tint[] array = null;\n\t\tAssert.assertNull(array);\n\t}", "public static int noNull(Comparable[] c)\n/* */ {\n/* 112 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "public void m13494a(@Nullable int[] iArr) {\n this.f10761d = iArr;\n }", "public void a(int paramInt, amj paramamj)\r\n/* 364: */ {\r\n/* 365:385 */ amj[] arrayOfamj = this.a;\r\n/* 366:386 */ if (paramInt >= arrayOfamj.length)\r\n/* 367: */ {\r\n/* 368:387 */ paramInt -= arrayOfamj.length;\r\n/* 369:388 */ arrayOfamj = this.b;\r\n/* 370: */ }\r\n/* 371:391 */ arrayOfamj[paramInt] = paramamj;\r\n/* 372: */ }", "private void counter(int[] a){\r\n\t\tboard[a[0]][a[1]] = 'O';\r\n\t\ta[0] = -1; \r\n\t\ta[1] = -1;\r\n\t}", "public int[] reduceInit() {\n return null;\n }", "public final void mo3390a(int i) {\n Class<C0663j4> cls = C0663j4.class;\n if (i == 8) {\n synchronized (cls) {\n Object[] objArr = f2823g;\n if (objArr != null) {\n this.f2826c = objArr;\n f2823g = (Object[]) objArr[0];\n this.f2825b = (int[]) objArr[1];\n objArr[1] = null;\n objArr[0] = null;\n f2824h--;\n return;\n }\n }\n } else if (i == 4) {\n synchronized (cls) {\n Object[] objArr2 = f2821e;\n if (objArr2 != null) {\n this.f2826c = objArr2;\n f2821e = (Object[]) objArr2[0];\n this.f2825b = (int[]) objArr2[1];\n objArr2[1] = null;\n objArr2[0] = null;\n f2822f--;\n return;\n }\n }\n }\n this.f2825b = new int[i];\n this.f2826c = new Object[(i << 1)];\n }", "public void setArray(int i, Array x);", "private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }", "private static void testPassByReference(int[] input) {\n if (input.length > 0) {\n input[0] = 5;\n }\n }", "void setNilScansArray(int i);", "public void n()\r\n/* 515: */ {\r\n/* 516:523 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 517:524 */ if (this.a[i] != null)\r\n/* 518: */ {\r\n/* 519:525 */ this.d.a(this.a[i], true, false);\r\n/* 520:526 */ this.a[i] = null;\r\n/* 521: */ }\r\n/* 522: */ }\r\n/* 523:529 */ for (i = 0; i < this.b.length; i++) {\r\n/* 524:530 */ if (this.b[i] != null)\r\n/* 525: */ {\r\n/* 526:531 */ this.d.a(this.b[i], true, false);\r\n/* 527:532 */ this.b[i] = null;\r\n/* 528: */ }\r\n/* 529: */ }\r\n/* 530: */ }", "public void k()\r\n/* 238: */ {\r\n/* 239:258 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 240:259 */ if (this.a[i] != null) {\r\n/* 241:260 */ this.a[i].a(this.d.o, this.d, i, this.c == i);\r\n/* 242: */ }\r\n/* 243: */ }\r\n/* 244: */ }", "void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }", "public synchronized void mo1000a() {\n for (int i = 0; i < this.f506b; i++) {\n this.f505a[i] = null;\n }\n this.f506b = 0;\n }", "public void mo105475a() {\n this.f83728b = null;\n this.f83729c = 0;\n }", "private static void fillArray(int[][] array) {\n for (int i = 0; i < array.length; i++)\n for (int j = 0; j < array[i].length; j++)\n array[i][j] = i + j;\n\n // The following lines do nothing\n array = new int[1][1];\n array[0][0] = 239;\n }", "One(){\n data = new int[DEFAULT_CAPACITY];\n }", "private static boolean arrayAccess_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"arrayAccess_0\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NOT_);\n r = !arrayAccess_0_0(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "private void reset(){\n int j=0;\n for(int i=0; i<array.length; i++){\n if(j == itemCount) {return;}\n if(array[i]!=null){\n temp[j] = array[i];\n j++;\n }\n }\n }", "public LlvmValue visit(ArrayLookup n) {\n return null;\n }", "public static void main(String[] args) {\n\t\tint arr[]=new int[5];\r\n\t\tfor(int i=0;i<5;i++){\r\n\t\t\tarr[i]=i;\r\n\t\t}\r\n\t\tArrays.fill(arr,1,4,9);\r\n\t\r\nfor(int i=0;i<5;i++){\r\n\tSystem.out.println(arr[i]);\r\n}\r\n}", "public void fillArrayWithNeg1(){\n\t\t\n\t\tArrays.fill(this.theArray, \"-1\");\n\t\t\n\t}", "public static void main(String[] args){\n\t\tint[] anArray;\n\t\tanArray = new int[10];\n\t\t\n\t\tanArray[1] = 10;\n\t}", "public void resetChangeableArrays(int[] reg)\n {\n valList = new LinkedList<Integer>();\n possibilityList = new LinkedList<Point>();\n for(int j = 0; j<accumulator.length; j ++)Arrays.fill(accumulator[j],0);\n //accumulator = zeroAccumulator;\n region = reg;\n \n }", "public void set(int[] ai);", "public int j()\r\n/* 60: */ {\r\n/* 61: 79 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 62: 80 */ if (this.a[i] == null) {\r\n/* 63: 81 */ return i;\r\n/* 64: */ }\r\n/* 65: */ }\r\n/* 66: 84 */ return -1;\r\n/* 67: */ }", "public static int main(int[] a){\n return 0;\n }", "public final void a() {\n this.b = -1;\n this.c = Integer.MIN_VALUE;\n this.d = false;\n this.e = false;\n }", "Array(int x) {\n\t\tarray = new int[x];\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = 0; // make each index 0\n\t\t}\n\t}", "public static void clear (int []n) {\n\t\tfor (int i = 0; i < n.length; i++) {\n\t\t\tn[i] = 0;\n\t\t}\n\t}", "public int[] captureCodeFragment07(int[] a) {\r\n for (int i = 0; i < a.length / 2; i++) {\r\n int temp = a[i];\r\n a[i] = a[a.length - 1 - i];\r\n a[a.length - 1 - i] = temp;\r\n }\r\n return a;\r\n }", "@Override\n\t\tpublic <T> T[] toArray(T[] a) {\n\t\t\treturn null;\n\t\t}", "public void b() {\n/* 134 */ for (int i = 0; i < this.b; i++)\n/* 135 */ this.c[i] = false; \n/* */ }", "int[] mo12208a(int i);", "public void mo33816a() {\n this.f15942j = null;\n }", "private void doClear( )\n {\n occupied = 0;\n for( int i = 0; i < array.length; i++ )\n array[ i ] = null;\n }", "private void nullstillFordeling(){\n int i = indeks;\n politi = -1;\n mafiaer = -1;\n venner = -1;\n mafia.nullstillSpesialister();\n spillere.tømTommeRoller();\n for (indeks = 0; roller[indeks] == null; indeks++) ;\n fordeling = null;\n }", "public static void main(String[] args) {\n int jarr1[] = {}; //no error worked\n\n jarr[1] = 10; //error ArrayIndexOutOfboundException\n /* ethe apan array declare kartna as mention kelay array ha null ahe mhnu 0 size ch ahe\n ani next line la apan 1 index use kartoy mg te bound chya baher jat ahe mhnun runtime\n exception yetey\n */\n\n }", "public static int[] addElement(int[] a, int e) {\n\t a = Arrays.copyOf(a, a.length + 1);\n\t a[a.length - 1] = e;\n\t return a;\n\t}", "private void initialize(int[] arr) {\n a = ArraysUtils.sortAndRemoveDuplicates(arr);\n if (a.length != arr.length) {\n throw new IllegalArgumentException(\"Need unique list of numbers\");\n }\n numLeft = new BigInteger(total.toString());\n }", "protected static byte[] m5339a(byte[] bArr, int i) {\n if (bArr == null || bArr.length == 0) {\n return null;\n }\n int indexOf = new String(bArr).indexOf(0);\n if (indexOf <= 0) {\n i = 1;\n } else if (indexOf + 1 <= i) {\n i = indexOf + 1;\n }\n byte[] bArr2 = new byte[i];\n System.arraycopy(bArr, 0, bArr2, 0, i);\n bArr2[i - 1] = (byte) 0;\n return bArr2;\n }", "@Override\n\tpublic <T> T[] toArray(T[] a) {\n\t\treturn null;\n\t}", "public LlvmValue visit(ArrayLength n) {\n return null;\n }", "public ulsinArray(int length) {\n intArr = new int[length];\n }", "@Override\r\n\tpublic <T> T[] toArray(T[] a) {\n\t\treturn null;\r\n\t}", "HRESULT SafeArrayPutElement(SAFEARRAY psa, LONG[] idx, Pointer pv);", "private native int reset0(byte[] atr);", "void mo3807a(C0985po[] poVarArr);", "Integer[] removeNullElements(Integer[] array);", "public void setArr(int[] arr){ this.arr = arr; }", "void setNilArrayOfFaultTypeArray(int i);", "public void pocetHran(int pocet){\n\t\tthis.hrana = new Hrana[pocet];\n\t\tfor(int i = 0;i < hrana.length ; i++ ){\n\t\t\thrana[i] = null;\n\t\t}\n\t}", "public BaseArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }", "public void testCrearArrayNoEspecificado(int size) {\n\t\tint[] array = new int[size]; //tempLocal = 1\n\t}", "public static void intercambiar(int []Grado1, int ii, int jj){\nint aux=Grado1[ii];\nGrado1[ii]= Grado1[jj];\nGrado1[jj]=aux;\n}", "public WeetArray() {\n count = 0;\n nullCount = 0;\n }", "@Test\n public void testNullArray()\n {\n assertNull(ArrayFlattener.flattenArray(null));\n }", "public void setNilArrayOfValuationAggregate1()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1 target = null;\r\n target = (com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1)get_store().find_element_user(ARRAYOFVALUATIONAGGREGATE1$0, 0);\r\n if (target == null)\r\n {\r\n target = (com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1)get_store().add_element_user(ARRAYOFVALUATIONAGGREGATE1$0);\r\n }\r\n target.setNil();\r\n }\r\n }", "public void incrementarArreglo() {\n int tamanio_actual = top + 1; // variable tamaño actual le asignamos el valor de la cima + 1\r\n int[] new_array = new int[tamanio_actual * 2]; // al nuevo arreglo le asignamos el tamaño actual multiplicado por 2\r\n for(int i=0; i<tamanio_actual; i++){ \r\n new_array[i] = array[i]; // ciclo para ir asignando los valores existentes al nuevo arreglo\r\n }\r\n array = new_array; //referenciamos al nuevo arreglo\r\n capacidad = new_array.length; // variable capacidad le damos el valor de la longitud del nuevo arreglo\r\n }", "FunWithArrays(int size){\r\n\t\tnumbers = new int[size];\r\n\t}", "public int[] increaseBy2(int[] arr) {\n return null;\n }", "public void mo4637a(int i) {\n this.f2766a.bindNull(i);\n }", "public Set(){\n setSet(new int[0]);\n }", "public PilaEnterosArray() {\n\t\ttop = -1;\n\t}", "private int[] reset() {\n return data;\n }", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "public static int unique(int[] a) {\n\t\treturn unique(a,0,a.length);\n\t}", "@Override\n public String visit(ArrayInitializerExpr n, Object arg) {\n return null;\n }", "@Override\n\tpublic int[] toArray() {\n\t\treturn null;\n\t}", "Array(int[] n) {\n\t\tarray = n;\n\t}", "public ArrayIns(int max) // constructor\r\n {\r\n a = new long[max]; // create the array\r\n nElems = 0; // no items yet\r\n }", "public static void main(String[] args) \n\t{\n\t\tint a[][];\n\t\t\n\t}", "public static void warmUp(int[] arr) {\n arr[0] = 5;\n \n // arr = 3af -> [0,2,3]\n }", "public static void linearFillArray(int[] array) {\n\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = i;\n\t\t}\n\n\t}", "public void a(int paramInt, ItemStack paramamj)\r\n/* 61: */ {\r\n/* 62: 76 */ this.a[paramInt] = paramamj;\r\n/* 63: 77 */ if ((paramamj != null) && (paramamj.stackSize > p_())) {\r\n/* 64: 78 */ paramamj.stackSize = p_();\r\n/* 65: */ }\r\n/* 66: */ }", "public static void arrayDemo() {\n\t}", "public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}", "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 m146984b(C47008ac acVar) {\n if (this.f120643a == null) {\n this.f120643a = acVar;\n }\n if (this.f120644b == null) {\n this.f120644b = acVar;\n }\n }", "public void mo33816a() {\n this.f15330j = null;\n }" ]
[ "0.7517288", "0.6932732", "0.67371535", "0.67232054", "0.67232054", "0.6707203", "0.6707203", "0.6463264", "0.6453872", "0.6276032", "0.62591195", "0.62420297", "0.6216225", "0.6150016", "0.6012181", "0.5910668", "0.59086055", "0.5896112", "0.587971", "0.5845249", "0.5842951", "0.581822", "0.58138955", "0.5799437", "0.57975173", "0.5759584", "0.5759128", "0.5757106", "0.57461077", "0.57106614", "0.5690644", "0.56585926", "0.56553066", "0.56301546", "0.56231976", "0.5615251", "0.5615104", "0.56084806", "0.5604985", "0.557657", "0.55724746", "0.55594605", "0.555106", "0.55386937", "0.5534116", "0.5527204", "0.551994", "0.55137616", "0.5512511", "0.5504631", "0.54954535", "0.54937017", "0.54926234", "0.54883313", "0.54862535", "0.5483766", "0.5462545", "0.5454098", "0.54477894", "0.5437467", "0.5433661", "0.542099", "0.54204047", "0.5411526", "0.541008", "0.5397374", "0.53909683", "0.5387479", "0.5387229", "0.53816414", "0.5380855", "0.5379298", "0.536324", "0.5356162", "0.53547573", "0.535002", "0.53400093", "0.5336385", "0.53339", "0.5331799", "0.53274834", "0.5322225", "0.5318413", "0.5312908", "0.5307371", "0.5298805", "0.5292642", "0.52908105", "0.52886856", "0.52831066", "0.52732", "0.5272943", "0.5259874", "0.52494645", "0.52465534", "0.52364945", "0.5236095", "0.523268", "0.522447", "0.5223437", "0.5220596" ]
0.0
-1
Setup the grid layout manager
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { GridLayoutManager glm = new GridLayoutManager(getContext(), 2); mRecyclerView.setLayoutManager(glm); mRecyclerView.setHasFixedSize(true); // TODO: Create the adapter // TODO: Set the adapter to the adapter view }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupLayoutManager() {\n\n setLayout(new BorderLayout());\n add(directoryChooserPanel, BorderLayout.NORTH);\n add(splitPane, BorderLayout.CENTER);\n\n }", "private void setUpLayout() {\n\n this.setLayout(new GridLayout(7, 1, 40, 37));\n this.setBackground(new Color(72, 0, 0));\n this.setBorder(BorderFactory.createEmptyBorder(8, 150, 8, 150));\n }", "public void setupLayout() {\n // left empty for subclass to override\n }", "private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n }", "void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}", "private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }", "private void setLayout() {\n if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n recyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));\n\n } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));\n }\n }", "private void setupLayout() {\n this.setLayout(new BorderLayout());\n\t\tthis.setupConstraints();\n\n\t\tJPanel titleAuthorFields = new JPanel(new GridBagLayout());\n\t\ttitleAuthorFields.add(Pirex.inputField(titleLabel, titleTextField, null), cTitleField);\n\t\ttitleAuthorFields.add(Pirex.inputField(authorLabel, authorTextField, null), cAuthorField);\n\n\t\tJPanel inputFields = new JPanel(new GridLayout(3, 0));\n\t\tinputFields.add(Pirex.inputField(fileLabel, fileTextField, fileBrowseButton));\n\t\tinputFields.add(Pirex.inputField(fileTypeLabel, fileTypeComboBox, null));\n\t\tinputFields.add(titleAuthorFields);\n\t\tinputFields = Pirex.borderLayoutWrap(null, null, inputFields, null, separator);\n\n\t\tJPanel leftAlignedProcessButton = Pirex.leftAlign(processButton);\n\t\tJPanel processPanel = Pirex.borderLayoutWrap(leftAlignedProcessButton, null, summaryScrollPanel, null, null);\n\t\tJPanel loadTabPanel = Pirex.borderLayoutWrap(inputFields, null, processPanel, null, null);\n\n\t\tthis.add(Pirex.withBorder(loadTabPanel), BorderLayout.CENTER);\n\n }", "private void InitilizeGridLayout() {\n Resources r = getResources();\n float padding = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n Const.GRID_PADDING, r.getDisplayMetrics());\n\n // Column width\n columnWidth = (int) ((getScreenWidth() - ((4) * padding)) / 2);\n\n // Setting number of grid columns\n mGridView.setNumColumns(2);\n mGridView.setColumnWidth(columnWidth);\n mGridView.setStretchMode(GridView.NO_STRETCH);\n mGridView.setPadding((int) padding, (int) padding, (int) padding,\n (int) padding);\n\n // Setting horizontal and vertical padding\n mGridView.setHorizontalSpacing((int) padding);\n mGridView.setVerticalSpacing((int) padding);\n }", "private void setLayoutManager() {\r\n this.setLayout(new BorderLayout());\r\n }", "private void initialize() {\n GridBagConstraints gridBagConstraints21 = new GridBagConstraints();\n gridBagConstraints21.gridx = 0;\n gridBagConstraints21.weightx = 1.0D;\n gridBagConstraints21.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints21.gridy = 1;\n GridBagConstraints gridBagConstraints11 = new GridBagConstraints();\n gridBagConstraints11.gridx = 0;\n gridBagConstraints11.insets = new java.awt.Insets(2, 2, 2, 2);\n gridBagConstraints11.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints11.weightx = 1.0D;\n gridBagConstraints11.weighty = 1.0D;\n gridBagConstraints11.gridy = 2;\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0D;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n gridBagConstraints.gridy = 0;\n this.setLayout(new GridBagLayout());\n setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Manage Grid Map File\",\n javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,\n null, PortalLookAndFeel.getPanelLabelColor()));\n this.add(getGridMapFilePanel(), gridBagConstraints);\n this.add(getTablePanel(), gridBagConstraints11);\n this.add(getControlPanel(), gridBagConstraints21);\n }", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, new Dimension(100, 20), new Dimension(100, 20), new Dimension(100, 20), 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel2.add(buttonClose, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n messageLabel = new JLabel();\n messageLabel.setText(\"\");\n panel3.add(messageLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\r\n final JPanel panel1 = new JPanel();\r\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel = new JPanel();\r\n mMainPanel.setLayout(new GridLayoutManager(15, 3, new Insets(0, 0, 0, 0), -1, -1));\r\n panel1.add(mMainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n label = new JLabel();\r\n Font labelFont = this.$$$getFont$$$(null, -1, 28, label.getFont());\r\n if (labelFont != null) label.setFont(labelFont);\r\n label.setText(\"CodeRecommender\");\r\n mMainPanel.add(label, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer1 = new Spacer();\r\n mMainPanel.add(spacer1, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel2 = new JPanel();\r\n panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel2, new GridConstraints(4, 0, 6, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel3 = new JPanel();\r\n panel3.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n statement = new JTextArea();\r\n statement.setBackground(new Color(-12434103));\r\n statement.setColumns(0);\r\n statement.setEditable(false);\r\n statement.setEnabled(true);\r\n Font statementFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 15, statement.getFont());\r\n if (statementFont != null) statement.setFont(statementFont);\r\n statement.setText(\" In the current ai craze, we want to use neural network-related technology to grab a large amount of source code from the open source community to achieve the recommendation of the N+1 line of code from the known N lines of code, and package this function into a practical plug-in on the IDE.\");\r\n panel3.add(statement, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, 70), null, 1, false));\r\n final JPanel panel4 = new JPanel();\r\n panel4.setLayout(new GridLayoutManager(12, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.setBackground(new Color(-12828863));\r\n panel3.add(panel4, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n Download = new JButton();\r\n Font DownloadFont = this.$$$getFont$$$(null, -1, 12, Download.getFont());\r\n if (DownloadFont != null) Download.setFont(DownloadFont);\r\n Download.setText(\"Find\");\r\n panel4.add(Download, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel5 = new JPanel();\r\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel5, new GridConstraints(11, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"See the guide on the https://github.com/huangjihui511/java-code-recommand-IDEA-plugin \");\r\n panel5.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer2 = new Spacer();\r\n panel5.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n pathTextField = new JTextField();\r\n pathTextField.setEditable(false);\r\n Font pathTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, pathTextField.getFont());\r\n if (pathTextFieldFont != null) pathTextField.setFont(pathTextFieldFont);\r\n pathTextField.setText(\"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \");\r\n panel4.add(pathTextField, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SetPath = new JButton();\r\n Font SetPathFont = this.$$$getFont$$$(null, -1, 12, SetPath.getFont());\r\n if (SetPathFont != null) SetPath.setFont(SetPathFont);\r\n SetPath.setText(\"Set\");\r\n panel4.add(SetPath, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n Help = new JButton();\r\n Help.setText(\"Help\");\r\n panel4.add(Help, new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel6 = new JPanel();\r\n panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel6.setFocusTraversalPolicyProvider(false);\r\n panel6.setFocusable(false);\r\n panel4.add(panel6, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel7 = new JPanel();\r\n panel7.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel7, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label2 = new JLabel();\r\n label2.setIcon(new ImageIcon(getClass().getResource(\"/timg (1) - 副本.jpg\")));\r\n label2.setText(\"\");\r\n panel7.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JLabel label3 = new JLabel();\r\n label3.setIcon(new ImageIcon(getClass().getResource(\"/微信图片_20190328224952 (2) - 副本.jpg\")));\r\n label3.setText(\"\");\r\n panel7.add(label3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel8 = new JPanel();\r\n panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel7.add(panel8, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel9 = new JPanel();\r\n panel9.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel9, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n webaddressTextField = new JTextField();\r\n webaddressTextField.setEditable(false);\r\n Font webaddressTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, webaddressTextField.getFont());\r\n if (webaddressTextFieldFont != null) webaddressTextField.setFont(webaddressTextFieldFont);\r\n webaddressTextField.setText(\"/Volumes/PythonSupporting\");\r\n panel4.add(webaddressTextField, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n final JPanel panel10 = new JPanel();\r\n panel10.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel10, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label4 = new JLabel();\r\n Font label4Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label4.getFont());\r\n if (label4Font != null) label4.setFont(label4Font);\r\n label4.setText(\"Find the package\");\r\n panel10.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer3 = new Spacer();\r\n panel10.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel11 = new JPanel();\r\n panel11.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel11.setToolTipText(\"\");\r\n panel4.add(panel11, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label5 = new JLabel();\r\n Font label5Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label5.getFont());\r\n if (label5Font != null) label5.setFont(label5Font);\r\n label5.setText(\"Set the path\");\r\n panel11.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer4 = new Spacer();\r\n panel11.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel12 = new JPanel();\r\n panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel12, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel13 = new JPanel();\r\n panel13.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel13, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel14 = new JPanel();\r\n panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel14, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel15 = new JPanel();\r\n panel15.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel15, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n pic = new JPanel();\r\n pic.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.putClientProperty(\"html.disable\", Boolean.FALSE);\r\n panel3.add(pic, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n a = new JLabel();\r\n a.setText(\"\");\r\n pic.add(a, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel16 = new JPanel();\r\n panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel16, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel17 = new JPanel();\r\n panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel17, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel18 = new JPanel();\r\n panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel18, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer5 = new Spacer();\r\n mMainPanel.add(spacer5, new GridConstraints(5, 1, 10, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel19 = new JPanel();\r\n panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel19, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel20 = new JPanel();\r\n panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel20, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer6 = new Spacer();\r\n panel1.add(spacer6, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer7 = new Spacer();\r\n panel1.add(spacer7, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer8 = new Spacer();\r\n panel1.add(spacer8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n }", "private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }", "public void initLayouts() {\n\t\tJPanel p_header = (JPanel) getComponentByName(\"p_header\");\n\t\tJPanel p_container = (JPanel) getComponentByName(\"p_container\");\n\t\tJPanel p_tree = (JPanel) getComponentByName(\"p_tree\");\n\t\tJPanel p_commands = (JPanel) getComponentByName(\"p_commands\");\n\t\tJPanel p_execute = (JPanel) getComponentByName(\"p_execute\");\n\t\tJPanel p_buttons = (JPanel) getComponentByName(\"p_buttons\");\n\t\tJPanel p_view = (JPanel) getComponentByName(\"p_view\");\n\t\tJPanel p_info = (JPanel) getComponentByName(\"p_info\");\n\t\tJPanel p_chooseFile = (JPanel) getComponentByName(\"p_chooseFile\");\n\t\tJButton bt_apply = (JButton) getComponentByName(\"bt_apply\");\n\t\tJButton bt_revert = (JButton) getComponentByName(\"bt_revert\");\n\t\tJTextArea ta_header = (JTextArea) getComponentByName(\"ta_header\");\n\t\tJLabel lb_icon = (JLabel) getComponentByName(\"lb_icon\");\n\t\tJLabel lb_name = (JLabel) getComponentByName(\"lb_name\");\n\t\tJTextField tf_name = (JTextField) getComponentByName(\"tf_name\");\n\n\t\tBorder etched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);\n\n\t\tp_header.setBorder(etched);\n\t\tp_container.setBorder(etched);\n\t\tp_commands.setBorder(etched);\n\t\t// p_execute.setBorder(etched);\n\t\t// p_view.setBorder(etched);\n\t\t// p_buttons.setBorder(etched);\n\n\t\tp_buttons.setLayout(new FlowLayout(FlowLayout.LEFT, 25, 2));\n\t\tp_chooseFile.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 1));\n\t\tp_view.setLayout(new BorderLayout(0, 0));\n\t\tp_info.setLayout(null);\n\n\t\t// GroupLayout for main JFrame\n\t\t// If you want to change this, use something like netbeans or read more\n\t\t// into group layouts\n\t\tGroupLayout groupLayout = new GroupLayout(getContentPane());\n\t\tgroupLayout\n\t\t\t\t.setHorizontalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\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\tAlignment.LEADING)\n\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\tgroupLayout\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_commands,\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\t225,\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\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\tgroupLayout\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.LEADING)\n\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\tp_execute,\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\t957,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\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\tp_container,\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\t957,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\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\tp_header,\n\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\t1188,\n\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.addContainerGap()));\n\t\tgroupLayout\n\t\t\t\t.setVerticalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_header,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, 57,\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\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\tAlignment.LEADING)\n\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\tp_commands,\n\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\t603,\n\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.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_container,\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\t549,\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\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\tp_execute,\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\t48,\n\t\t\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.addContainerGap()));\n\n\t\tGroupLayout gl_p_container = new GroupLayout(p_container);\n\t\tgl_p_container\n\t\t\t\t.setHorizontalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\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\tAlignment.LEADING)\n\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\tp_view,\n\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\t955,\n\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.addGroup(\n\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\tgl_p_container\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt_apply)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\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\tbt_revert))\n\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\tgl_p_container\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlb_name)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\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\ttf_name,\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\t893,\n\t\t\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.addContainerGap()));\n\t\tgl_p_container\n\t\t\t\t.setVerticalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\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\tAlignment.BASELINE)\n\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\ttf_name,\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\t\tGroupLayout.DEFAULT_SIZE,\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.addComponent(lb_name))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_view,\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\t\t466, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\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\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_revert)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_apply))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(\n\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\tShort.MAX_VALUE)));\n\t\tp_container.setLayout(gl_p_container);\n\n\t\t// GroupLayout for p_header\n\n\t\tGroupLayout gl_p_header = new GroupLayout(p_header);\n\t\tgl_p_header.setHorizontalGroup(gl_p_header.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tAlignment.TRAILING,\n\t\t\t\tgl_p_header\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(ta_header, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t1069, Short.MAX_VALUE).addGap(18)\n\t\t\t\t\t\t.addComponent(lb_icon).addGap(4)));\n\t\tgl_p_header\n\t\t\t\t.setVerticalGroup(gl_p_header\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_header\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_header\n\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\tAlignment.BASELINE)\n\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\tta_header,\n\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\t44,\n\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.addComponent(lb_icon))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tp_header.setLayout(gl_p_header);\n\n\t\tGroupLayout gl_p_commands = new GroupLayout(p_commands);\n\t\tgl_p_commands\n\t\t\t\t.setHorizontalGroup(gl_p_commands\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_commands\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_commands\n\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\tAlignment.LEADING)\n\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\tp_tree,\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\t\t211,\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_buttons,\n\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\tGroupLayout.DEFAULT_SIZE,\n\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.addContainerGap()));\n\t\tgl_p_commands.setVerticalGroup(gl_p_commands.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tgl_p_commands\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(p_buttons, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.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(p_tree, GroupLayout.DEFAULT_SIZE, 558,\n\t\t\t\t\t\t\t\tShort.MAX_VALUE).addContainerGap()));\n\t\tp_commands.setLayout(gl_p_commands);\n\n\t\tgetContentPane().setLayout(groupLayout);\n\t}", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n toolBarPanel = new JPanel();\n toolBarPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(toolBarPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n containerPanel = new JPanel();\n containerPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(containerPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n errorPanel = new JPanel();\n errorPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(errorPanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n valuePanel = new JPanel();\n valuePanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(valuePanel, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"view as\");\n mainPanel.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboBox1 = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"UTF-8String\");\n comboBox1.setModel(defaultComboBoxModel1);\n mainPanel.add(comboBox1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}", "private void $$$setupUI$$$() {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n targetClassesTextField = new JTextField();\n panel.add(targetClassesTextField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel.add(spacer1, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n targetClassesLabel = new JLabel();\n targetClassesLabel.setText(\"Target classes\");\n panel.add(targetClassesLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n sourceDirTextField = new JTextField();\n panel.add(sourceDirTextField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n sourceDirLabel = new JLabel();\n sourceDirLabel.setText(\"Source dir\");\n panel.add(sourceDirLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n reportDirTextField = new JTextField();\n panel.add(reportDirTextField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n reportDirLabel = new JLabel();\n reportDirLabel.setText(\"Report dir\");\n panel.add(reportDirLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n otherParamsTextField = new JTextField();\n panel.add(otherParamsTextField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n otherParamsLabel = new JLabel();\n otherParamsLabel.setText(\"Other params\");\n panel.add(otherParamsLabel, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n content = new JPanel();\n content.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(content, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n tabbedPane1 = new JTabbedPane();\n content.add(tabbedPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n Gesture = new JPanel();\n Gesture.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n tabbedPane1.addTab(\"Gesture\", Gesture);\n final JLabel label1 = new JLabel();\n label1.setIcon(new ImageIcon(getClass().getResource(\"/reference/by_gesture.png\")));\n label1.setText(\"\");\n Gesture.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n }", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n materialFirstWordLabel = new JLabel();\n materialFirstWordLabel.setText(\"нет данных\");\n contentPane.add(materialFirstWordLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(10, -1), null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n materialMarkLabel = new JLabel();\n materialMarkLabel.setText(\" \");\n materialMarkLabel.setVerticalTextPosition(1);\n panel1.add(materialMarkLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialProfileLabel = new JLabel();\n materialProfileLabel.setText(\" \");\n materialProfileLabel.setVerticalTextPosition(3);\n panel1.add(materialProfileLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialSeparator = new JSeparator();\n panel1.add(materialSeparator, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n contentPane.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "private void setupLayout() {\r\n\t\tgetContentPane().add(panel);\r\n\t}", "private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }", "private void setupLayout()\n\t{\n\t\tbaseLayout.putConstraint(SpringLayout.NORTH, queryButton, 70, SpringLayout.NORTH, this);\n\t\tbaseLayout.putConstraint(SpringLayout.WEST, queryButton, 49, SpringLayout.WEST, this);\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagButton = new JButton();\n Font memberImportTagButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagButton.getFont());\n if (memberImportTagButtonFont != null) memberImportTagButton.setFont(memberImportTagButtonFont);\n memberImportTagButton.setText(\"导入选择的标签分组-取并集\");\n panel2.add(memberImportTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagRetainButton = new JButton();\n Font memberImportTagRetainButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagRetainButton.getFont());\n if (memberImportTagRetainButtonFont != null)\n memberImportTagRetainButton.setFont(memberImportTagRetainButtonFont);\n memberImportTagRetainButton.setText(\"导入选择的标签分组-取交集\");\n panel2.add(memberImportTagRetainButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportAllButton = new JButton();\n Font memberImportAllButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportAllButton.getFont());\n if (memberImportAllButtonFont != null) memberImportAllButton.setFont(memberImportAllButtonFont);\n memberImportAllButton.setText(\"导入所有关注公众号的用户\");\n panel2.add(memberImportAllButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionPanel = new JPanel();\n importOptionPanel.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(importOptionPanel, new GridConstraints(1, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionOpenIdCheckBox = new JCheckBox();\n importOptionOpenIdCheckBox.setEnabled(false);\n importOptionOpenIdCheckBox.setSelected(true);\n importOptionOpenIdCheckBox.setText(\"openId\");\n importOptionPanel.add(importOptionOpenIdCheckBox, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n importOptionPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n importOptionBasicInfoCheckBox = new JCheckBox();\n importOptionBasicInfoCheckBox.setText(\"昵称、性别等基本信息\");\n importOptionBasicInfoCheckBox.setToolTipText(\"每获取一条信息会花费一次每日接口调用量\");\n importOptionPanel.add(importOptionBasicInfoCheckBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n importOptionAvatarCheckBox = new JCheckBox();\n importOptionAvatarCheckBox.setText(\"头像\");\n importOptionAvatarCheckBox.setToolTipText(\"勾选会导致左侧列表甚至WePush变卡哦\");\n importOptionPanel.add(importOptionAvatarCheckBox, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n clearDbCacheButton = new JButton();\n clearDbCacheButton.setText(\"清空本地缓存\");\n importOptionPanel.add(clearDbCacheButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n memberImportTagComboBox.setModel(defaultComboBoxModel1);\n panel3.add(memberImportTagComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagFreshButton = new JButton();\n Font memberImportTagFreshButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagFreshButton.getFont());\n if (memberImportTagFreshButtonFont != null) memberImportTagFreshButton.setFont(memberImportTagFreshButtonFont);\n memberImportTagFreshButton.setText(\"刷新\");\n panel3.add(memberImportTagFreshButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"标签分组\");\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "private void setLayout() {\n\tHorizontalLayout main = new HorizontalLayout();\n\tmain.setMargin(true);\n\tmain.setSpacing(true);\n\n\t// vertically divide the right area\n\tVerticalLayout left = new VerticalLayout();\n\tleft.setSpacing(true);\n\tmain.addComponent(left);\n\n\tleft.addComponent(openProdManager);\n\topenProdManager.addListener(new Button.ClickListener() {\n\t public void buttonClick(ClickEvent event) {\n\t\tCustomerWindow productManagerWin = new CustomerWindow(CollectorManagerApplication.this);\n\t\tproductManagerWin.addListener(new Window.CloseListener() {\n\t\t public void windowClose(CloseEvent e) {\n\t\t\topenProdManager.setEnabled(true);\n\t\t }\n\t\t});\n\n\t\tCollectorManagerApplication.this.getMainWindow().addWindow(productManagerWin);\n\t\topenProdManager.setEnabled(false);\n\t }\n\t});\n\n\t\n\tsetMainWindow(new Window(\"Sistema de Cobranzas\", main));\n\n }", "private void initialize() {\n\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.setRows(1);\n\t\t\n\t\tGridBagLayout gridbag = new GridBagLayout();\n\t\tbase=new JPanel(gridbag);\n\t\tbase.setBackground(new Color(250,251,245));\n\t\t// default size\n\t\tbase.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\t//base.setPreferredSize(new Dimension(200,320));\n\t\t\n\t\t/*\n\t\t// separator\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 0;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\n\t\tJSeparator vspr=new JSeparator(JSeparator.HORIZONTAL);\n\t\tvspr.setPreferredSize(new Dimension(200, 20));\n\t\tgridbag.setConstraints(vspr, constraints1);\n\t\tbase.add(vspr);\n\t\t*/\n\t\t\n\t\t// panel1\n\t\tString st = Path.getPath()+\"/images//program_h6_bg_illuminance.gif\";\n\t\tif(IsMacorWin.isMacOrWin()==false) st = Path.getPath()+\"images\\\\/program_h6_bg_illuminance.gif\";\n\n\t\tgJPanel = new GJPanel(st);\n\t\tgJPanel.setText(\"LEDライト\");\n\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 1;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(gJPanel, constraints1);\n\t\tbase.add(gJPanel);\n\t\t\n\t\t\n\t\t// panel\n\t\tJPanel jp1=new JPanel();\n\t\tjp1.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tjp1.setLayout(gridLayout);\n//\t\tjp1.setPreferredSize(new Dimension(gJPanel.getWidth(),gJPanel.getHeight()));\n\t\tjp1.setPreferredSize(new Dimension(160,50));\n\t\tjp1.setBackground(Color.gray);\n\t\n//\n\t\tifD1=new InfoDispEdit();\n\t\tifD1.setText(\"警告下限照度\");\n\t\t// lux\n\t\tString[] illumdata=new String[50];\n\t\tfor(int i=0;i<50;i++){\n\t\t\tillumdata[i]= String.valueOf(i*100);\n\t\t}\n\t\tifD1.setSelectionItems(illumdata);\n\t\tifD1.setSelectedIndex(22);// 2500 lux\n\t\tifD1.setUnit(\"lux\");\n\t\t//\n\t\tGridBagConstraints constraints2 = new GridBagConstraints();\n\t\tconstraints2.gridy = 0;\t\n\t\tconstraints2.gridy = 2;\t\n\t\tconstraints2.gridwidth= 1;\n\t\tconstraints2.gridheight = 1;\n\t\tconstraints2.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(ifD1, constraints2);\n\t\t\n\t\tif(Version.getRevision().equals(\"Education\")!=true)\n\t\t\tbase.add(ifD1);\n\n\t\tsetParentClass(this);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.add( base, BorderLayout.CENTER );\n\n\t\t// 観察される人を生成\n\t\tobservableMan = new ObservableMan();\n\n\t\t// デフォルトの観察者を追加\n\t\tdefaultO=new PlantPrgEdit.ObserverA();\n\t\tobservableMan.addObserver(defaultO);\n\t}", "private void $$$setupUI$$$() {\n topPanel = new JPanel();\n topPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n headerLabel = new JLabel();\n headerLabel.setText(\"Header\");\n topPanel.add(headerLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n contentPanel = new JPanel();\n contentPanel.setLayout(new BorderLayout(0, 0));\n topPanel.add(contentPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n buttonBack = new JButton();\n buttonBack.setText(\"Back\");\n panel1.add(buttonBack, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonNext = new JButton();\n buttonNext.setText(\"Next\");\n panel1.add(buttonNext, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status\");\n panel2.add(statusLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setUp() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tsetupMessagePanel();\n\t\tsetupHomeButtonPanel();\n\t}", "private void manageLayout()\r\n {\r\n // gridBaglayout \r\n setLayout(new GridBagLayout());\r\n GridBagConstraints gbc = new GridBagConstraints();\r\n\r\n // intro string\r\n gbc.weighty = 0;\r\n gbc.weightx = 0;\r\n gbc.insets = new Insets(1, 1, 1, 1);\r\n gbc.anchor = GridBagConstraints.CENTER;\r\n add(stringLabel, gbc);\r\n\r\n // State / options list\r\n JPanel panel = new JPanel();\r\n panel.setLayout(new FlowLayout(FlowLayout.CENTER));\r\n panel.add(stateLabel);\r\n panel.add(optionsList);\r\n panel.add(finalStateLabel);\r\n //gbc.insets = new Insets(2,2,2,2);\r\n gbc.weightx = .33;\r\n gbc.weighty = 0;\r\n gbc.gridy = 1;\r\n gbc.fill = 1;\r\n add(panel, gbc);\r\n\r\n // RadioButtons / Reset Button\r\n radioLabel = new JLabel();\r\n radioLabel.setLayout(new GridLayout(5, 1, 0, 0));\r\n radioLabel.setBorder(new TitledBorder(\"Search Types\"));\r\n radioLabel.setPreferredSize(new Dimension(180, 120));\r\n // reset button\r\n gbc.fill = 0;\r\n gbc.gridx = 1;\r\n gbc.weightx = 0;\r\n gbc.gridy = 0;\r\n gbc.weighty = 1;\r\n //radioLabel.add(depthFirstButton);\r\n //radioLabel.add(breadthFirstButton);\r\n radioLabel.add(AStarButton);\r\n radioLabel.add(enhancedAStarButton);\r\n radioLabel.add(solveButton);\r\n radioLabel.add(showNxtMvBtn);\r\n radioLabel.add(showAllMoves);\r\n add(radioLabel, gbc);\r\n gbc.gridy = 1;\r\n add(solutionLabel, gbc);\r\n gbc.gridx = 0;\r\n gbc.gridy = 3;\r\n add(resetButton, gbc);\r\n }", "public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1 = new JPanel();\n pan1.setLayout(new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(pan1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Название номера\");\n pan1.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Дата регистрации\");\n pan1.add(label2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Дата истечения\");\n pan1.add(label3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n pan1.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(0, 25), new Dimension(0, 25), new Dimension(0, 25), 0, false));\n number = new JTextField();\n pan1.add(number, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n pan1.add(creationDatePanel, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1.add(expirationDatePanel, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n }", "public void setUpPanel() {\n\t\tsetBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.LOWERED,\n\t\t\t\tnull, null), new TitledBorder(null, \"Manage Auction Records\",\n\t\t\t\tTitledBorder.CENTER, TitledBorder.TOP, null, null)));\n\n\t\tgridBagLayout.columnWidths = new int[] { 48, 215, 228, 150, 0 };\n\t\tgridBagLayout.rowHeights = new int[] { 70, 15, 21, 57, 15, 21, 58, 15,\n\t\t\t\t21, 85, 39, 0 };\n\t\tgridBagLayout.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0,\n\t\t\t\tDouble.MIN_VALUE };\n\t\tgridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n\t\t\t\t0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };\n\t\tsetLayout(gridBagLayout);\n\n\t\tlblArtistFirstName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblArtistFirstName = new GridBagConstraints();\n\t\tgbc_lblArtistFirstName.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblArtistFirstName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblArtistFirstName.gridx = 1;\n\t\tgbc_lblArtistFirstName.gridy = 1;\n\t\tadd(lblArtistFirstName, gbc_lblArtistFirstName);\n\n\t\tformattedFirstName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedFirstName.setColumns(20);\n\t\tGridBagConstraints gbc_formattedFirstName = new GridBagConstraints();\n\t\tgbc_formattedFirstName.anchor = GridBagConstraints.NORTH;\n\t\tgbc_formattedFirstName.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_formattedFirstName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_formattedFirstName.gridx = 1;\n\t\tgbc_formattedFirstName.gridy = 2;\n\t\tadd(formattedFirstName, gbc_formattedFirstName);\n\n\t\tlblArtistLastName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblArtistLastName = new GridBagConstraints();\n\t\tgbc_lblArtistLastName.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblArtistLastName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblArtistLastName.gridx = 1;\n\t\tgbc_lblArtistLastName.gridy = 4;\n\t\tadd(lblArtistLastName, gbc_lblArtistLastName);\n\n\t\tformattedLastName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedLastName.setColumns(20);\n\t\tGridBagConstraints gbc_formattedLastName = new GridBagConstraints();\n\t\tgbc_formattedLastName.anchor = GridBagConstraints.NORTH;\n\t\tgbc_formattedLastName.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_formattedLastName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_formattedLastName.gridx = 1;\n\t\tgbc_formattedLastName.gridy = 5;\n\t\tadd(formattedLastName, gbc_formattedLastName);\n\t\tlblTitleOfWork = new JLabel(\"Title Of Work (max 40 characters)\");\n\n\t\tlblTitleOfWork.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblTitleOfWork = new GridBagConstraints();\n\t\tgbc_lblTitleOfWork.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblTitleOfWork.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblTitleOfWork.gridx = 1;\n\t\tgbc_lblTitleOfWork.gridy = 7;\n\t\tadd(lblTitleOfWork, gbc_lblTitleOfWork);\n\n\t\tformattedTitleOfWork.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedTitleOfWork.setColumns(40);\n\t\tGridBagConstraints gbc_formattedTitleOfWork = new GridBagConstraints();\n\t\tgbc_formattedTitleOfWork.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_formattedTitleOfWork.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_formattedTitleOfWork.gridwidth = 3;\n\t\tgbc_formattedTitleOfWork.gridx = 1;\n\t\tgbc_formattedTitleOfWork.gridy = 8;\n\t\tadd(formattedTitleOfWork, gbc_formattedTitleOfWork);\n\n\t\tbtnSearch.setMnemonic('S');\n\t\tbtnSearch.setFont(new Font(\"Cambria\", Font.BOLD, 12));\n\t\tGridBagConstraints gbc_btnSearch = new GridBagConstraints();\n\t\tgbc_btnSearch.fill = GridBagConstraints.BOTH;\n\t\tgbc_btnSearch.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnSearch.gridx = 1;\n\t\tgbc_btnSearch.gridy = 10;\n\t\tadd(btnSearch, gbc_btnSearch);\n\n\t\tbtnCancel.setMnemonic('C');\n btnCancel.setFont(new Font(\"Cambria\", Font.BOLD, 12));\n\t\tGridBagConstraints gbc_btnCancel = new GridBagConstraints();\n\t\tgbc_btnCancel.fill = GridBagConstraints.BOTH;\n\t\tgbc_btnCancel.gridx = 3;\n\t\tgbc_btnCancel.gridy = 10;\n\t\tadd(btnCancel, gbc_btnCancel);\n\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(table);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonRegister = new JButton();\n buttonRegister.setText(\"Track\");\n panel1.add(buttonRegister, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonMenu = new JButton();\n buttonMenu.setText(\"Menu\");\n panel1.add(buttonMenu, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "private void setupPanels() {\n\t\tsplitPanel.addEast(east, Window.getClientWidth() / 5);\n\t\tsplitPanel.add(battleMatCanvasPanel);\n\t\tpanelsSetup = true;\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(2, 4, new Insets(0, 0, 0, 0), -1, -1));\n panel1.setBackground(new Color(-1973532));\n panel1.setMaximumSize(new Dimension(1200, 800));\n panel1.setMinimumSize(new Dimension(1200, 800));\n panel1.setPreferredSize(new Dimension(1200, 800));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(11, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel2.setBackground(new Color(-1973532));\n panel2.setOpaque(false);\n panel1.add(panel2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n question = new JLabel();\n question.setForeground(new Color(-16777216));\n question.setText(\"¿Desea continuar alguna partida?\");\n panel2.add(question, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel3.setOpaque(false);\n panel2.add(panel3, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n loadButton = new JButton();\n loadButton.setBackground(new Color(-16777216));\n loadButton.setBorderPainted(false);\n loadButton.setContentAreaFilled(false);\n loadButton.setFocusPainted(false);\n loadButton.setOpaque(false);\n loadButton.setText(\"Cargar\");\n panel3.add(loadButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, 40), new Dimension(100, 40), new Dimension(100, 40), 0, false));\n newButton = new JButton();\n newButton.setBorderPainted(false);\n newButton.setContentAreaFilled(false);\n newButton.setFocusPainted(false);\n newButton.setOpaque(false);\n newButton.setText(\"Nueva\");\n panel3.add(newButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, 40), new Dimension(100, 40), new Dimension(100, 40), 0, false));\n volverButton = new JButton();\n volverButton.setBorderPainted(false);\n volverButton.setContentAreaFilled(false);\n volverButton.setFocusPainted(false);\n volverButton.setOpaque(false);\n volverButton.setText(\"Volver\");\n panel2.add(volverButton, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(252, 40), new Dimension(252, 40), new Dimension(252, 40), 0, false));\n final Spacer spacer1 = new Spacer();\n panel2.add(spacer1, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(-1, 80), new Dimension(-1, 80), new Dimension(-1, 80), 0, false));\n final Spacer spacer2 = new Spacer();\n panel2.add(spacer2, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 70), new Dimension(-1, 70), new Dimension(-1, 70), 0, false));\n final Spacer spacer3 = new Spacer();\n panel2.add(spacer3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 80), new Dimension(-1, 80), new Dimension(-1, 80), 0, false));\n final Spacer spacer4 = new Spacer();\n panel2.add(spacer4, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 15), new Dimension(-1, 15), new Dimension(-1, 15), 0, false));\n final Spacer spacer5 = new Spacer();\n panel2.add(spacer5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 35), new Dimension(-1, 35), null, 0, false));\n training = new JButton();\n training.setBorderPainted(false);\n training.setContentAreaFilled(false);\n training.setFocusPainted(false);\n training.setText(\"Modo Entrenamiento\");\n panel2.add(training, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer6 = new Spacer();\n panel2.add(spacer6, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 50), new Dimension(-1, 50), new Dimension(-1, 50), 0, false));\n logo = new JLabel();\n logo.setText(\"\");\n panel2.add(logo, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(252, 200), new Dimension(252, 200), new Dimension(252, 200), 1, false));\n final Spacer spacer7 = new Spacer();\n panel1.add(spacer7, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new Dimension(42, -1), new Dimension(42, -1), null, 0, false));\n photo.setAlignmentY(0.5f);\n photo.setText(\"\");\n panel1.add(photo, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(800, 800), new Dimension(800, 800), new Dimension(800, 800), 0, false));\n final Spacer spacer8 = new Spacer();\n panel1.add(spacer8, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, 1, new Dimension(50, -1), new Dimension(50, -1), null, 0, false));\n config = new JButton();\n config.setBorderPainted(false);\n config.setContentAreaFilled(false);\n config.setFocusPainted(false);\n config.setHorizontalAlignment(0);\n config.setHorizontalTextPosition(0);\n config.setText(\"\\uF013\");\n panel1.add(config, new GridConstraints(0, 2, 1, 2, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(40, 40), null, 0, false));\n }", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private void setupRecyclerView() {\n recyclerView.setRecycledViewPool(recycledViewPool);\n\n // We are using a multi span grid to allow two columns of buttons. To set this up we need\n // to set our span count on the controller and then get the span size lookup object from\n // the controller. This look up object will delegate span size lookups to each model.\n controller.setSpanCount(SPAN_COUNT);\n// GridLayoutManager gridLayoutManager = new GridLayoutManager(this.getContext(),SPAN_COUNT);\n StaggeredGridLayoutManager gridLayoutManager = new StaggeredGridLayoutManager(SPAN_COUNT, StaggeredGridLayoutManager.VERTICAL);\n// gridLayoutManager.setSpanSizeLookup(controller.getSpanSizeLookup());\n recyclerView.setLayoutManager(gridLayoutManager);\n\n recyclerView.setHasFixedSize(true);\n// recyclerView.addItemDecoration(new VerticalGridCardSpacingDecoration());\n recyclerView.setItemAnimator(new SampleItemAnimator());\n recyclerView.setAdapter(controller.getAdapter());\n }", "private void setLayout() {\n\t\ttxtNickname.setId(\"txtNickname\");\n\t\ttxtPort.setId(\"txtPort\");\n\t\ttxtAdress.setId(\"txtAdress\");\n\t\tlblNickTaken.setId(\"lblNickTaken\");\n\n\t\tgrid.setPrefSize(516, 200);\n\t\tbtnLogin.setDisable(true);\n\t\ttxtNickname.setPrefSize(200, 25);\n\t\tlblNickTaken.setPrefSize(250, 10);\n\t\tlblNickTaken.setText(null);\n\t\tlblNickTaken.setTextFill(Color.RED);\n\t\tlblNick.setPrefSize(120, 50);\n\t\ttxtAdress.setText(\"localhost\");\n\t\ttxtPort.setText(\"4455\");\n\t\tlblCardDesign.setPrefSize(175, 25);\n\t\tcomboBoxCardDesign.getSelectionModel().select(0);\n\t\tbtnLogin.setGraphic(imvStart);\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n panel1.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n contentPane.add(scrollPane1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 4, new Insets(0, 0, 0, 0), 5, 5));\n scrollPane1.setViewportView(panel3);\n final JLabel label1 = new JLabel();\n label1.setFont(new Font(label1.getFont().getName(), Font.BOLD, label1.getFont().getSize()));\n label1.setText(\"mlocarna:\");\n panel3.add(label1, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n panel3.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 4, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setBackground(new Color(-65485));\n label2.setFont(new Font(label2.getFont().getName(), Font.BOLD, label2.getFont().getSize()));\n label2.setOpaque(false);\n label2.setText(\"RNAsubopt:\");\n panel3.add(label2, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n random_sample = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"5\");\n defaultComboBoxModel1.addElement(\"10\");\n defaultComboBoxModel1.addElement(\"15\");\n defaultComboBoxModel1.addElement(\"20\");\n random_sample.setModel(defaultComboBoxModel1);\n panel3.add(random_sample, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_EAST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n useMlocarna = new JCheckBox();\n useMlocarna.setSelected(true);\n useMlocarna.setText(\"\");\n panel3.add(useMlocarna, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_EAST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"suboptimal structures computed\");\n panel3.add(label3, new com.intellij.uiDesigner.core.GridConstraints(0, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"use to compute the folding landscape \");\n panel3.add(label4, new com.intellij.uiDesigner.core.GridConstraints(1, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer3 = new com.intellij.uiDesigner.core.Spacer();\n panel3.add(spacer3, new com.intellij.uiDesigner.core.GridConstraints(0, 3, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer4 = new com.intellij.uiDesigner.core.Spacer();\n panel3.add(spacer4, new com.intellij.uiDesigner.core.GridConstraints(1, 3, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "private void $$$setupUI$$$()\n {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(6, 1, new Insets(20, 20, 20, 20), -1, -1));\n panel.setAutoscrolls(true);\n buttonSettings = new JButton();\n buttonSettings.setEnabled(true);\n buttonSettings.setText(\"Open Application Settings\");\n panel.add(buttonSettings,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonStartGit = new JButton();\n buttonStartGit.setEnabled(true);\n buttonStartGit.setText(\"Start Git Management\");\n panel.add(buttonStartGit,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n null, new Dimension(500, 500), null, 0, false));\n textPaneConsole = new JTextPane();\n textPaneConsole.setEditable(false);\n scrollPane1.setViewportView(textPaneConsole);\n buttonOpenBenchmarkDialog = new JButton();\n buttonOpenBenchmarkDialog.setText(\"Open YCSB Benchmark Dialog\");\n panel.add(buttonOpenBenchmarkDialog,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonShowGitSettings = new JButton();\n buttonShowGitSettings.setEnabled(true);\n buttonShowGitSettings.setText(\"Open Git Management\");\n panel.add(buttonShowGitSettings,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Console Output\");\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,\n null, null, 0, false));\n }", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "@SuppressWarnings(\"UnnecessaryBoxing\")\r\n private void initLayoutDimensions() {\r\n leftPanelWidth = Page.getScreenWidth() * 20 / 100;\r\n leftPanelHeight = Page.getScreenHeight() - 225;\r\n middlePanelWidth = Page.getScreenWidth() / 2;\r\n if (Double.valueOf(middlePanelWidth) % 2.0 > 0.0) {\r\n middlePanelWidth = middlePanelWidth - 1;\r\n }\r\n rightPanelWidth = Page.getScreenWidth() - (leftPanelWidth + 2 + middlePanelWidth + 2);\r\n }", "private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new BorderLayout(0, 0));\n centerPanel = new JPanel();\n centerPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(centerPanel, BorderLayout.CENTER);\n final JSplitPane splitPane1 = new JSplitPane();\n splitPane1.setDividerLocation(240);\n splitPane1.setResizeWeight(0.5);\n centerPanel.add(splitPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n leftPanel = new JPanel();\n leftPanel.setLayout(new BorderLayout(0, 0));\n splitPane1.setLeftComponent(leftPanel);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n leftPanel.add(panel1, BorderLayout.NORTH);\n userListTitle = new JLabel();\n userListTitle.setText(\"在线用户\");\n panel1.add(userListTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n leftPanel.add(panel2, BorderLayout.CENTER);\n JSP_list = new JScrollPane();\n panel2.add(JSP_list, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n rightPanel = new JPanel();\n rightPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n splitPane1.setRightComponent(rightPanel);\n southPanel = new JPanel();\n southPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(southPanel, BorderLayout.SOUTH);\n northPanel = new JPanel();\n northPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(northPanel, BorderLayout.NORTH);\n }", "private void layoutComponents() {\n\n\t\tsetLayout(new GridBagLayout());\n\n\t\tGridBagConstraints c = new GridBagConstraints();\n\n\t\tc.anchor = GridBagConstraints.CENTER;\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 1;\n\t\tc.weighty = 0.3;\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t\tadd(titleLabel, c);\n\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tc.weightx = 1;\n\t\tc.weighty = 0.7;\n\t\tc.gridy++;\n\t\tc.insets = new Insets(0, 25, 25, 25);\n\t\tadd(tableSP, c);\n\n\t}", "private void initialize() {\r\n\t\tthis.setSize(734, 710);\r\n\t\tfinal GridBagLayout gridBagLayout_1 = new GridBagLayout();\r\n\t\tgridBagLayout_1.rowWeights = new double[]{0.0, 1.0,0};\r\n\t\tgridBagLayout_1.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_1.rowHeights = new int[] {0,0, 0}; \r\n\t\tthis.setLayout(gridBagLayout_1);\r\n\r\n\t\teditROIPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_2 = new GridBagLayout();\r\n\t\tgridBagLayout_2.rowHeights = new int[] {0,0,7};\r\n\t\tgridBagLayout_2.columnWidths = new int[] {0,7};\r\n\t\teditROIPanel.setLayout(gridBagLayout_2);\r\n\t\tfinal GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();\r\n\t\tgridBagConstraints_6.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_6.insets = new Insets(2, 2, 5, 2);\r\n\t\tgridBagConstraints_6.weightx = 1.0;\r\n\t\tgridBagConstraints_6.gridy = 0;\r\n\t\tgridBagConstraints_6.gridx = 0;\r\n\t\tadd(editROIPanel, gridBagConstraints_6);\r\n\r\n\t\tfinal JLabel infoLabel = new JLabel();\r\n\t\tinfoLabel.setText(\"Data Info:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_12 = new GridBagConstraints();\r\n\t\tgridBagConstraints_12.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_12.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_12.gridy = 0;\r\n\t\tgridBagConstraints_12.gridx = 0;\r\n\t\teditROIPanel.add(infoLabel, gridBagConstraints_12);\r\n\r\n\t\ttextLabel = new JLabel();\r\n\t\ttextLabel.setPreferredSize(new Dimension(500, 20));\r\n\t\ttextLabel.setMinimumSize(new Dimension(500, 20));\r\n\t\tfinal GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();\r\n\t\tgridBagConstraints_2.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_2.weightx = 1;\r\n\t\tgridBagConstraints_2.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_2.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_2.gridy = 0;\r\n\t\tgridBagConstraints_2.gridx = 1;\r\n\t\tgridBagConstraints_2.gridwidth = 2;\r\n\t\teditROIPanel.add(textLabel, gridBagConstraints_2);\r\n\t\ttextLabel.setText(\"No FRAP DataSet loaded.\");\r\n\r\n\t\tautoCropButton = new JButton(new ImageIcon(getClass().getResource(\"/images/autoCrop.gif\")));\r\n\t\tautoCropButton.setName(\"roiAutoCropBtn\");\r\n\t\tautoCropButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_AUTOCROP_PROPERTY, null,null);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tclearROIbutton = new JButton(new ImageIcon(getClass().getResource(\"/images/clearROI.gif\")));\r\n\t\tclearROIbutton.setEnabled(false);\r\n\t\tclearROIbutton.setName(\"clearROIBtn\");\r\n\t\tclearROIbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tif(roiComboBox.getItemCount() == 0){\r\n\t\t\t\t\tgiveROIRequiredWarning(\"Clear Domain\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_CLEARROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tviewZLabel = new JLabel();\r\n\t\tviewZLabel.setText(\"View Z:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_17 = new GridBagConstraints();\r\n\t\tgridBagConstraints_17.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_17.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_17.gridy = 1;\r\n\t\tgridBagConstraints_17.gridx = 0;\r\n\t\teditROIPanel.add(viewZLabel, gridBagConstraints_17);\r\n\r\n\t\tfinal JPanel panel_1 = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_4 = new GridBagLayout();\r\n\t\tgridBagLayout_4.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_4.columnWidths = new int[] {7};\r\n\t\tpanel_1.setLayout(gridBagLayout_4);\r\n\t\tfinal GridBagConstraints gridBagConstraints_18 = new GridBagConstraints();\r\n\t\tgridBagConstraints_18.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_18.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_18.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_18.weightx = 0;\r\n\t\tgridBagConstraints_18.gridy = 1;\r\n\t\tgridBagConstraints_18.gridx = 1;\r\n\t\teditROIPanel.add(panel_1, gridBagConstraints_18);\r\n\t\tfinal GridBagConstraints gridBagConstraints_19 = new GridBagConstraints();\r\n\t\tgridBagConstraints_19.insets = new Insets(0, 0, 5, 0);\r\n\t\tgridBagConstraints_19.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_19.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_19.weightx = 1;\r\n\t\tgridBagConstraints_19.gridy = 0;\r\n\t\tgridBagConstraints_19.gridx = 0;\r\n\t\tpanel_1.add(getZSlider(), gridBagConstraints_19);\r\n\r\n\t\tviewTLabel = new JLabel();\r\n\t\tviewTLabel.setText(\"View Time:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_13 = new GridBagConstraints();\r\n\t\tgridBagConstraints_13.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_13.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_13.gridy = 2;\r\n\t\tgridBagConstraints_13.gridx = 0;\r\n\t\teditROIPanel.add(viewTLabel, gridBagConstraints_13);\r\n\r\n\t\tfinal JPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new GridBagLayout());\r\n\t\tfinal GridBagConstraints gridBagConstraints_15 = new GridBagConstraints();\r\n\t\tgridBagConstraints_15.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_15.weightx = 1;\r\n\t\tgridBagConstraints_15.insets = new Insets(0, 0, 0, 0);\r\n\t\tgridBagConstraints_15.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_15.gridy = 0;\r\n\t\tgridBagConstraints_15.gridx = 0;\r\n\t\tpanel.add(getTimeSlider(), gridBagConstraints_15);\r\n\t\t\r\n\t\tfinal GridBagConstraints gridBagConstraints_14 = new GridBagConstraints();\r\n\t\tgridBagConstraints_14.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_14.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_14.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_14.gridy = 2;\r\n\t\tgridBagConstraints_14.gridx = 1;\r\n\t\teditROIPanel.add(panel, gridBagConstraints_14);\r\n\r\n\t\tfinal JPanel editROIButtonPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_3 = new GridBagLayout();\r\n\t\tgridBagLayout_3.rowWeights = new double[]{0.0, 1.0};\r\n\t\tgridBagLayout_3.columnWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0};\r\n\t\tgridBagLayout_3.columnWidths = new int[] {0, 0,7,7, 0, 0};\r\n\t\teditROIButtonPanel.setLayout(gridBagLayout_3);\r\n\t\tfinal GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();\r\n\t\tgridBagConstraints_8.gridwidth = 2;\r\n\t\tgridBagConstraints_8.weightx = 0;\r\n\t\tgridBagConstraints_8.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_8.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_8.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_8.gridy = 3;\r\n\t\tgridBagConstraints_8.gridx = 0;\r\n\t\teditROIPanel.add(editROIButtonPanel, gridBagConstraints_8);\r\n\t\t\r\n\t\tpanel_2 = new JPanel();\r\n\t\tGridBagConstraints gbc_panel_2 = new GridBagConstraints();\r\n\t\tgbc_panel_2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_2.weighty = 1.0;\r\n\t\tgbc_panel_2.weightx = 1.0;\r\n\t\tgbc_panel_2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2.gridx = 0;\r\n\t\tgbc_panel_2.gridy = 1;\r\n\t\tadd(panel_2, gbc_panel_2);\r\n\t\tGridBagLayout gbl_panel_2 = new GridBagLayout();\r\n\t\tgbl_panel_2.columnWidths = new int[]{0, 0, 0};\r\n\t\tgbl_panel_2.rowHeights = new int[]{0};\r\n\t\tgbl_panel_2.columnWeights = new double[]{0, 1.0, 0.0};\r\n\t\tgbl_panel_2.rowWeights = new double[]{0.0};\r\n\t\tpanel_2.setLayout(gbl_panel_2);\r\n\t\t\r\n\t\tpanel_3 = new JPanel();\r\n\t\tpanel_3.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_3 = new GridBagConstraints();\r\n\t\tgbc_panel_3.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_3.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_3.gridx = 0;\r\n\t\tgbc_panel_3.gridy = 0;\r\n\t\tpanel_2.add(panel_3, gbc_panel_3);\r\n\t\tGridBagLayout gbl_panel_3 = new GridBagLayout();\r\n\t\tgbl_panel_3.columnWidths = new int[]{0, 0};\r\n\t\tgbl_panel_3.rowHeights = new int[]{0, 0, 0, 0};\r\n\t\tgbl_panel_3.columnWeights = new double[]{0.0, Double.MIN_VALUE};\r\n\t\tgbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel_3.setLayout(gbl_panel_3);\r\n\t\t\r\n\t\tdomainRegionLabel = new JLabel(DOMAIN_LIST_TEXT);\r\n\t\tGridBagConstraints gbc_domainRegionLabel = new GridBagConstraints();\r\n\t\tgbc_domainRegionLabel.insets = new Insets(0, 0, 2, 0);\r\n\t\tgbc_domainRegionLabel.gridx = 0;\r\n\t\tgbc_domainRegionLabel.gridy = 0;\r\n\t\tpanel_3.add(domainRegionLabel, gbc_domainRegionLabel);\r\n\t\t\r\n\t\tscrollPane = new JScrollPane();\r\n\t\tGridBagConstraints gbc_scrollPane = new GridBagConstraints();\r\n\t\tgbc_scrollPane.insets = new Insets(0, 2, 0, 0);\r\n\t\tgbc_scrollPane.weighty = 1.0;\r\n\t\tgbc_scrollPane.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_scrollPane.gridx = 0;\r\n\t\tgbc_scrollPane.gridy = 1;\r\n\t\tpanel_3.add(scrollPane, gbc_scrollPane);\r\n\t\tscrollPane.setPreferredSize(new Dimension(125, 10));\r\n\t\tscrollPane.setMinimumSize(new Dimension(125,10));\r\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\t\r\n\t\tresolvedList = new JList();\r\n\t\tresolvedList.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tsuper.mouseClicked(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(e.getClickCount() == 2){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_FINDROI_PROPERTY, null, resolvedList.getSelectedValue());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mousePressed(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mouseReleased(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tresolvedList.addListSelectionListener(resolvedListSelectionListener);\r\n\t\tresolvedList.setCellRenderer(resolvedObjectListCellRenderer);\r\n\t\tscrollPane.setViewportView(resolvedList);\r\n\t\t\r\n\t\tmergeButton = new JButton(\"Auto-Merge\");\r\n\t\tmergeButton.setToolTipText(\"Remove regions by merging with neighbor\");\r\n\t\tmergeButton.setEnabled(false);\r\n\t\tmergeButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tresolvedListSelection(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_mergeButton = new GridBagConstraints();\r\n\t\tgbc_mergeButton.gridx = 0;\r\n\t\tgbc_mergeButton.gridy = 2;\r\n\t\tpanel_3.add(mergeButton, gbc_mergeButton);\r\n\t\tGridBagConstraints gbc_jScrollPane2 = new GridBagConstraints();\r\n\t\tgbc_jScrollPane2.weighty = 1.0;\r\n\t\tgbc_jScrollPane2.weightx = 1.0;\r\n\t\tgbc_jScrollPane2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_jScrollPane2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_jScrollPane2.gridx = 1;\r\n\t\tgbc_jScrollPane2.gridy = 0;\r\n\t\tpanel_2.add(getJScrollPane2(), gbc_jScrollPane2);\r\n\t\tGridBagConstraints gbc_toolButtonPanel = new GridBagConstraints();\r\n\t\tgbc_toolButtonPanel.weighty = 1.0;\r\n\t\tgbc_toolButtonPanel.insets = new Insets(2, 2, 0, 2);\r\n\t\tgbc_toolButtonPanel.anchor = GridBagConstraints.NORTH;\r\n\t\tgbc_toolButtonPanel.gridx = 2;\r\n\t\tgbc_toolButtonPanel.gridy = 0;\r\n\t\tpanel_2.add(getToolButtonPanel(), gbc_toolButtonPanel);\r\n\r\n\t\troiComboBox = new JComboBox();\r\n\t\troiComboBox.setName(\"activeROIComboBox\");\r\n\t\troiComboBox.setRenderer(new ListCellRenderer() {\r\n\t\t\tprivate DefaultListCellRenderer listCellRender = new DefaultListCellRenderer();\r\n\t\t\tpublic Component getListCellRendererComponent(JList list, Object value,\r\n\t\t\t\t\tint index, boolean isSelected, boolean cellHasFocus) {\r\n\t\t\t\tROIMultiPaintManager.ComboboxROIName comboboxROIName = (ROIMultiPaintManager.ComboboxROIName)value;\r\n\t\t\t\tif(comboboxROIName == null){//return blank\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\tif(comboboxROIName.getHighlightColor() == null){//return text only\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, comboboxROIName.getROIName(), index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\t//return text with small color box\r\n\t\t\t\tIcon icon = new ColorIcon(20,20,comboboxROIName.getHighlightColor());\r\n\t\t\t\tJLabel jlable = (JLabel)listCellRender.getListCellRendererComponent(list, icon, index, isSelected, cellHasFocus);\r\n\t\t\t\tjlable.setText(comboboxROIName.getROIName());\r\n\t\t\t\treturn jlable;\r\n\t\t\t}\r\n\t\t});\r\n\t\troiComboBox.addActionListener(ROI_COMBOBOX_ACTIONLISTENER);\r\n\t\t\r\n\t\tlblNewLabel = new JLabel(\"Active Domain:\");\r\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_lblNewLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblNewLabel.gridx = 0;\r\n\t\tgbc_lblNewLabel.gridy = 0;\r\n\t\teditROIButtonPanel.add(lblNewLabel, gbc_lblNewLabel);\r\n\t\tfinal GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();\r\n\t\tgridBagConstraints_1.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_1.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_1.weightx = 1;\r\n\t\tgridBagConstraints_1.gridy = 0;\r\n\t\tgridBagConstraints_1.gridx = 1;\r\n\t\teditROIButtonPanel.add(roiComboBox, gridBagConstraints_1);\r\n\r\n\t\taddROIButton = new JButton();\r\n\t\taddROIButton.setName(\"roiAddBtn\");\r\n\t\taddROIButton.addActionListener(addROIActionListener);\r\n\t\taddROIButton.setText(\"Add Domain...\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();\r\n\t\tgridBagConstraints_3.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_3.gridy = 0;\r\n\t\tgridBagConstraints_3.gridx = 2;\r\n\t\teditROIButtonPanel.add(addROIButton, gridBagConstraints_3);\r\n\r\n\t\tdelROIButton = new JButton();\r\n\t\tdelROIButton.setName(\"roiDeleteBtn\");\r\n\t\tdelROIButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DELETEROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tdelROIButton.setText(\"Delete Domain...\");\r\n\t\tdelROIButton.setEnabled(false);\r\n\t\tfinal GridBagConstraints gridBagConstraints_4 = new GridBagConstraints();\r\n\t\tgridBagConstraints_4.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_4.gridy = 0;\r\n\t\tgridBagConstraints_4.gridx = 3;\r\n\t\teditROIButtonPanel.add(delROIButton, gridBagConstraints_4);\r\n\t\t\r\n\t\tdiscardHighlightsButton = new JButton(\"Clear Selections\");\r\n\t\tdiscardHighlightsButton.setEnabled(false);\r\n\t\tdiscardHighlightsButton.setName(\"clearHighlightsBtn\");\r\n\t\tdiscardHighlightsButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DISCARDHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tGridBagConstraints gbc_specialActionsButton = new GridBagConstraints();\r\n\t\tgbc_specialActionsButton.insets = new Insets(4, 4, 5, 5);\r\n\t\tgbc_specialActionsButton.gridx = 4;\r\n\t\tgbc_specialActionsButton.gridy = 0;\r\n\t\teditROIButtonPanel.add(discardHighlightsButton, gbc_specialActionsButton);\r\n\t\t\r\n\t\tchannelComboBox = new JComboBox();\r\n\t\tGridBagConstraints gbc_channelComboBox = new GridBagConstraints();\r\n\t\tgbc_channelComboBox.insets = new Insets(4, 4, 5, 4);\r\n\t\tgbc_channelComboBox.gridx = 5;\r\n\t\tgbc_channelComboBox.gridy = 0;\r\n\t\teditROIButtonPanel.add(channelComboBox, gbc_channelComboBox);\r\n\t\tchannelComboBox.addActionListener(channelActionListener);\r\n\t\tchannelComboBox.setPreferredSize(new Dimension(100, 22));\r\n\t\tchannelComboBox.setMinimumSize(new Dimension(100, 20));\r\n\t\t\r\n\t\tblendPercentPanel = new JPanel();\r\n\t\tblendPercentPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_2a = new GridBagConstraints();\r\n\t\tgbc_panel_2a.gridwidth = 6;\r\n\t\tgbc_panel_2a.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_panel_2a.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2a.gridx = 0;\r\n\t\tgbc_panel_2a.gridy = 1;\r\n\t\teditROIButtonPanel.add(blendPercentPanel, gbc_panel_2a);\r\n\t\tGridBagLayout gbl_panel_2a = new GridBagLayout();\r\n\t\tblendPercentPanel.setLayout(gbl_panel_2a);\r\n\t\t\r\n\t\tblendPercentROILabel = new JLabel(\"Domains\");\r\n\t\tGridBagConstraints gbc_blendPercentROILabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentROILabel.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_blendPercentROILabel.gridx = 0;\r\n\t\tgbc_blendPercentROILabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentROILabel, gbc_blendPercentROILabel);\r\n\t\t\r\n\t\tblendPercentSlider = new JSlider();\r\n\t\tblendPercentSlider.setToolTipText(\"Mix view of Domains and background image\");\r\n\t\tblendPercentSlider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\tif(!blendPercentSlider.getValueIsAdjusting()){\r\n//\t\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_blendPercentSlider = new GridBagConstraints();\r\n\t\tgbc_blendPercentSlider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_blendPercentSlider.weightx = 0.5;\r\n\t\tgbc_blendPercentSlider.gridx = 1;\r\n\t\tgbc_blendPercentSlider.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentSlider, gbc_blendPercentSlider);\r\n\t\t\r\n\t\tblendPercentImageLabel = new JLabel(\"Image\");\r\n\t\tGridBagConstraints gbc_blendPercentImageLabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentImageLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_blendPercentImageLabel.gridx = 2;\r\n\t\tgbc_blendPercentImageLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentImageLabel, gbc_blendPercentImageLabel);\r\n\t\t\r\n\t\tsmoothOrigLabel = new JLabel(\"Original\");\r\n\t\tGridBagConstraints gbc_smoothOrigLabel = new GridBagConstraints();\r\n\t\tgbc_smoothOrigLabel.insets = new Insets(0, 20, 0, 0);\r\n\t\tgbc_smoothOrigLabel.gridx = 3;\r\n\t\tgbc_smoothOrigLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothOrigLabel, gbc_smoothOrigLabel);\r\n\t\t\r\n\t\tsmoothslider = new JSlider();\r\n\t\tsmoothslider.setToolTipText(\"Smooth background image\");\r\n\t\tsmoothslider.setSnapToTicks(true);\r\n\t\tsmoothslider.setPaintTicks(true);\r\n\t\tsmoothslider.setMajorTickSpacing(1);\r\n\t\tsmoothslider.setMaximum(10);\r\n\t\tsmoothslider.setValue(0);\r\n\t\tsmoothslider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tif(!smoothslider.getValueIsAdjusting()){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_UNDERLAY_SMOOTH_PROPERTY, null, new Integer(smoothslider.getValue()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_smoothslider = new GridBagConstraints();\r\n\t\tgbc_smoothslider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_smoothslider.weightx = 0.5;\r\n\t\tgbc_smoothslider.gridx = 4;\r\n\t\tgbc_smoothslider.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothslider, gbc_smoothslider);\r\n\t\t\r\n\t\tsmootherLabel = new JLabel(\"Smoother\");\r\n\t\tGridBagConstraints gbc_smootherLabel = new GridBagConstraints();\r\n\t\tgbc_smootherLabel.gridx = 5;\r\n\t\tgbc_smootherLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smootherLabel, gbc_smootherLabel);\r\n\t\t\r\n\t\troiDrawButtonGroup.add(selectButton);\r\n\t\troiDrawButtonGroup.add(paintButton);\r\n\t\troiDrawButtonGroup.add(eraseButton);\r\n\t\troiDrawButtonGroup.add(fillButton);\r\n\t\troiDrawButtonGroup.add(cropButton);\r\n\t\troiDrawButtonGroup.add(translateToolButton);\r\n\t\troiDrawButtonGroup.add(scaleToolButton);\r\n\t\t\r\n\t\tBeanUtils.enableComponents(getToolButtonPanel(), false);\r\n\t\tBeanUtils.enableComponents(editROIPanel, false);\r\n\t\t\r\n\t\thistogramPanel = new HistogramPanel();\r\n\t\thistogramPanel.addPropertyChangeListener(new PropertyChangeListener() {\r\n\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n\t\t\t\tif(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_SELECT_PROPERTY)){\r\n\t\t\t\t\tOverlayEditorPanelJAI.this.firePropertyChange(\r\n\t\t\t\t\tOverlayEditorPanelJAI.FRAP_DATA_HISTOUPDATEHIGHLIGHT_PROPERTY, null, (ListSelectionModel)evt.getNewValue());\r\n\t\t\t\t}else if(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_APPLY_ACTION)){\r\n\t\t\t\t\tfirePropertyChange(OverlayEditorPanelJAI.FRAP_DATA_UPDATEROI_WITHHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\thistogramPanel.setVisible(false);\r\n\t\thistogramPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_histogramButton = new GridBagConstraints();\r\n\t\tgbc_histogramButton.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_histogramButton.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_histogramButton.gridx = 0;\r\n\t\tgbc_histogramButton.gridy = 2;\r\n\t\tadd(histogramPanel, gbc_histogramButton);\r\n\t}", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tqueryButton = new JButton(\"query\");\n\t\tthis.add(queryButton);\n\t\tthis.add(displayPane);\n\t\tdisplayArea = new JTextArea(10,30);\n\t\tadd(displayArea);\n\t\t\n\t\t\n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n servicesButton = new JButton();\n servicesButton.setText(\"Services management\");\n panel1.add(servicesButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n surveysManagementButton = new JButton();\n surveysManagementButton.setText(\"Surveys management\");\n panel1.add(surveysManagementButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n connectingAndResultsButton = new JButton();\n connectingAndResultsButton.setText(\"Conecting surveys to services\");\n panel1.add(connectingAndResultsButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Choose option below\");\n panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n results = new JButton();\n results.setText(\"Browse the results\");\n panel1.add(results, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\r\n createUIComponents();\r\n pnlMain = new JPanel();\r\n pnlMain.setLayout(new FormLayout(\"fill:d:grow\", \"fill:38dlu:noGrow,top:4dlu:noGrow,fill:225dlu:noGrow,top:4dlu:noGrow,fill:16dlu:noGrow\"));\r\n pnlMain.setMinimumSize(new Dimension(400, 480));\r\n pnlMain.setPreferredSize(new Dimension(500, 480));\r\n pnlForm.setLayout(new FormLayout(\"fill:50dlu:noGrow,left:4dlu:noGrow,fill:100dlu:noGrow,left:4dlu:noGrow,fill:50dlu:noGrow\", \"fill:12dlu:noGrow\"));\r\n CellConstraints cc = new CellConstraints();\r\n pnlMain.add(pnlForm, cc.xy(1, 1));\r\n lblBuscar = new JLabel();\r\n lblBuscar.setText(\"Buscar \");\r\n pnlForm.add(lblBuscar, cc.xy(1, 1));\r\n txtBuscar = new JTextField();\r\n pnlForm.add(txtBuscar, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\r\n btnSearch = new JButton();\r\n btnSearch.setText(\"Buscar\");\r\n pnlForm.add(btnSearch, cc.xy(5, 1));\r\n pnlGrid.setLayout(new FormLayout(\"fill:d:grow\", \"center:max(d;4px):noGrow,top:4dlu:noGrow,fill:14dlu:noGrow,top:4dlu:noGrow,fill:d:grow\"));\r\n pnlGrid.setMinimumSize(new Dimension(400, 333));\r\n pnlGrid.setPreferredSize(new Dimension(500, 333));\r\n pnlMain.add(pnlGrid, cc.xy(1, 3));\r\n pnlTitGrid = new JPanel();\r\n pnlTitGrid.setLayout(new FormLayout(\"fill:16dlu:noGrow,left:4dlu:noGrow,fill:100dlu:noGrow\", \"fill:16dlu:noGrow\"));\r\n pnlGrid.add(pnlTitGrid, cc.xy(1, 1));\r\n chkSel = new JCheckBox();\r\n chkSel.setText(\"\");\r\n pnlTitGrid.add(chkSel, cc.xy(1, 1));\r\n lblTitGrid = new JLabel();\r\n lblTitGrid.setText(\"Lista de Laboratorios\");\r\n pnlTitGrid.add(lblTitGrid, cc.xy(3, 1));\r\n pnlResult = new JScrollPane();\r\n pnlResult.setMinimumSize(new Dimension(400, 300));\r\n pnlResult.setPreferredSize(new Dimension(500, 300));\r\n pnlGrid.add(pnlResult, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.FILL));\r\n tblGrid = new JTable();\r\n pnlResult.setViewportView(tblGrid);\r\n pnlToolBarGrid = new JPanel();\r\n pnlToolBarGrid.setLayout(new FormLayout(\"\", \"\"));\r\n pnlGrid.add(pnlToolBarGrid, cc.xy(1, 3));\r\n footerPanel = new JPanel();\r\n footerPanel.setLayout(new FormLayout(\"fill:d:noGrow,left:4dlu:noGrow,right:d:grow\", \"fill:d:grow\"));\r\n pnlMain.add(footerPanel, cc.xy(1, 5));\r\n lblEnter = new JLabel();\r\n lblEnter.setText(\"F2 = Seleccionar\");\r\n footerPanel.add(lblEnter, cc.xy(1, 1));\r\n lblEsc = new JLabel();\r\n lblEsc.setText(\"Esc = Salir\");\r\n footerPanel.add(lblEsc, cc.xy(3, 1));\r\n }", "private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new GridLayoutManager(3, 5, new Insets(0, 5, 5, 5), -1, -1));\n worldMap = new JPanel();\n worldMap.setLayout(new GridBagLayout());\n worldMap.setBackground(new Color(-1250068));\n rootPanel.add(worldMap, new GridConstraints(1, 0, 2, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(500, 500), null, null, 0, false));\n simulationTime = new JLabel();\n simulationTime.setText(\"0s\");\n rootPanel.add(simulationTime, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Simulation time:\");\n rootPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n rootPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n averageWaitingTime = new JLabel();\n averageWaitingTime.setText(\"0s\");\n rootPanel.add(averageWaitingTime, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Average waiting time\");\n rootPanel.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setupLayout()\n\t{\n\t\tbaseLayout.putConstraint(SpringLayout.WEST,firstButton,107,SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstButton, -32, SpringLayout.SOUTH, this);\n\t\tbaseLayout.putConstraint(SpringLayout.WEST, firstField, 37, SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstField, -24, SpringLayout.SOUTH, this);\n\t}", "private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(8, 4, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(mainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n mainPanel.setBorder(BorderFactory.createTitledBorder(\"New Mapper Pattern Keywords\"));\n final JLabel label1 = new JLabel();\n label1.setText(\"Insert\");\n mainPanel.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n insertPatternTextField = new JTextField();\n mainPanel.add(insertPatternTextField, new GridConstraints(2, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Delete\");\n mainPanel.add(label2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n deletePatternTextField = new JTextField();\n mainPanel.add(deletePatternTextField, new GridConstraints(3, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Update\");\n mainPanel.add(label3, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n updatePatternTextField = new JTextField();\n mainPanel.add(updatePatternTextField, new GridConstraints(4, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"Select\");\n mainPanel.add(label4, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n selectPatternTextField = new JTextField();\n mainPanel.add(selectPatternTextField, new GridConstraints(5, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Patterns should be separated with \\\";\\\"\");\n mainPanel.add(label5, new GridConstraints(0, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n modelComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"startWith\");\n defaultComboBoxModel1.addElement(\"endWith\");\n defaultComboBoxModel1.addElement(\"contain\");\n modelComboBox.setModel(defaultComboBoxModel1);\n mainPanel.add(modelComboBox, new GridConstraints(1, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n mainPanel.add(spacer1, new GridConstraints(7, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Model\");\n mainPanel.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n openNaviButton = new JRadioButton();\n openNaviButton.setText(\"开\");\n mainPanel.add(openNaviButton, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED\n , null, null, null, 0, false));\n openNaviLabel = new JLabel();\n openNaviLabel.setText(\"导航开关\");\n mainPanel.add(openNaviLabel, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n closeNaviRadioButton = new JRadioButton();\n closeNaviRadioButton.setText(\"关\");\n mainPanel.add(closeNaviRadioButton, new GridConstraints(6, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setupSettings() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n this.$$$loadButtonText$$$(buttonCancel, ResourceBundle.getBundle(\"strings\").getString(\"cancel\"));\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"strings\").getString(\"resource-name\"));\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n nameField = new JTextField();\n panel3.add(nameField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label2 = new JLabel();\n this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle(\"strings\").getString(\"resource-availability\"));\n panel3.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel3.add(scrollPane1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(availabilitiesList);\n label1.setLabelFor(nameField);\n }", "private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }", "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 void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel1.setBackground(new Color(-1184275));\n panel1.setForeground(new Color(-4473925));\n mainPanel.add(panel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setBackground(new Color(-12828863));\n Font label1Font = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 16, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n label1.setForeground(new Color(-12828863));\n label1.setText(\"Scheduler\");\n panel1.add(label1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 2, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n Font label2Font = this.$$$getFont$$$(\"Georgia\", -1, 14, label2.getFont());\n if (label2Font != null) label2.setFont(label2Font);\n label2.setText(\"Select the Type of Scheduler \");\n panel1.add(label2, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n dropDown = new JComboBox();\n Font dropDownFont = this.$$$getFont$$$(\"Georgia\", -1, 14, dropDown.getFont());\n if (dropDownFont != null) dropDown.setFont(dropDownFont);\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"Shortest Remaining Process Time\");\n defaultComboBoxModel1.addElement(\"Earliest Deadline First\");\n defaultComboBoxModel1.addElement(\"Deadline Monotonic\");\n dropDown.setModel(defaultComboBoxModel1);\n panel1.add(dropDown, new com.intellij.uiDesigner.core.GridConstraints(0, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n Font label3Font = this.$$$getFont$$$(\"Georgia\", -1, 14, label3.getFont());\n if (label3Font != null) label3.setFont(label3Font);\n label3.setText(\"Current Task\");\n panel1.add(label3, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n currentField = new JTextField();\n currentField.setBackground(new Color(-3873281));\n currentField.setEditable(false);\n Font currentFieldFont = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, currentField.getFont());\n if (currentFieldFont != null) currentField.setFont(currentFieldFont);\n panel1.add(currentField, new com.intellij.uiDesigner.core.GridConstraints(1, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel2, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n Font label4Font = this.$$$getFont$$$(\"Georgia\", -1, 14, label4.getFont());\n if (label4Font != null) label4.setFont(label4Font);\n label4.setText(\"Current Task Progress \");\n panel2.add(label4, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 3, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n progressBar1 = new JProgressBar();\n panel2.add(progressBar1, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 3, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n taskList = new JList();\n taskList.setBackground(new Color(-5186305));\n Font taskListFont = this.$$$getFont$$$(\"Georgia\", -1, 14, taskList.getFont());\n if (taskListFont != null) taskList.setFont(taskListFont);\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n taskList.setModel(defaultListModel1);\n taskList.setSelectionBackground(new Color(-13220097));\n taskList.setSelectionForeground(new Color(-1));\n taskList.setSelectionMode(0);\n panel2.add(taskList, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 3, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n tickButton = new JButton();\n Font tickButtonFont = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, tickButton.getFont());\n if (tickButtonFont != null) tickButton.setFont(tickButtonFont);\n tickButton.setText(\"Tick\");\n panel2.add(tickButton, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n switchButton = new JButton();\n Font switchButtonFont = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, switchButton.getFont());\n if (switchButtonFont != null) switchButton.setFont(switchButtonFont);\n switchButton.setText(\"Switch\");\n panel2.add(switchButton, new com.intellij.uiDesigner.core.GridConstraints(2, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n delButton = new JButton();\n Font delButtonFont = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, delButton.getFont());\n if (delButtonFont != null) delButton.setFont(delButtonFont);\n delButton.setText(\"Delete\");\n panel2.add(delButton, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(8, 2, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel3, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label5 = new JLabel();\n Font label5Font = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, label5.getFont());\n if (label5Font != null) label5.setFont(label5Font);\n label5.setText(\"Add New Tasks\");\n panel3.add(label5, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n Font label6Font = this.$$$getFont$$$(\"Georgia\", -1, 14, label6.getFont());\n if (label6Font != null) label6.setFont(label6Font);\n label6.setText(\"Task\");\n panel3.add(label6, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n taskName = new JTextField();\n Font taskNameFont = this.$$$getFont$$$(\"Georgia\", -1, 14, taskName.getFont());\n if (taskNameFont != null) taskName.setFont(taskNameFont);\n panel3.add(taskName, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label7 = new JLabel();\n Font label7Font = this.$$$getFont$$$(\"Georgia\", -1, 14, label7.getFont());\n if (label7Font != null) label7.setFont(label7Font);\n label7.setText(\"Estimated Completion Time (hours) \");\n panel3.add(label7, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n RemTime = new JTextField();\n Font RemTimeFont = this.$$$getFont$$$(\"Georgia\", -1, 14, RemTime.getFont());\n if (RemTimeFont != null) RemTime.setFont(RemTimeFont);\n panel3.add(RemTime, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label8 = new JLabel();\n Font label8Font = this.$$$getFont$$$(\"Georgia\", -1, 14, label8.getFont());\n if (label8Font != null) label8.setFont(label8Font);\n label8.setText(\"Time Till Task is Due (hours)\");\n panel3.add(label8, new com.intellij.uiDesigner.core.GridConstraints(5, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n relDeadline = new JTextField();\n Font relDeadlineFont = this.$$$getFont$$$(\"Georgia\", -1, 14, relDeadline.getFont());\n if (relDeadlineFont != null) relDeadline.setFont(relDeadlineFont);\n panel3.add(relDeadline, new com.intellij.uiDesigner.core.GridConstraints(6, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n saveNewButton = new JButton();\n Font saveNewButtonFont = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, saveNewButton.getFont());\n if (saveNewButtonFont != null) saveNewButton.setFont(saveNewButtonFont);\n saveNewButton.setText(\"Save New\");\n panel3.add(saveNewButton, new com.intellij.uiDesigner.core.GridConstraints(7, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n saveExistingButton = new JButton();\n Font saveExistingButtonFont = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, saveExistingButton.getFont());\n if (saveExistingButtonFont != null) saveExistingButton.setFont(saveExistingButtonFont);\n saveExistingButton.setText(\"Save Existing\");\n panel3.add(saveExistingButton, new com.intellij.uiDesigner.core.GridConstraints(7, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n clearButton = new JButton();\n Font clearButtonFont = this.$$$getFont$$$(\"Georgia\", Font.BOLD, 14, clearButton.getFont());\n if (clearButtonFont != null) clearButton.setFont(clearButtonFont);\n clearButton.setText(\"Clear Form\");\n panel3.add(clearButton, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tthis.add(firstButton);\n\t\tthis.add(firstField);\n\t}", "public Grid() {\n super(); // create a new JPanel\n grid = new ArrayList<>(); // initialize a list containing the blocks\n \n setLayout(null); // format the component\n setFocusable(false);\n setBackground(Block.deadColor);\n addComponentListener(new java.awt.event.ComponentAdapter() { // detects when the window is resized to resize the grid\n @Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }\n });\n \n // provide a link to the grid to classes so that all instances have access to it\n PathFinder.setGrid(this);\n EscapeBlock.setGrid(this);\n Character.setGrid(this);\n \n }", "private void init(){\n panel_principal = new JPanel();\r\n panel_principal.setLayout(new BorderLayout());\r\n //EN EL NORTE IRA LA CAJA DE TEXTO\r\n caja = new JTextField();\r\n panel_principal.add(\"North\",caja);\r\n //EN EL CENTRO IRA EL PANEL DE BOTONES\r\n panel_botones = new JPanel();\r\n //El GRIDLAYOUT RECIBE COMO PARAMETROS:\r\n //FILAS,COLUMNAS ESPACIADO ENTRE FILAS,\r\n //ESPACIADO ENTRE COLUMNAS\r\n panel_botones.setLayout(new GridLayout(5,4,8,8));\r\n agregarBotones();\r\n panel_principal.add(\"Center\",panel_botones);\r\n //AGREGAMOS TODO EL CONTENIDO QUE ACABAMOS DE HACER EN\r\n //PANEL_PRINCIPAL A EL PANEL DEL FORMULARIO\r\n getContentPane().add(panel_principal);\r\n\r\n }", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(3, 3, new Insets(11, 11, 11, 11), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 4, 4, 4), -1, -1));\n contentPane.add(panel1,\n new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Magnetometer\"));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(7, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n magnetometerPort = new JComboBox();\n panel2.add(magnetometerPort,\n new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label1 = new JLabel();\n label1.setText(\"COM port:\");\n panel2.add(label1,\n new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label2 = new JLabel();\n label2.setText(\"Calibration constant with polarity (Amē/flux quantum)\");\n panel2.add(label2,\n new GridConstraints(2, 0, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label3 = new JLabel();\n label3.setText(\"X\");\n panel2.add(label3,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label4 = new JLabel();\n label4.setText(\"Y\");\n panel2.add(label4,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label5 = new JLabel();\n label5.setText(\"Z\");\n panel2.add(label5,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n yAxisCalibration = new JFormattedTextField();\n yAxisCalibration.setHorizontalAlignment(4);\n panel2.add(yAxisCalibration,\n new GridConstraints(4, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n xAxisCalibration = new JFormattedTextField();\n xAxisCalibration.setHorizontalAlignment(4);\n panel2.add(xAxisCalibration,\n new GridConstraints(3, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n zAxisCalibration = new JFormattedTextField();\n zAxisCalibration.setHorizontalAlignment(4);\n panel2.add(zAxisCalibration,\n new GridConstraints(5, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final Spacer spacer1 = new Spacer();\n panel2.add(spacer1,\n new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,\n GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 4, 4, 4), -1, -1));\n contentPane.add(panel3,\n new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n panel3.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Demagnetizer\"));\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(panel4,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n final Spacer spacer2 = new Spacer();\n panel4.add(spacer2,\n new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,\n GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null));\n final JPanel panel5 = new JPanel();\n panel5.setLayout(new GridLayoutManager(8, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel4.add(panel5,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n final JLabel label6 = new JLabel();\n label6.setText(\"COM port:\");\n panel5.add(label6,\n new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label7 = new JLabel();\n label7.setText(\"Ramp\");\n panel5.add(label7,\n new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label8 = new JLabel();\n label8.setText(\"Delay\");\n panel5.add(label8,\n new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label9 = new JLabel();\n label9.setText(\"Maximum Field\");\n panel5.add(label9,\n new GridConstraints(5, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n maximumField = new JFormattedTextField();\n maximumField.setHorizontalAlignment(4);\n panel5.add(maximumField,\n new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n demagRamp = new JComboBox();\n panel5.add(demagRamp,\n new GridConstraints(6, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n demagDelay = new JComboBox();\n panel5.add(demagDelay,\n new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n demagnetizerPort = new JComboBox();\n panel5.add(demagnetizerPort,\n new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JPanel panel6 = new JPanel();\n panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 4, 4, 4), -1, -1));\n contentPane.add(panel6,\n new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n panel6.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Handler\"));\n final JPanel panel7 = new JPanel();\n panel7.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel6.add(panel7,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n final JPanel panel8 = new JPanel();\n panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel7.add(panel8,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n final JPanel panel9 = new JPanel();\n panel9.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel8.add(panel9,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n final JPanel panel10 = new JPanel();\n panel10.setLayout(new GridLayoutManager(17, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel9.add(panel10,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n rotation = new JFormattedTextField();\n rotation.setHorizontalAlignment(4);\n panel10.add(rotation,\n new GridConstraints(15, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label10 = new JLabel();\n label10.setText(\"Rotation counts\");\n panel10.add(label10,\n new GridConstraints(15, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final Spacer spacer3 = new Spacer();\n panel10.add(spacer3,\n new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,\n GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null));\n deceleration = new JFormattedTextField();\n deceleration.setHorizontalAlignment(4);\n panel10.add(deceleration,\n new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label11 = new JLabel();\n label11.setText(\"Velocity\");\n panel10.add(label11,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n velocity = new JFormattedTextField();\n velocity.setHorizontalAlignment(4);\n panel10.add(velocity,\n new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label12 = new JLabel();\n label12.setText(\"Velocity Meas.\");\n panel10.add(label12,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n measurementVelocity = new JFormattedTextField();\n measurementVelocity.setHorizontalAlignment(4);\n panel10.add(measurementVelocity,\n new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label13 = new JLabel();\n label13.setText(\"Transverse Y AF\");\n panel10.add(label13,\n new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n transverseYAFPosition = new JFormattedTextField();\n transverseYAFPosition.setHorizontalAlignment(4);\n panel10.add(transverseYAFPosition,\n new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label14 = new JLabel();\n label14.setText(\"Translation positions\");\n panel10.add(label14,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label15 = new JLabel();\n label15.setText(\"Axial AF\");\n panel10.add(label15,\n new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n axialAFPosition = new JFormattedTextField();\n axialAFPosition.setHorizontalAlignment(4);\n panel10.add(axialAFPosition,\n new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label16 = new JLabel();\n label16.setText(\"Sample Load\");\n panel10.add(label16,\n new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n sampleLoadPosition = new JFormattedTextField();\n sampleLoadPosition.setHorizontalAlignment(4);\n panel10.add(sampleLoadPosition,\n new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label17 = new JLabel();\n label17.setText(\"Background\");\n panel10.add(label17,\n new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n backgroundPosition = new JFormattedTextField();\n backgroundPosition.setHorizontalAlignment(4);\n panel10.add(backgroundPosition,\n new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label18 = new JLabel();\n label18.setText(\"Measurement\");\n panel10.add(label18,\n new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n measurementPosition = new JFormattedTextField();\n measurementPosition.setHorizontalAlignment(4);\n panel10.add(measurementPosition,\n new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n rotationAcc = new JFormattedTextField();\n rotationAcc.setHorizontalAlignment(4);\n panel10.add(rotationAcc,\n new GridConstraints(13, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n rotationVelocity = new JFormattedTextField();\n rotationVelocity.setHorizontalAlignment(4);\n rotationVelocity.setText(\"\");\n panel10.add(rotationVelocity,\n new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n rotationDec = new JFormattedTextField();\n rotationDec.setHorizontalAlignment(4);\n panel10.add(rotationDec,\n new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label19 = new JLabel();\n label19.setText(\"Rotation acc.\");\n panel10.add(label19,\n new GridConstraints(13, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label20 = new JLabel();\n label20.setText(\"Rotation velocity\");\n panel10.add(label20,\n new GridConstraints(12, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label21 = new JLabel();\n label21.setText(\"Rotation dec.\");\n panel10.add(label21,\n new GridConstraints(14, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label22 = new JLabel();\n label22.setText(\"COM port:\");\n panel10.add(label22,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n handlerPort = new JComboBox();\n panel10.add(handlerPort,\n new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JLabel label23 = new JLabel();\n label23.setText(\"Acceleration\");\n panel10.add(label23,\n new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n acceleration = new JFormattedTextField();\n acceleration.setHorizontalAlignment(4);\n panel10.add(acceleration,\n new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,\n new Dimension(150, -1), null));\n final JLabel label24 = new JLabel();\n label24.setText(\"Deceleration\");\n panel10.add(label24,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final JPanel panel11 = new JPanel();\n panel11.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel11,\n new GridConstraints(2, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n panel11.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));\n final JPanel panel12 = new JPanel();\n panel12.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));\n panel11.add(panel12,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null));\n cancelButton = new JButton();\n cancelButton.setText(\"Cancel\");\n panel12.add(cancelButton,\n new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final Spacer spacer4 = new Spacer();\n panel12.add(spacer4,\n new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null));\n saveButton = new JButton();\n saveButton.setText(\"Save\");\n panel12.add(saveButton,\n new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n final Spacer spacer5 = new Spacer();\n panel12.add(spacer5,\n new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null));\n warningLabel = new JLabel();\n warningLabel.setHorizontalAlignment(0);\n warningLabel.setHorizontalTextPosition(0);\n warningLabel.setText(\"WARNING! Incorrect configuration may damage the equipment.\");\n contentPane.add(warningLabel,\n new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setMinimumSize(new Dimension(-1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n nodeList.setSelectionMode(1);\n scrollPane1.setViewportView(nodeList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addNodeButton = new JButton();\n this.$$$loadButtonText$$$(addNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_addNode\"));\n panel1.add(addNodeButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n removeNodeButton = new JButton();\n this.$$$loadButtonText$$$(removeNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_removeNode\"));\n panel1.add(removeNodeButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Droid Sans Mono\", Font.BOLD, 16, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"language\").getString(\"title_nodes\"));\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void init() {\n\t\tsetModal(true);\n\t\t\n\t\tsetResizable(false);\n\t\tgetContentPane().setLayout(new GridBagLayout());\n\t\tc = new GridBagConstraints();\n\t\tc.insets = new Insets(10, 10, 10, 10);\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t}", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootTabControl = new JTabbedPane();\n panel1.add(rootTabControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n }", "private void setGridSize() {\n int width = Math.max(boardView.windowWidth(), buttonPanel.getWidth());\n\n int height = points.getHeight() + boardView.windowHeight() + buttonPanel.getHeight();\n\n setSize(width, height);\n }", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n mainPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n listResults = new JList();\n listResults.setDoubleBuffered(true);\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n listResults.setModel(defaultListModel1);\n listResults.setValueIsAdjusting(false);\n scrollPane1.setViewportView(listResults);\n mainButton = new JButton();\n mainButton.setText(\"Button\");\n mainPanel.add(mainButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n radioButtonAllStyles = new JRadioButton();\n radioButtonAllStyles.setLabel(\"Alle Styles\");\n radioButtonAllStyles.setSelected(true);\n radioButtonAllStyles.setText(\"Alle Styles\");\n panel1.add(radioButtonAllStyles, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n radioButtonStyle = new JRadioButton();\n radioButtonStyle.setLabel(\"Ein Style\");\n radioButtonStyle.setSelected(false);\n radioButtonStyle.setText(\"Ein Style\");\n panel1.add(radioButtonStyle, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n radioButtonAllBeers = new JRadioButton();\n radioButtonAllBeers.setLabel(\"Alle Biere\");\n radioButtonAllBeers.setText(\"Alle Biere\");\n panel1.add(radioButtonAllBeers, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n radioButtonBeerWithId = new JRadioButton();\n radioButtonBeerWithId.setActionCommand(\"Beer mit bestimmter Style\");\n radioButtonBeerWithId.setLabel(\"Beer mit bestimmter Id\");\n radioButtonBeerWithId.setText(\"Beer mit bestimmter Id\");\n panel1.add(radioButtonBeerWithId, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldArgs = new JTextField();\n mainPanel.add(textFieldArgs, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n }", "private void layoutComponents() {\n setLayout(new MigLayout(\"fill, wrap 1, hidemode 3, \"\n + (padding ? \"ins rel\" : \"ins 0\")));\n\n add(infoLabel, \"growx\");\n add(scrollPane, \"grow, pushy\");\n add(addOptionPanel, \"growx\");\n }", "private void initComponents() {\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(2);\n add(rootLayout);\n Empsn_Label= new nextapp.echo2.app.Label();\n Empsn_Label.setText(\"N_TIME_BEAR.EMPSN\");\n rootLayout.add(Empsn_Label);\n \n Empsn_DscField = new dsc.echo2app.component.DscField();\n Empsn_DscField.setId(\"Empsn_DscField\");\n Empsn_DscField.setWidth(new Extent(4, Extent.CM));\n rootLayout.add(Empsn_DscField);\n \n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(4, 4, new Insets(10, 10, 10, 10), -1, -1));\n mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));\n final JLabel label1 = new JLabel();\n label1.setText(\"Title\");\n mainPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldTitle = new JTextField();\n textFieldTitle.setEditable(false);\n mainPanel.add(textFieldTitle, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Owner\");\n mainPanel.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldOwner = new JTextField();\n textFieldOwner.setEditable(false);\n mainPanel.add(textFieldOwner, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Last edition\");\n mainPanel.add(label3, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"By\");\n label4.setVerifyInputWhenFocusTarget(true);\n mainPanel.add(label4, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldTimestamp = new JTextField();\n textFieldTimestamp.setEditable(false);\n mainPanel.add(textFieldTimestamp, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n textFieldLastEditor = new JTextField();\n textFieldLastEditor.setEditable(false);\n mainPanel.add(textFieldLastEditor, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n PanelButtons = new JPanel();\n PanelButtons.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(PanelButtons, new GridConstraints(3, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n shareButton = new JButton();\n shareButton.setText(\"Share\");\n PanelButtons.add(shareButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n closeButton = new JButton();\n closeButton.setText(\"Close\");\n PanelButtons.add(closeButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n saveButton = new JButton();\n saveButton.setText(\"Save\");\n PanelButtons.add(saveButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n mainPanel.add(scrollPane1, new GridConstraints(2, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 300), null, 0, false));\n textAreaContent = new JTextArea();\n textAreaContent.setLineWrap(true);\n scrollPane1.setViewportView(textAreaContent);\n }", "private void setupSwing() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n \r\n try {\r\n for (LookAndFeelInfo info: UIManager.getInstalledLookAndFeels()) {\r\n if (info.getName().equals(\"Windows\")) {\r\n UIManager.setLookAndFeel(info.getClassName());\r\n }\r\n }\r\n } catch (ClassNotFoundException \r\n | InstantiationException\r\n | IllegalAccessException \r\n | UnsupportedLookAndFeelException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n \r\n window = new ManagerWindow(MetagridManager.this);\r\n window.pack();\r\n window.setVisible(true);\r\n }\r\n });\r\n }", "private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints1 = new GridBagConstraints();\r\n\t\tgridBagConstraints1.gridx = 0;\r\n\t\tgridBagConstraints1.gridy = 1;\r\n\t\tlaunchSubLabel = new JLabel();\r\n\t\tlaunchSubLabel.setText(Message.getMessage(\"reportmaker.process.sublabel\"));\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.gridx = 0;\r\n\t\tgridBagConstraints.gridy = 0;\r\n\t\tthis.setSize(800, 400);\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setPreferredSize(new Dimension(800, 400));\r\n\t\tthis.setBackground(Color.white);\r\n\t\tthis.add(getLaunchButton(), gridBagConstraints);\r\n\r\n\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\r\n\t\tgridBagConstraints2.insets = new Insets(50, 0, 0, 0);\r\n\t\tgridBagConstraints2.gridx = 0;\r\n\t\tgridBagConstraints2.gridy = 2;\r\n\t\tthis.add(getViewButton(), gridBagConstraints2);\r\n\t\tthis.add(launchSubLabel, gridBagConstraints1);\r\n\t}", "public void init() {\n setLayout(new BorderLayout());\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel1.add(scrollPane1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n table1.setAutoscrolls(true);\n table1.setColumnSelectionAllowed(false);\n scrollPane1.setViewportView(table1);\n }", "private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTHWEST;\r\n\t\tgridBagConstraints.weightx = 1.0D;\r\n\t\tgridBagConstraints.weighty = 1.0D;\r\n\t\tgridBagConstraints.fill = GridBagConstraints.BOTH;\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.gray, 1));\r\n\t\tthis.add(getJTree(), gridBagConstraints);\r\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(300, 200);\n this.setPreferredSize(new java.awt.Dimension(450, 116));\n this.add(getListPanel(), java.awt.BorderLayout.CENTER);\n this.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n }", "private void setUp() {\r\n add(myNextPiece, BorderLayout.NORTH);\r\n add(myScorePanel, BorderLayout.CENTER);\r\n add(myControl, BorderLayout.SOUTH);\r\n }", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "private void $$$setupUI$$$() {\n myContentPanel = new JPanel();\n myContentPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n myContentPanel.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n myAcceptYoursButton = new JButton();\n myAcceptYoursButton.setEnabled(false);\n myAcceptYoursButton.setText(\"Accept Yours\");\n myAcceptYoursButton.setMnemonic('Y');\n myAcceptYoursButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptYoursButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myAcceptTheirsButton = new JButton();\n myAcceptTheirsButton.setEnabled(false);\n myAcceptTheirsButton.setText(\"Accept Theirs\");\n myAcceptTheirsButton.setMnemonic('T');\n myAcceptTheirsButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptTheirsButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myMergeButton = new JButton();\n myMergeButton.setEnabled(false);\n myMergeButton.setText(\"Merge\");\n myMergeButton.setMnemonic('M');\n myMergeButton.setDisplayedMnemonicIndex(0);\n panel1.add(myMergeButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JBScrollPane jBScrollPane1 = new JBScrollPane();\n myContentPanel.add(jBScrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myItemsTable = new JBTable();\n myItemsTable.putClientProperty(\"Table.isFileList\", Boolean.FALSE);\n jBScrollPane1.setViewportView(myItemsTable);\n }", "private void initComponents() {\n \n /* Set JPanel Properties */\n \n container = new JPanel();\n container.setLayout(new BorderLayout());\n container.setBackground(Color.BLACK);\n \n /* Create Title Banner */\n \n banner = new JLabel(\"\", SwingConstants.CENTER);\n banner.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));\n banner.setIcon(new ImageIcon(getClass().getResource(ICON_ROOT + BANNER_ICON_FILE)));\n \n /* Create Status Line */\n \n status = new JLabel(\"\", SwingConstants.CENTER);\n status.setPreferredSize(new Dimension(0, 32));\n status.setForeground(Color.WHITE);\n \n /* Create Sound Clips */\n \n splash = Applet.newAudioClip(getClass().getResource(SOUND_ROOT + SPLASH_SOUND_FILE));\n boom = Applet.newAudioClip(getClass().getResource(SOUND_ROOT + BOOM_SOUND_FILE));\n \n /* Create Grid Containers */\n \n c1 = new ViewGridContainer(p1); /* Player 1 Primary */\n c1.setTitle(\"Player 1: Primary Grid\");\n \n c2 = new ViewGridContainer(t1); /* Player 1 Tracking */\n c2.setTitle(\"Player 1: Tracking Grid\");\n \n c3 = new ViewGridContainer(p2); /* Player 2 Primary */\n c3.setTitle(\"Player 2: Primary Grid\");\n \n c4 = new ViewGridContainer(t2); /* Player 2 Tracking */\n c4.setTitle(\"Player 2: Tracking Grid\");\n \n /* \n * Create cards. These are the containers for the players' Grids, which\n * are created as a stack of \"cards\" that can be enabled and brought to\n * the foreground with the \"showCard()\" method. As the players take\n * their turns, their respective cards are shown, with an empty card\n * shown between moves so that two players sharing one computer can play\n * the game with their repsective Grids remaining hidden from their\n * opponent.\n *\n * To implement the stack of cards, the containing JPanel uses the\n * CardLayout layout manager; within each card, the containing JPanels\n * use the BorderLayout layout manager, so that the Primary and Tracking\n * Grids can be arranged in the correct order.\n */\n \n cards = new JPanel();\n cards.setLayout(new CardLayout());\n cards.setBackground(Color.BLACK);\n \n /* Player 1 Card (containing Primary and Tracking grids) */\n \n JPanel card1 = new JPanel();\n card1.setLayout(new BorderLayout());\n card1.add(c1, BorderLayout.LINE_START);\n card1.add(c2, BorderLayout.LINE_END);\n card1.setVisible(false);\n \n /* Player 2 Card (containing Primary and Tracking grids) */\n \n JPanel card2 = new JPanel();\n card2.setLayout(new BorderLayout());\n card2.add(c3, BorderLayout.LINE_START);\n card2.add(c4, BorderLayout.LINE_END);\n card2.setVisible(false);\n \n /* Empty Card (to hide opposing players' fleets between turns) */\n \n JPanel empty = new JPanel();\n empty.setLayout(new BorderLayout());\n empty.setBackground(Color.BLACK);\n empty.setVisible(false);\n \n /* Add Cards to CardLayout */\n \n cards.add(card1, PLAYER_1);\n cards.add(card2, PLAYER_2);\n cards.add(empty, EMPTY_CARD);\n\n /* Create Main Menu Bar */\n \n JMenuBar menuBar = new JMenuBar();\n \n /* \"File\" Menu, Menu Items, and Listener(s) */\n \n JMenu menuFile = new JMenu(\"File\");\n JMenuItem menuItemSounds = new JMenuItem(\"Enable/Disable Sounds\");\n JMenuItem menuItemExit = new JMenuItem(\"Exit\");\n menuFile.add(menuItemSounds);\n menuFile.add(menuItemExit);\n \n menuItemSounds.addActionListener((java.awt.event.ActionEvent e) -> {\n soundEnabled = !soundEnabled;\n });\n \n menuItemExit.addActionListener((java.awt.event.ActionEvent e) -> {\n System.exit(0);\n });\n \n /* \"Help\" Menu, Menu Items, and Listener(s) */\n \n JMenu menuHelp = new JMenu(\"Help\");\n JMenuItem menuItemAbout = new JMenuItem(\"About\");\n menuHelp.add(menuItemAbout);\n \n menuItemAbout.addActionListener((java.awt.event.ActionEvent e) -> {\n showAboutDialog();\n });\n \n menuBar.add(menuFile);\n menuBar.add(menuHelp);\n \n /* Add Menu Bar to Window */\n \n this.setJMenuBar(menuBar);\n \n /* Assemble Main Window */\n \n container.add(banner, BorderLayout.PAGE_START);\n container.add(cards, BorderLayout.CENTER);\n container.add(status, BorderLayout.PAGE_END);\n \n this.getContentPane().add(container);\n \n }", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(11, 3, new Insets(0, 0, 0, 0), -1, -1));\n bKillSession = new JButton();\n bKillSession.setText(\"Убить сессии\");\n rootPanel.add(bKillSession, new com.intellij.uiDesigner.core.GridConstraints(0, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bGetAll = new JButton();\n bGetAll.setText(\"Получить график\");\n rootPanel.add(bGetAll, new com.intellij.uiDesigner.core.GridConstraints(1, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bStartBS = new JButton();\n bStartBS.setText(\"Старт БС\");\n rootPanel.add(bStartBS, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bSetFreq = new JButton();\n bSetFreq.setText(\"Установить частоту\");\n rootPanel.add(bSetFreq, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n tfFreq = new JTextField();\n rootPanel.add(tfFreq, new com.intellij.uiDesigner.core.GridConstraints(2, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n cbDefaultBS = new JCheckBox();\n cbDefaultBS.setSelected(true);\n cbDefaultBS.setText(\"Использовать БС из конфига\");\n rootPanel.add(cbDefaultBS, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 3, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n rootPanel.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(7, 2, 4, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n cbListMethods = new JComboBox();\n rootPanel.add(cbListMethods, new com.intellij.uiDesigner.core.GridConstraints(5, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Запускаемый метод:\");\n rootPanel.add(label1, new com.intellij.uiDesigner.core.GridConstraints(5, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n rootPanel.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(7, 0, 4, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n lblParams = new JLabel();\n lblParams.setText(\"Label\");\n rootPanel.add(lblParams, new com.intellij.uiDesigner.core.GridConstraints(6, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(panel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n bPause = new JButton();\n bPause.setText(\"Пауза\");\n panel1.add(bPause, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bStart = new JButton();\n bStart.setText(\"Старт\");\n panel1.add(bStart, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JSeparator separator1 = new JSeparator();\n rootPanel.add(separator1, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 3, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "private void addGrid() {\n\n\t\tList<ColumnConfig> configs = new LinkedList<ColumnConfig>();\n\n\t\tColumnConfig column = new ColumnConfig(InheritedComponentInstanceSelModelData.PROPERTY_ID, messages\n\t\t\t.columnHeaderId(), 15);\n\t\tcolumn.setSortable(false);\n\t\tcolumn.setRenderer(idCellRenderer);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig(Constants.PROPERTY_KEY, Constants.EMPTY_STRING, 15);\n\t\tcolumn.setRenderer(gearCellRenderer);\n\t\tcolumn.setSortable(false);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(Constants.PROPERTY_NAME);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderName());\n\t\tcolumn.setWidth(COLUMN_NAME_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderModule());\n\t\tcolumn.setWidth(COLUMN_MODULE_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_CONFIGURATION);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderConfiguration());\n\t\tcolumn.setWidth(COLUMN_CONFIGURATION_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean configuration = model.getDTO().getConfiguration();\n\t\t\t\tif (configuration == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (configuration) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideConfiguration();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedConfiguration();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_DEPENDENCIES);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderDependences());\n\t\tcolumn.setWidth(COLUMN_DEPENDENCIES_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean dependencies = model.getDTO().getDependencies();\n\t\t\t\tif (dependencies == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (dependencies) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideDependences();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedDependences();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tColumnModel cm = new ColumnModel(configs);\n\n\t\tstore = new ListStore<InheritedComponentInstanceSelModelData>();\n\t\tstore.setStoreSorter((StoreSorter) storeSorter);\n\t\tstore.setSortField(ModuleInstanceSelModelData.PROPERTY_NAME);\n\n\t\tgrid = new Grid<InheritedComponentInstanceSelModelData>(\n\t\t\t(ListStore<InheritedComponentInstanceSelModelData>) store, cm);\n\t\tgrid.setSelectionModel(new GridSelectionModel<InheritedComponentInstanceSelModelData>());\n\t\tgrid.setAutoExpandColumn(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tgrid.setLoadMask(true);\n\n\t\tGridView gridView = grid.getView();\n\t\tgridView.setForceFit(true);\n\n\t\tadd(grid);\n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n usernameField = new JTextField();\n usernameField.setText(\"username\");\n mainPanel.add(usernameField, new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final Spacer spacer1 = new Spacer();\n mainPanel.add(spacer1, new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n passwordField = new JPasswordField();\n passwordField.setText(\"password\");\n mainPanel.add(passwordField, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n loginButton = new JButton();\n loginButton.setText(\"Login\");\n mainPanel.add(loginButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n mainPanel.add(spacer2, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n singupButton = new JButton();\n singupButton.setText(\"SignUp\");\n mainPanel.add(singupButton, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 2, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(11, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Tags\");\n panel1.add(label1, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n listTags = new JList();\n panel1.add(listTags, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addTagButton = new JButton();\n addTagButton.setText(\"Add Tag\");\n panel2.add(addTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n panel2.add(spacer2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n deleteTagButton = new JButton();\n deleteTagButton.setText(\"Delete Tag\");\n panel2.add(deleteTagButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"State\");\n panel1.add(label2, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Media Type\");\n panel1.add(label3, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"New Contributor\");\n panel1.add(label4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel3, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Type\");\n panel3.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboContributorType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"select\");\n defaultComboBoxModel1.addElement(\"USER\");\n defaultComboBoxModel1.addElement(\"MACHINE\");\n comboContributorType.setModel(defaultComboBoxModel1);\n panel3.add(comboContributorType, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Username\");\n panel3.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textUsername = new JTextField();\n panel3.add(textUsername, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label7 = new JLabel();\n label7.setText(\"Created\");\n panel1.add(label7, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textCreatedDate = new JTextField();\n panel1.add(textCreatedDate, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label8 = new JLabel();\n label8.setText(\"Field Sets\");\n panel1.add(label8, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listFieldSets = new JList();\n panel1.add(listFieldSets, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label9 = new JLabel();\n label9.setText(\"Contributors\");\n panel1.add(label9, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listContributors = new JList();\n panel1.add(listContributors, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label10 = new JLabel();\n label10.setText(\"Workgroups\");\n panel1.add(label10, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listWorkgroups = new JList();\n panel1.add(listWorkgroups, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label11 = new JLabel();\n label11.setText(\"Last Updated\");\n panel1.add(label11, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textLastUpdated = new JTextField();\n panel1.add(textLastUpdated, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n comboMediaType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel2 = new DefaultComboBoxModel();\n defaultComboBoxModel2.addElement(\"select\");\n defaultComboBoxModel2.addElement(\"CHAT\");\n defaultComboBoxModel2.addElement(\"EMAIL\");\n defaultComboBoxModel2.addElement(\"EVENT\");\n defaultComboBoxModel2.addElement(\"MOBILE\");\n defaultComboBoxModel2.addElement(\"SOCIAL\");\n defaultComboBoxModel2.addElement(\"VIDEO\");\n defaultComboBoxModel2.addElement(\"VOICE\");\n defaultComboBoxModel2.addElement(\"WEB\");\n comboMediaType.setModel(defaultComboBoxModel2);\n panel1.add(comboMediaType, new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboState = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel3 = new DefaultComboBoxModel();\n defaultComboBoxModel3.addElement(\"select\");\n defaultComboBoxModel3.addElement(\"ACTIVE\");\n defaultComboBoxModel3.addElement(\"CLOSED\");\n comboState.setModel(defaultComboBoxModel3);\n panel1.add(comboState, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label12 = new JLabel();\n label12.setText(\"Pod ID\");\n panel1.add(label12, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldId = new JTextField();\n panel1.add(textFieldId, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel4, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel4.add(spacer3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel5 = new JPanel();\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel4.add(panel5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonSave = new JButton();\n buttonSave.setText(\"Save\");\n panel5.add(buttonSave, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel5.add(buttonClose, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel6 = new JPanel();\n panel6.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(300, -1), null, 0, false));\n panel6.add(panelDataElements, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 1, false));\n final Spacer spacer4 = new Spacer();\n panel6.add(spacer4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n container = new JPanel();\n container.setLayout(new FormLayout(\"fill:335px:noGrow,left:4dlu:noGrow,fill:334px:noGrow\", \"center:d:grow\"));\n container.setBorder(BorderFactory.createTitledBorder(null, \"港机数据采集服务配置\", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font(container.getFont().getName(), container.getFont().getStyle(), container.getFont().getSize()), new Color(-16777216)));\n serverContainer = new JPanel();\n serverContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n CellConstraints cc = new CellConstraints();\n container.add(serverContainer, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL));\n serverContainer.setBorder(BorderFactory.createTitledBorder(\"服务器配置\"));\n serverConfigPanel = new JPanel();\n serverConfigPanel.setLayout(new FormLayout(\"fill:80px:noGrow,left:4dlu:noGrow,fill:225px:grow\", \"center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow\"));\n serverContainer.add(serverConfigPanel);\n serverIpLabel = new JLabel();\n serverIpLabel.setText(\"IP地址\");\n serverConfigPanel.add(serverIpLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverIpTxt = new JTextField();\n serverConfigPanel.add(serverIpTxt, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverPortLabel = new JLabel();\n serverPortLabel.setText(\"端口\");\n serverConfigPanel.add(serverPortLabel, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverPortTxt = new JTextField();\n serverConfigPanel.add(serverPortTxt, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverIntervalLabel = new JLabel();\n serverIntervalLabel.setText(\"监听间隔\");\n serverConfigPanel.add(serverIntervalLabel, cc.xy(1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverIntervalTxt = new JTextField();\n serverConfigPanel.add(serverIntervalTxt, cc.xy(3, 5, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverFileLabel = new JLabel();\n serverFileLabel.setText(\"配置文件路径\");\n serverConfigPanel.add(serverFileLabel, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverFileTxt = new JTextField();\n serverConfigPanel.add(serverFileTxt, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverControlPanel = new JPanel();\n serverControlPanel.setLayout(new FormLayout(\"fill:d:grow,left:4dlu:noGrow,fill:150px:noGrow,left:4dlu:noGrow,fill:150px:grow\", \"center:d:grow,top:4dlu:noGrow,center:42px:grow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n serverContainer.add(serverControlPanel);\n serverSaveBtn = new JButton();\n serverSaveBtn.setText(\"保存\");\n serverControlPanel.add(serverSaveBtn, cc.xy(5, 3));\n serverFileOpener = new JButton();\n serverFileOpener.setText(\"打开\");\n serverControlPanel.add(serverFileOpener, cc.xy(3, 3));\n serverStartBtn = new JButton();\n serverStartBtn.setText(\"启动服务器\");\n serverControlPanel.add(serverStartBtn, cc.xy(3, 5));\n serverStopBtn = new JButton();\n serverStopBtn.setText(\"停止服务器\");\n serverControlPanel.add(serverStopBtn, cc.xy(5, 5));\n redisContainer = new JPanel();\n redisContainer.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n container.add(redisContainer, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\n redisContainer.setBorder(BorderFactory.createTitledBorder(\"Redis配置\"));\n redisConfigPanel = new JPanel();\n redisConfigPanel.setLayout(new FormLayout(\"fill:83px:noGrow,left:4dlu:noGrow,fill:221px:grow\", \"center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow\"));\n redisContainer.add(redisConfigPanel);\n redisIpLabel = new JLabel();\n redisIpLabel.setText(\"IP地址\");\n redisConfigPanel.add(redisIpLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisIpTxt = new JTextField();\n redisConfigPanel.add(redisIpTxt, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisPortLabel = new JLabel();\n redisPortLabel.setText(\"端口\");\n redisConfigPanel.add(redisPortLabel, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisPortTxt = new JTextField();\n redisConfigPanel.add(redisPortTxt, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisExpireLabel = new JLabel();\n redisExpireLabel.setText(\"过期时间\");\n redisConfigPanel.add(redisExpireLabel, cc.xy(1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisExpireTxt = new JTextField();\n redisConfigPanel.add(redisExpireTxt, cc.xy(3, 5, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisFileLabel = new JLabel();\n redisFileLabel.setText(\"配置文件路径\");\n redisConfigPanel.add(redisFileLabel, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisFileTxt = new JTextField();\n redisConfigPanel.add(redisFileTxt, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisControlPanel = new JPanel();\n redisControlPanel.setLayout(new FormLayout(\"fill:d:grow,left:4dlu:noGrow,fill:150px:noGrow,left:4dlu:noGrow,fill:150px:grow\", \"center:d:grow,top:4dlu:noGrow,center:42px:grow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n redisContainer.add(redisControlPanel);\n redisSaveBtn = new JButton();\n redisSaveBtn.setText(\"保存\");\n redisControlPanel.add(redisSaveBtn, cc.xy(5, 3));\n redisFileOpener = new JButton();\n redisFileOpener.setText(\"打开\");\n redisControlPanel.add(redisFileOpener, cc.xy(3, 3));\n redisStartBtn = new JButton();\n redisStartBtn.setText(\"启动服务器\");\n redisControlPanel.add(redisStartBtn, cc.xy(3, 5));\n redisStopBtn = new JButton();\n redisStopBtn.setText(\"停止服务器\");\n redisControlPanel.add(redisStopBtn, cc.xy(5, 5));\n }", "private void setUpPanel() { \n this.setPreferredSize(new Dimension(myWidth, myHeight)); \n // Set this panel as a grid panel with 1 column, 6 rows. \n this.setLayout(new GridLayout(NUM_ROWS, 1)); \n // Create the next piece panel.\n this.myNextPiece = new TetrisNextPiecePanel();\n this.add(myNextPiece); \n // Add another panel which will show game instruction.\n final HowToPlayPanel instructionsPanel = new HowToPlayPanel();\n this.add(instructionsPanel);\n // add the last panel which will show the scores, level, game state etc.\n this.setUpLastPanel();\n }", "protected void adjustGridLayout() {\n\t\tint numColumns = calcNumberOfColumns();\n\t\t((GridLayout) fieldEditorParent.getLayout()).numColumns = numColumns;\n\t\tif (fields != null) {\n\t\t\tfor (int i = 0; i < fields.size(); i++) {\n\t\t\t\tFieldEditor fieldEditor = fields.get(i);\n\t\t\t\tfieldEditor.fillIntoGrid(fieldEditorParent, numColumns);\n\t\t\t}\n\t\t}\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));\n btnPanel = new JPanel();\n btnPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(btnPanel, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n btnPanel.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n btnPanel2 = new JPanel();\n btnPanel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n btnPanel.add(btnPanel2, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n btnPanel2.add(buttonOK, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n contentPanel = new JPanel();\n contentPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(contentPanel, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n content = new JTextArea();\n content.setBackground(new Color(-1118482));\n content.setEditable(false);\n contentPanel.add(content, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n title = new JLabel();\n Font titleFont = this.$$$getFont$$$(null, -1, 20, title.getFont());\n if (titleFont != null) title.setFont(titleFont);\n title.setText(\"Invalid Number of Players\");\n contentPane.add(title, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setupLayout() {\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tanimeLabel = new JLabel();\r\n\t\tanimeLabel.setSize(m.getWidth(), m.getHeight());\r\n\t\tanimeLabel.setBounds(0, 0, m.getWidth(), m.getHeight());\r\n\t\tthis.add(animeLabel, BorderLayout.CENTER);\r\n\t}", "private void setupConstraints() {\n\t\tcTitleField = new GridBagConstraints();\n\t\tcTitleField.fill = GridBagConstraints.HORIZONTAL;\n\t\tcTitleField.weightx = 0.6;\n\n\t\tcAuthorField = (GridBagConstraints) cTitleField.clone();\n\t\tcAuthorField.insets = new Insets(0, 2 * I_PADDING, 0, 0);\n\t\tcAuthorField.weightx = 1 - cTitleField.weightx;\n\n\t\tseparator.setBorder(new EmptyBorder(0, 0, 2 * I_PADDING, 0));\n\t}", "public void init()\n\t\t{\n\t\t\t//Makes Lists\n\t\t\tmakeLists();\n\n\t\t\t//layout for GUI\n\t\t\tGridLayout layout = new GridLayout(2,4, 5 ,5);\n\t\t\tsetLayout(layout);\n\n\t\t\t//add panels to window\n\t\t\tadd(Panel_1);\n\t\t\tadd(Panel_2);\n\t\t\tadd(Panel_3);\n\t\t\tadd(Panel_4);\n\n\t\t\t//create buttons\n\t\t\tCalculateButton = new JButton(\"Calculate\");\n\t\t ExitButton = new JButton(\"Exit\");\n\n\t\t\t//connect event handlers to buttons\n\t\t CalculateButton.addActionListener(new ButtonListener());\n\t\t ExitButton.addActionListener(new ButtonListener());\n\n\t\t\t//add buttons to window\n\t\t add(CalculateButton);\n\t\t add(ExitButton);\n\n\t\t //make window visible\n\t\t\tsetVisible(true);\n\t\t}", "private void $$$setupUI$$$() {\n statusPanel = new JPanel();\n statusPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status Label\");\n statusPanel.add(statusLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JSeparator separator1 = new JSeparator();\n statusPanel.add(separator1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "private void initMiddleBodyLayout() {\r\n midPanelLayoutCanv = new VerticalPanel();\r\n midPanelLayoutCanv.setWidth(middlePanelWidth + \"px\");\r\n midPanelLayoutCanv.setHeight((leftPanelHeight - 2) + \"px\");\r\n RootPanel.get(\"diva_mid_panel\").clear();\r\n RootPanel.get(\"diva_mid_panel\").add(midPanelLayoutCanv);\r\n //pca and profile plot layout\r\n topMidLayout = new HorizontalPanel();\r\n int newWidth = (middlePanelWidth / 2);\r\n int newHeight = newWidth + 22;\r\n topMidLayout.setHeight(newHeight + \"px\");\r\n topMidLayout.setWidth(middlePanelWidth + \"px\");\r\n topMidLayout.setStyleName(\"whitelayout\");\r\n\r\n //rank table layout\r\n rankLayoutCanv = new VLayout();\r\n rankLayoutCanv.setHeight((leftPanelHeight - (newHeight + 2)) + \"px\");\r\n rankLayoutCanv.setWidth(middlePanelWidth + \"px\");\r\n midPanelLayoutCanv.add(topMidLayout);\r\n midPanelLayoutCanv.add(rankLayoutCanv);\r\n }", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n scrollPane1.setVerticalScrollBarPolicy(22);\n scrollPane1.setVisible(true);\n mainPanel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n mapTable = new MapTable();\n mapTable.setVisible(false);\n scrollPane1.setViewportView(mapTable);\n final JScrollPane scrollPane2 = new JScrollPane();\n scrollPane2.setVerticalScrollBarPolicy(22);\n mainPanel.add(scrollPane2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(200, -1), null, 0, false));\n samplesList = new JList<>();\n samplesList.setSelectionMode(0);\n scrollPane2.setViewportView(samplesList);\n final JSeparator separator1 = new JSeparator();\n mainPanel.add(separator1, new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusBox = new JComboBox<>();\n mainPanel.add(statusBox, new GridConstraints(5, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel1, new GridConstraints(2, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n currentSampleLabel = new JLabel();\n currentSampleLabel.setText(\"<текущий образец>\");\n panel1.add(currentSampleLabel, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"от:\");\n panel1.add(label1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"до:\");\n panel1.add(label2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n fromPosLabel = new JLabel();\n fromPosLabel.setText(\"<from>\");\n panel1.add(fromPosLabel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n toPosLabel = new JLabel();\n toPosLabel.setText(\"<to>\");\n panel1.add(toPosLabel, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n panel1.add(spacer2, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 6, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(372, 14), null, 0, false));\n boxesCountLabel = new JLabel();\n boxesCountLabel.setText(\"Кол-во коробок:\");\n panel2.add(boxesCountLabel, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n currentPosLabel = new JLabel();\n currentPosLabel.setText(\"Позиция:\");\n panel2.add(currentPosLabel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel2.add(spacer3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Номер отправки:\");\n panel2.add(label3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n shipmentNumberField = new JTextField();\n panel2.add(shipmentNumberField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(60, -1), null, 0, false));\n final Spacer spacer4 = new Spacer();\n panel2.add(spacer4, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridBagLayout());\n mainPanel.add(panel3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(-1, 28), null, 0, false));\n sampleDeleteButton = new JButton();\n sampleDeleteButton.setIcon(new ImageIcon(getClass().getResource(\"/delSample16.png\")));\n sampleDeleteButton.setMinimumSize(new Dimension(-1, -1));\n sampleDeleteButton.setPreferredSize(new Dimension(32, -1));\n sampleDeleteButton.setText(\"\");\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleDeleteButton, gbc);\n sampleEditButton = new JButton();\n sampleEditButton.setIcon(new ImageIcon(getClass().getResource(\"/change16.png\")));\n sampleEditButton.setMinimumSize(new Dimension(-1, -1));\n sampleEditButton.setPreferredSize(new Dimension(32, -1));\n sampleEditButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleEditButton, gbc);\n sampleMoveUpButton = new JButton();\n sampleMoveUpButton.setIcon(new ImageIcon(getClass().getResource(\"/upSample10.png\")));\n sampleMoveUpButton.setMinimumSize(new Dimension(-1, -1));\n sampleMoveUpButton.setPreferredSize(new Dimension(32, -1));\n sampleMoveUpButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleMoveUpButton, gbc);\n sampleMoveDownButton = new JButton();\n sampleMoveDownButton.setIcon(new ImageIcon(getClass().getResource(\"/downSample10.png\")));\n sampleMoveDownButton.setMinimumSize(new Dimension(-1, -1));\n sampleMoveDownButton.setPreferredSize(new Dimension(32, -1));\n sampleMoveDownButton.setText(\"\");\n sampleMoveDownButton.setVerticalAlignment(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleMoveDownButton, gbc);\n sampleAddButton = new JButton();\n sampleAddButton.setIcon(new ImageIcon(getClass().getResource(\"/addSample16.png\")));\n sampleAddButton.setMinimumSize(new Dimension(-1, -1));\n sampleAddButton.setPreferredSize(new Dimension(32, -1));\n sampleAddButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleAddButton, gbc);\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel4, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(180, -1), null, 0, false));\n loadListButton = new JButton();\n loadListButton.setIcon(new ImageIcon(getClass().getResource(\"/import16.png\")));\n loadListButton.setText(\"\");\n panel4.add(loadListButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(48, -1), null, 0, false));\n startButton = new JButton();\n startButton.setText(\"Начать работу\");\n panel4.add(startButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n debugButton = new JButton();\n debugButton.setText(\"debug\");\n panel4.add(debugButton, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n saveMapButton = new JButton();\n saveMapButton.setIcon(new ImageIcon(getClass().getResource(\"/save16.png\")));\n saveMapButton.setText(\"\");\n panel4.add(saveMapButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }", "private void initIslandGrid()\n {\n // Add the grid\n int rows = game.getNumRows();\n int columns = game.getNumColumns();\n // set up the layout manager for the island grid panel\n pnlIsland.setLayout(new GridLayout(rows, columns));\n // create all the grid square panels and add them to the panel\n // the layout manager of the panel takes care of assigning them to the\n // the right position\n for ( int row = 0 ; row < rows ; row++ )\n {\n for ( int col = 0 ; col < columns ; col++ )\n {\n pnlIsland.add(new GridSquarePanel(game, row, col));\n }\n }\n }", "private void $$$setupUI$$$() {\n panel_ProfessorApp = new JPanel();\n panel_ProfessorApp.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n questionNumberLabel = new JLabel();\n questionNumberLabel.setText(\"Question 1\");\n panel1.add(questionNumberLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n QuestionInput = new JTextArea();\n QuestionInput.setText(\"\");\n panel_ProfessorApp.add(QuestionInput, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n answerInput1 = new JTextField();\n answerInput1.setText(\"Answer Text\");\n panel2.add(answerInput1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n answerInput2 = new JTextField();\n answerInput2.setText(\"Answer Text\");\n panel2.add(answerInput2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n answerInput3 = new JTextField();\n answerInput3.setText(\"Answer Text\");\n panel2.add(answerInput3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n answerInput4 = new JTextField();\n answerInput4.setText(\"Answer Text\");\n panel2.add(answerInput4, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n OptionA = new JRadioButton();\n OptionA.setText(\"A\");\n panel2.add(OptionA, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n OptionB = new JRadioButton();\n OptionB.setText(\"B\");\n panel2.add(OptionB, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n OptionC = new JRadioButton();\n OptionC.setText(\"C\");\n panel2.add(OptionC, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n OptionD = new JRadioButton();\n OptionD.setText(\"D\");\n panel2.add(OptionD, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n nextButton = new JButton();\n nextButton.setText(\"Next\");\n panel3.add(nextButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel3.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n saveButton = new JButton();\n saveButton.setText(\"Save\");\n panel3.add(saveButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n ButtonGroup buttonGroup;\n buttonGroup = new ButtonGroup();\n buttonGroup.add(OptionA);\n buttonGroup.add(OptionB);\n buttonGroup.add(OptionC);\n buttonGroup.add(OptionD);\n }" ]
[ "0.7365459", "0.7231014", "0.70464015", "0.7004862", "0.7002231", "0.6980822", "0.6933406", "0.69275874", "0.6822287", "0.6804537", "0.6801189", "0.6799766", "0.6791068", "0.67591786", "0.66807514", "0.66344583", "0.66240937", "0.6622727", "0.6613563", "0.65947366", "0.65796375", "0.6573494", "0.6572947", "0.6569546", "0.65551245", "0.653598", "0.65047246", "0.6493658", "0.6456212", "0.64373946", "0.6435123", "0.6406751", "0.6405589", "0.6402917", "0.6402821", "0.6392498", "0.63587284", "0.63535047", "0.6347221", "0.6336747", "0.63287526", "0.6326273", "0.6320551", "0.6316035", "0.6308932", "0.6295089", "0.6286378", "0.62824947", "0.6280834", "0.6272088", "0.62699926", "0.6264098", "0.6261209", "0.6259337", "0.6240539", "0.6239059", "0.619836", "0.61894244", "0.61867386", "0.617249", "0.61652035", "0.61337996", "0.6122347", "0.6084506", "0.6082016", "0.60795647", "0.607948", "0.60706204", "0.60631704", "0.6060039", "0.6058458", "0.60581315", "0.60553294", "0.60534465", "0.60410166", "0.6035311", "0.60260653", "0.6024781", "0.60186166", "0.6015914", "0.6003912", "0.59959525", "0.5990255", "0.59885824", "0.59867066", "0.5986416", "0.59854776", "0.59848166", "0.59833413", "0.598186", "0.5981354", "0.5977754", "0.59729487", "0.59714884", "0.59652823", "0.5965199", "0.5958607", "0.5950982", "0.59487426", "0.59439576", "0.594352" ]
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() { tb_Actions = new javax.swing.JToolBar(); lbl_toRoot = new javax.swing.JLabel(); lbl_wizard = new javax.swing.JLabel(); lbl_addGroup = new javax.swing.JLabel(); lbl_addServer = new javax.swing.JLabel(); lbl_Remove = new javax.swing.JLabel(); lbl_Config = new javax.swing.JLabel(); setOpaque(false); tb_Actions.setBorder(null); tb_Actions.setFloatable(false); tb_Actions.setBorderPainted(false); tb_Actions.setOpaque(false); lbl_toRoot.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kuasar/plugin/servermanager/icons/toRoot.png"))); // NOI18N lbl_toRoot.setToolTipText("Go to root"); lbl_toRoot.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lbl_toRoot.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lbl_toRootMouseClicked(evt); } }); tb_Actions.add(lbl_toRoot); lbl_wizard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kuasar/plugin/servermanager/icons/wizard.png"))); // NOI18N lbl_wizard.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lbl_wizard.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lbl_wizardMouseClicked(evt); } }); tb_Actions.add(lbl_wizard); lbl_addGroup.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kuasar/plugin/servermanager/icons/folder-new.png"))); // NOI18N lbl_addGroup.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lbl_addGroup.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lbl_addGroupMouseClicked(evt); } }); tb_Actions.add(lbl_addGroup); lbl_addServer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kuasar/plugin/servermanager/icons/add-server.png"))); // NOI18N lbl_addServer.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lbl_addServer.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lbl_addServerMouseClicked(evt); } }); tb_Actions.add(lbl_addServer); lbl_Remove.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kuasar/plugin/servermanager/icons/remove.png"))); // NOI18N lbl_Remove.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lbl_Remove.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lbl_RemoveMouseClicked(evt); } }); tb_Actions.add(lbl_Remove); lbl_Config.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kuasar/plugin/servermanager/icons/configure.png"))); // NOI18N lbl_Config.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lbl_Config.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lbl_ConfigMouseClicked(evt); } }); tb_Actions.add(lbl_Config); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tb_Actions, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tb_Actions, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE) ); }
{ "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 kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\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 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 frmacceso() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public GUI_StudentInfo() {\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 Carrera() {\n initComponents();\n }", "public POS1() {\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.7318948", "0.7290426", "0.7290426", "0.7290426", "0.7284922", "0.7247965", "0.7213206", "0.72080696", "0.7195916", "0.7189941", "0.71835536", "0.71579427", "0.7147217", "0.70927703", "0.7080282", "0.7055882", "0.6987108", "0.69770193", "0.6954159", "0.69529283", "0.6944756", "0.6941631", "0.69351804", "0.6931676", "0.69271684", "0.6924507", "0.6924333", "0.6910886", "0.6910063", "0.6893039", "0.6892514", "0.68902403", "0.68896806", "0.68873954", "0.688239", "0.68815583", "0.68807346", "0.6877274", "0.68747336", "0.6873939", "0.6871645", "0.6858798", "0.68562996", "0.68551964", "0.6854526", "0.6853759", "0.6852625", "0.6852071", "0.6852071", "0.6842801", "0.6836393", "0.6835916", "0.6827825", "0.68275064", "0.6826875", "0.6823854", "0.68217176", "0.6816455", "0.68164307", "0.68095225", "0.68079925", "0.6807973", "0.6807133", "0.6806263", "0.6802961", "0.67933935", "0.6793082", "0.6791554", "0.6789944", "0.6788754", "0.6787684", "0.67871934", "0.6783336", "0.67656237", "0.6765452", "0.6764802", "0.67560065", "0.67553526", "0.67517436", "0.6751359", "0.67414886", "0.67386204", "0.67362994", "0.67358786", "0.6732659", "0.6726978", "0.67262286", "0.6719745", "0.6715412", "0.67137116", "0.6713403", "0.670771", "0.67069227", "0.670236", "0.6701016", "0.6700013", "0.66983503", "0.66981363", "0.6694568", "0.66907334", "0.66893756" ]
0.0
-1
if (n == 1) return 1; if (n < 3) return 2; return climbStairs (n1) + climbStairs (n2);
public int climbStairs(int n) { if (n == 1) return 1; if (n < 3) return 2; if (n == 0) return 0; int[] dp = new int[n+1]; dp[0] = 1; dp[1] = 2; dp[2] = 2; for (int i = 2; i < n; i++){ dp[i] = dp[i -1] +dp[i -2]; } return dp[n-1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int climbStairs(int n){\n if(n<0)\n return 0;\n if(n==0)\n return 1;\n return climbStairs(n-1)+climbStairs(n-2);\n }", "public int climbStairs4(int n){\n if(n==1)\n return 1;\n int first=1;\n int second=2;\n for(int i=3;i<=n;i++){\n int third=first+second;\n first=second;\n second=third;\n }\n return second;\n }", "public int climbStairs(int n){\n\t\tif(n == 0)\n\t\t\treturn 0;\n\t\tif(n == 1)\n\t\t\treturn 1;\n\t\tif(n == 2)\n\t\t\treturn 2;\n\n\t\tint k_1 = 2, k_2 = 1, k = 0;\n\n\t\tfor(int i = 2; i < n; i++){\n\t\t\tk = k_1 + k_2;\n\t\t\tk_2 = k_1;\n\t\t\tk_1 = k;\n\t\t}\n\n\t\treturn k;\n\t}", "public int climbStairs(int n) {\n if (n < 1) {\n return 0;\n }\n return helper(n);\n }", "public int climbStairs(int n) {\n \n int n1 = 1, n2 = 2, n3 = n;\n for (int i = 3; i <= n; i++) {\n n3 = n1 + n2;\n n1 = n2;\n n2 = n3;\n }\n \n return n3;\n }", "public int climbStairs(int n) {\n if (n < 1) {\n return 0;\n }\n int[] visited = new int[n + 1];\n visited[0] = 1;\n visited[1] = 1;\n for (int i = 2; i < n + 1; i++) {\n visited[i] = visited[i - 1] + visited[i - 2];\n }\n return visited[n];\n }", "public int climbStairs3(int n){\n if(n==1) return 1;\n int[] dp=new int[n+1];\n dp[1]=1;\n dp[2]=2;\n for(int i=3;i<=n;i++){\n dp[i]=dp[i-1]+dp[i-2];\n }\n return dp[n];\n }", "public int climbStairs3(int n) {\n if (n == 1) {\n return 1;\n }\n int[] dp = new int[n + 1];\n dp[1] = 1;\n dp[2] = 2;\n for (int i = 3; i <= n; i++) {\n dp[i] = dp[i - 1] + dp[i - 2];\n }\n return dp[n];\n }", "public int climbStairs(int n) {\n\t int[] ways = new int[n+1]; \n\t for(int i = 0; i < ways.length; i++){\n\t \t if(i<=1)\n\t \t\t ways[i] = 1;\n\t \t else\n\t \t\t ways[i] = ways[i-2] + ways[i-1]; \n\t }\n\t return ways[n];\n\t }", "public int climbStairs2(int n) {\n int[] memo = new int[n + 1];\n return climbStairsHelper(n, memo);\n }", "public int climbStairs(int n) {\n return backtrack(n,0);\n }", "public int climbStairs(int n) {\n if (n < 1) {\n return 0;\n }\n int prev = 1; // case i == 0;\n int next = 1; // case i == 1;\n for (int i = 2; i <= n; i++) {\n int cur = prev + next; // which means f[i] = f[i - 1] + f[i - 2] \n prev = next;\n next = cur;\n }\n return next;\n }", "private int climbStairsHelper(int n, int[] memo) {\n if (n < 0) {\n return 0;\n }\n\n /*\n 1 distinct way to climb if we can only take 1\n or 2 steps.\n */\n if (n == 0) {\n return 1;\n }\n\n /*\n Do we already have an answer to this question (subproblem)?\n If not fall through and compute, BUT if we already know it\n just return it from the cache\n */\n if (memo[n] > 0) {\n return memo[n];\n }\n\n /*\n The answer to this subproblem is the sum of the answer to the subproblems n - 1 and n - 2\n This drills us towards our base cases that bring us back up with an answer\n We cache the answer before returning it so we have it later\n */\n memo[n] = climbStairsHelper(n - 1, memo) + climbStairsHelper(n - 2, memo);\n return memo[n];\n }", "public static long countingStairs(int n) {\n\t\tif (n == 0)\n\t\t\treturn 0;\n\t\telse if (n <= 4 & n > 0)\n\t\t\treturn (long) Math.pow(2, n - 1);\n\t\telse\n\t\t\treturn countingStairs(n - 4) + countingStairs(n - 3) + countingStairs(n - 2) + countingStairs(n - 1);\n\t}", "static int nStairsRecur(int stairs, int hops) {\r\n if(stairs < 0) {\r\n return -1;\r\n }\r\n if(stairs == 0 || stairs == 1) {\r\n return 1;\r\n }\r\n int res = 0;\r\n for(int i = 1; i <= hops && i <= stairs; i++) {\r\n res += nStairsRecur(stairs - i, hops);\r\n }\r\n return res;\r\n }", "public int traverseStaircase(int n) {\n\t\treturn getFib(n+1);\n\t}", "public int climbStairs5(int n){\n double sqrt5=Math.sqrt(5);\n double fibn=Math.pow((1+sqrt5)/2,n+1)-Math.pow((1-sqrt5)/2,n+1);\n return (int)(fibn/sqrt5);\n }", "static int recursiva2(int n)\n\t\t{\n\t\t\tif (n==0)\n\t\t\treturn 10; \n\t\t\tif (n==1)\n\t\t\treturn 20;\n\t\t\tif (n==2)\n\t\t\treturn 30;\n\t\t\t\n\t\t\treturn recursiva2(n-1) + recursiva2 (n-2) * recursiva2 (n-3); \n\t\t}", "static int recursiva1(int n)\n\t\t{\n\t\tif (n==0)\n\t\t\treturn 10; \n\t\tif (n==1)\n\t\t\treturn 20; \n\t\treturn recursiva1(n-1) - recursiva1 (n-2);\t\t\n\t\t}", "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 }", "static int solve(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t return solve(n-1) + solve(n-3) + solve(n-5); \n\t}", "public static int numWaysToClimb(int[] allowedSteps, int numStairs) {\n int[] numWays = new int[numStairs+1];\n // this is to capture the case where the all the steps can be climbed at once\n // by taking allowedSteps. See below\n numWays[0] = 1;\n // if there are 0 stairs, there are 0 ways to climb. numWays[0] is already 0\n // if there are 1 stairs, the only way to climb it is if 1 step is in the list\n // of allowedSteps. This was already covered in the previous loop\n // 0 and 1 stairs already covered so we can start from 2 stairs\n for(int currentStairs = 1; currentStairs <= numStairs; currentStairs++) {\n // numWaysCurrent keeps track of number of ways to climb currentStairs\n // numWaysCurrent intialized to 0\n int numWaysCurrent = 0;\n for(int allowedStep: allowedSteps) {\n int prevWaysIndx = currentStairs-allowedStep;\n // if the currentStairs == allowedStep then currentStairs can be climbed in one turn\n // by taking allowedStep\n // For this case prevWaysIndx = 0\n // that is why numWays[0] has been initialized to 1\n // this indicates that there is one way to climb all of the currentStairs\n if(prevWaysIndx>=0) {\n numWaysCurrent += numWays[prevWaysIndx];\n }\n }\n numWays[currentStairs] = numWaysCurrent;\n }\n return numWays[numStairs];\n }", "public static void main(String[] args) {\r\n\r\n\t\tSystem.out.println(findWaysOfClimbingStairs(3));\r\n\r\n\t}", "public static long countWaysToClimb(int[] steps, int n) {\n\n int ans[] = new int[n+1];\n ans[0]=1; // why ?? because we are going bottom up and same as recursion when we reach ground level 0 we know\n // there was a way . Consider steps=[2,3]; so cWC(steps,2), cWC(steps,3) will have 2-2,3-2 and we are having 1 //return valuel\n for(int i=1;i<=n;i++){\n for(int st:steps){\n if(i-st>=0){\n ans[i]+=ans[i-st];\n }\n }\n }\n return ans[n];\n\n\n\n }", "public static void towerOfHanoi(int n, Stack<Disk> a, Stack<Disk> b, Stack<Disk> c) {\n //TODO by student\n\n }", "public static int nStairGeneralizeBottomUp(int stairs, int hops) {\r\n if(stairs < 0) {\r\n return -1;\r\n }\r\n int [] bottomUp = new int[stairs + 1];\r\n bottomUp[0] = 1;\r\n bottomUp[1] = 1;\r\n for(int i = 2; i <= stairs; i++) {\r\n for(int j = 1; j <= i && j <= hops; j++) {\r\n bottomUp[i] += bottomUp[i - j];\r\n }\r\n }\r\n return bottomUp[stairs];\r\n }", "public static int bestApproach(int n) {\n \n if(n<=2){\n return n;\n }\n int a = 0;\n int b = 1;\n int c = 2;\n \n while(n-->2){\n a = b+c;\n b = c;\n c = a;\n }\n return a;\n }", "private static int climbStairsWithMinimumMoves(int index, int cost, int n, int[] arr){\n //Base Case\n if(index == n) return cost;\n else if(index > n) return Integer.MAX_VALUE;\n\n //faith\n int limit = arr[index];\n int min = Integer.MAX_VALUE;\n for(int i = 1; i <= limit; i++){\n int minCost = climbStairsWithMinimumMoves(index + i, cost + 1, n, arr);\n //faith * expectation\n if(minCost < min) min = minCost;\n }\n return min;\n }", "public static int nStairsGeneralizeMemoization(int stairs, int hops, int [] memo) {\r\n if(stairs < 0) {\r\n return -1;\r\n }\r\n if(stairs == 0 || stairs == 1) {\r\n return 1;\r\n } else if(memo[stairs] > 0) {\r\n return memo[stairs];\r\n }\r\n for(int i = 1; i <= stairs && i <= hops; i++) {\r\n memo[stairs] += nStairsGeneralizeMemoization(stairs - i, hops, memo);\r\n }\r\n return memo[stairs];\r\n }", "public int recursive(int n) {\r\n //base case: return n if <= 1\r\n if (n <= 1) {\r\n return n;\r\n }\r\n //else return result of of two previous #s being added to each other\r\n return recursive(n - 1) + recursive(n - 2);\r\n }", "public static int minCostClimbingStairs(int[] cost) {\n int n=cost.length;\n int[] dp =new int[n+1];\n dp[0]=0;\n dp[1]=0;\n for(int i=2;i<=n;i++)\n dp[i]=Math.min(dp[i-2]+cost[i-2],dp[i-1]+cost[i-1]);\n\n return dp[n];\n\n }", "int getMarbles(int remainingMarbles) ;", "private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n\n int stairs = 1;\n if (n > 0) {\n if (n > 1) {\n for (int j = 0; j < n; j++) {\n String s = \"\";\n for (int i = 0; i < n; i++) {\n if (i + stairs < n)\n s += \" \";\n else if (i < n)\n s += \"#\";\n }\n System.out.println(s);\n stairs++;\n }\n } else {\n System.out.println(\"#\");\n }\n }\n }", "public static int foo3( int n )\r\n\t{\r\n\t\tif ( n == 0 )\r\n\t\t\treturn 0;\r\n\t\telse\r\n\t\t\treturn n + foo3( n - 1 );\r\n\t\t\r\n\t}", "int catalan(int n) { \n int res = 0; \n \n // Base case \n if (n <= 1) { \n return 1; \n } \n for (int i = 0; i < n; i++) { \n res += catalan(i) * catalan(n - i - 1); \n } \n return res; \n }", "public int arrangeCoins(int n) { // score 7\n return (int) ((Math.sqrt(8 * n + 1) - 1) / 2);\n }", "int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}", "static int sum(int n) {\n\t\tif(n==1) \n\t\t\treturn 1;\n\t\treturn n+sum(n-1);\n\t}", "public static int dynamicProgramming(int n) {\n for (int i=0; i<=n; i++) {\n table[0][i] = 1;\n }\n\n for (int j=1; j<4; j++) { //this loops the different denominations.\n for (int i=0; i<=n; i++) { //this loops through the amount we have to make change for\n\n //hard to explain, create a table and look at it. For j=1 (nickel), for anything less than\n //5 cents, we just copy the value down from j=0 (penny). The nickel has no effect for anything less than 5 cents.\n if (i < denominations[j]) {\n table[j][i] = table[j-1][i];\n continue;\n }\n\n //For example, j=1 (nickel), i = 11 cents. the number of ways to make 11 cents is equal to\n //the number of ways to make 11 cents without using nickel (table[j-1][i]) plus the number\n //of ways to 6 cents (table[j][i-denomination[j]).\n table[j][i] = table[j-1][i] + table[j][i-denominations[j]];\n }\n }\n return table[3][n];\n }", "static int countFriendsPairings(int n) \n { \n int a = 1, b = 2, c = 0; \n if (n <= 2) { \n return n; \n } \n for (int i = 3; i <= n; i++) { \n c = b + (i - 1) * a; \n a = b; \n b = c; \n } \n return c; \n }", "public int iterative(int n) {\r\n //base cases\r\n if (n <= 1) {\r\n return n;\r\n }\r\n if (n == 2) {\r\n return 1;\r\n }\r\n //initialize current and previous two values\r\n int current = 0;\r\n int prev1 = 1;\r\n int prev2 = 1;\r\n\r\n //iterate starting at 3\r\n for (int i = 3; i <= n; i++) {\r\n //set current to value being computed\r\n current = prev1 + prev2;\r\n //set prev2 to n - 1\r\n prev2 = prev1;\r\n //set prev1 to current, reaching n + 1 exits loop and returns current\r\n prev1 = current;\r\n }\r\n return current;\r\n }", "static void staircase(int n) {\n int hashes = 1;\n \n while(hashes<=n) {\n \tint i=0;\n \twhile(i<n-hashes) {\n \t\tSystem.out.print(\" \");\n \t\ti++;\n \t}\n \tint k = 0;\n \twhile(k<hashes) {\n \t\tSystem.out.print(\"#\");\n \t\tk++;\n \t}\n \thashes++;\n System.out.println();\n }\n System.out.println();\n }", "private static int path(int n) {\n if (n == 0 || n == 1 || n == 2) {\n return n;\n }\n return path(n-1) + path(n-2);\n }", "private static int getNumberOfWays(int n, int[] dp) {\n\t\t\r\n\t\tif(n==0) {\r\n\t\t\tdp[n] = 0; \r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(n == 1) {\r\n\t\t\tdp[1] = 1;\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\t\r\n\t\tif(n == 2) {\r\n\t\t\tdp[2] = 2;\r\n\t\t\treturn 2;\r\n\t\t}\r\n\t\t\r\n\t\tif(dp[n] == 0){\r\n\t\t\tdp[n] = getNumberOfWays(n-1, dp) + getNumberOfWays(n-2, dp);\r\n\t\t}\r\n\t\treturn dp[n];\r\n\t}", "int fact(int n) {\n if (n <= 1)\n return 1;\n else\n return n * fact(n-1);\n}", "static int padovan(int n){\n if(n>=0 && n<=2)\n return 1;\n return padovan(n-2) + padovan(n-3);\n }", "private static int betterSolution(int n) {\n return n*n*n;\n }", "public static int combinationCounter(int n) {\r\n int hasil = n * (n - 1) / 2;\r\n return hasil;\r\n }", "public static int getBetterApproach(int n){\n\t\t\n\t\tint t[] = new int[n+1];\n\t\t\n if(n<=2)\n return n;\n \n\t\tt[0] = 0;\n\t\tt[1] = 1;\n\t\tt[2] = 2;\n\t\tfor(int i = 3;i<=n;i++){\n\t\t\tt[i] = t[i-1] + t[i-2];\n\t\t}\n\t\treturn t[n];\n\t}", "public int fact(int n) {\n if (n == 0 || n == 1) {\r\n // Return 1\r\n return 1;\r\n }\r\n // Anthing else? 2 times 1!\r\n return n * fact(n - 1);\r\n }", "public static int sumDownBy2(int n) {\n\t\tif (n == 0) {\n\t\t\treturn 0;\n\t\t} else if (n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n + sumDownBy2(n - 2);\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\tint count1=0;\r\n\t\tint count2=0;\r\n\t\tfor(int i=0;i<n;i++)\r\n\t\t{\r\n\t\t\tcount1++;\r\n\t\t}\r\n\t\t\tSystem.out.println(\"one stair count is\"+count1);\r\n\t\r\n\t\tfor(int i=1;i<n;i=i+2)\r\n\t\t{\r\n\t\t\tcount2++;\r\n\t\t}\r\n\t\t\tSystem.out.println(\"second stair count is\"+count2);\r\n\t\t\r\n\r\n\t}", "private static BigInteger numOfFlipsRequired(BigInteger numOfCards,BigInteger bi0,BigInteger bi3,BigInteger bi1){\n \n if(numOfCards.equals(bi0)){\n return bi0;\n }else if(numOfCards.compareTo(bi3) == -1){\n return bi1;\n }else if(numOfCards.mod(bi3).compareTo(bi0) == 0){\n return numOfCards.divide(bi3);\n }else{\n return numOfCards;\n }\n \n \n // return numOfFlips;\n }", "public static ArrayList<Integer> getHailstoneSequence(int n) {\n ArrayList<Integer> hailstoneSequence = new ArrayList<>(); // Creates an ArrayList where each sequence integer\r\n // can be stored\r\n while (n != 1) { // Loops the sequence until n = 1\r\n if (n % 2 == 0) { // if n is even\r\n n = n / 2; // The new n is half of the old n\r\n hailstoneSequence.add(n); // New n is added to the ArrayList\r\n } else { // if n is odd\r\n n = (n * 3) + 1; // n is multiplied by 3 and then add one, this becomes new n\r\n hailstoneSequence.add(n); // new n is added to the ArrayList\r\n }\r\n } // Loops back to the \"while statement\", where the condition of n is checked\r\n // again\r\n return hailstoneSequence; // returns the entire sequence to main method\r\n }", "static void hanoi(int n, int[] A, int[] B, int[] C){\n count++;\n /*\n * a_n = 2*a_n-1 + 1\n * 1. move n-1 disks to B\n * 2. move 1 last disk to C\n * 3. move n-1 disks to C\n */\n int va = end_value(A), la = end_of_array(A);\n int vb = end_value(B), lb = end_of_array(B);\n int vc = end_value(C), lc = end_of_array(C);\n\n if ( n!= 1 ) {\n moveto = 3 - moveto;\n hanoi(n-1,A,B,C);\n } else {\n if ( from == 0 ) {\n\n if(moveto == 2) {\n C[lc] = va;\n A[la-1] = 0;\n }\n else if(moveto == 1){\n B[lb] = va;\n A[la-1] = 0;\n }\n\n } else if ( from == 1 ) {\n\n if(moveto == 0) {\n A[la] = vb;\n B[lb-1] = 0;\n }\n else if(moveto == 2){\n C[lc] = vb;\n B[lb-1] = 0;\n }\n\n } else {\n\n if(moveto == 0) {\n A[la] = vc;\n C[lc-1] = 0;\n }\n else if(moveto == 1){\n B[lb] = vc;\n C[lc-1] = 0;\n }\n\n }\n visualization(A,B,C);\n return ;\n }\n\n moveto = 3 - moveto;\n hanoi(n-1,A,B,C);\n\n if(moveto == 2) {\n C[lc] = A[la];\n A[la] = 0;\n }\n else if(moveto == 1){\n B[lb] = A[la];\n A[la] = 0;\n }\n visualization(A,B,C);\n\n\n }", "public static int next(int n)\n { \n int x = 0;\n if(n%2 == 0)\n {\n return n/2;\n }\n else\n {\n return (3*n)+1;\n }\n }", "public int badFibonacci(int n){\n if (n <= 1){\n return (n);\n }\n return (badFibonacci(n-2) + badFibonacci(n-1));\n }", "private static int numberOfWaysRecursive(int n) {\n\t\tif(n<0)\n\t\t\treturn 0;\n\t\tif(n==0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn numberOfWaysRecursive(n-1) + numberOfWaysRecursive(n-2) + numberOfWaysRecursive(n-3);\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static int determineSequence(int n) {\n\n // If the value is 1 or 2 (base case)\n if (n == 1 || n == 2) {\n return 1;\n } else {\n return determineSequence(n - 1) + determineSequence(n - 2);\n }\n }", "public abstract boolean isHappy(int n);", "static int countWaysUtil(int n, int m) \n\t { \n\t int res[] = new int[n]; \n\t res[0] = 1; res[1] = 1; \n\t for (int i=2; i<n; i++) \n\t { \n\t res[i] = 0; \n\t for (int j=1; j<=m && j<=i; j++) \n\t res[i] += res[i-j]; \n\t } \n\t return res[n-1]; \n\t }", "private int calc(int x, int n, int i, int sum) {\n int ways = 0;\n\n // Calling power of 'i' raised to 'n'\n int p = (int) Math.pow(i, n);\n while (p + sum < x) {\n // Recursively check all greater values of i\n ways += calc(x, n, i + 1,\n p + sum);\n i++;\n p = (int) Math.pow(i, n);\n }\n\n // If sum of powers is equal to x\n // then increase the value of result.\n if (p + sum == x)\n ways++;\n\n // Return the final result\n return ways;\n }", "public int arrangeCoinsApprach3(int n) {\n long nLong = (long)n;\n \n long st = 0;\n long ed = nLong;\n \n long mid = 0;\n \n while (st <= ed){\n mid = st + (ed - st) / 2;\n \n if (mid * (mid + 1) <= 2 * nLong){\n st = mid + 1;\n }else{\n ed = mid - 1;\n }\n }\n \n return (int)(st - 1);\n }", "private int finalCheck(int n, int max1, int max2){\r\n\r\n //this represents all the numbers that are guaranteed not to be the answer.\r\n //the distance to the end of the array for each array from max is all the right hand numbers the answer cannot be\r\n\r\n n = n - (array1.length + array2.length - max1 - max2 - 2);\r\n\r\n int x0, x1, x2, x3;\r\n x0 = x1 = x2 = x3 = 0;\r\n\r\n //assigning all the values into 4 variables\r\n x0 = array1[max1];\r\n x1 = array2[max2];\r\n //sometimes the pairs are both assigned to the end of the list, so the lower hand value is checked for vailidity\r\n if(max1 > 0){\r\n x2 = array1[max1-1];\r\n }\r\n if(max2 > 0){\r\n x3 = array2[max2-1];\r\n }\r\n\r\n //put into an array, sorted and returned based on previous n calculation\r\n int[] array = new int[]{x0, x1, x2,x3};\r\n\r\n sorter(array);\r\n\r\n if(n==3){\r\n return array[1];\r\n } else if(n==2){\r\n return array[2];\r\n } else return array[3];\r\n }", "public static int coins(int n) {\n int[] coins = {1,5,10,25};\n int[] s = new int[n+1];\n for(int i=1; i<=n; i++) {\n for(int j=0; j<coins.length && j<=i; j++) {\n if(i-coins[j] == 0) {\n s[i]++;\n }\n if(i-coins[j] > 0) {\n s[i] += s[i-coins[j]];\n }\n }\n }\n return s[n];\n }", "private int recursiveCombat(LinkedList<Integer> player1Cards, LinkedList<Integer> player2Cards){\n Set<DeckState> roundsHistory = new HashSet<>();\n while (!player1Cards.isEmpty() && !player2Cards.isEmpty()){\n if (!roundsHistory.add(new DeckState(new LinkedList<>(player1Cards), new LinkedList<>(player2Cards)))) {\n return 1;\n }\n int player1Move = player1Cards.poll();\n int player2Move = player2Cards.poll();\n if (player1Move <= player1Cards.size() && player2Move <= player2Cards.size()){\n int winner = recursiveCombat(pollN(player1Cards, player1Move), pollN(player2Cards, player2Move));\n if (winner == 1){\n player1Cards.add(player1Move);\n player1Cards.add(player2Move);\n }\n else {\n player2Cards.add(player2Move);\n player2Cards.add(player1Move);\n }\n }\n else {\n if (player1Move > player2Move){\n player1Cards.add(player1Move);\n player1Cards.add(player2Move);\n }\n else {\n player2Cards.add(player2Move);\n player2Cards.add(player1Move);\n }\n }\n\n }\n if (player1Cards.isEmpty())\n return 2;\n else\n return 1;\n }", "public static void main(String[] args)\n {\n int N = 30;\n int[] moves = new int[N];\n /*for (int i = 0; i < N; i++)\n moves[i] = -1;*/\n Arrays.fill(moves,-1);\n\n // Ladders\n moves[2] = 21;\n moves[4] = 7;\n moves[10] = 25;\n moves[19] = 28;\n\n // Snakes\n moves[26] = 0;\n moves[20] = 8;\n moves[16] = 3;\n moves[18] = 6;\n //efficiently find shortest path using Breadth First Search of the graph.\n System.out.println(\"Min Dice throws required is \" + getMinDiceThrows(moves, N));\n }", "public int stoneGameII(int[] piles) {\n int n = piles.length;\n memo = new int[n][n];\n sums = new int[n];\n sums[n-1] = piles[n-1];\n for(int i = n -2; i>=0;i--) {\n sums[i] = sums[i+1] + piles[i]; //the sum from piles[i] to the end\n }\n int score = helper(0, 1, piles);\n return score;\n }", "public int numSquaresIII(int n) {\n List<Integer> squareNum = new ArrayList<>();\n for (int i = 1; i * i <= n; i++) {\n squareNum.add(i * i);\n }\n Queue<Integer> queue = new ArrayDeque<>();\n queue.offer(n);\n int level = 0;\n while (!queue.isEmpty()) {\n ++level;\n Queue<Integer> nextQueue = new ArrayDeque<>();\n for (Integer rem : queue) {\n for (Integer square : squareNum) {\n if (rem.equals(square)) {\n return level;\n } else if (rem < square) {\n break;\n } else {\n nextQueue.offer(rem - square);\n }\n }\n }\n queue = nextQueue;\n }\n return level;\n }", "public void choose(int n) {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\t// Find the specific card\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tif (n == 1) {\r\n\t\t\t\t\tcurrentPlayer.updateGold(1);\r\n\t\t\t\t} else if (n == 2) {\r\n\t\t\t\t\tupdateHealth(currentPlayer,1);\r\n\t\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t\t} else return;\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tif (n == 1) {\r\n\t\t\t\t\tcurrentPlayer.updateGold(2);\r\n\t\t\t\t} else if (n == 2) {\r\n\t\t\t\t\tmustTrash.add(\"Dragon Shrine\");\r\n\t\t\t\t} else return;\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tif (!dungeonRow[n-4].isBought()) {\r\n\t\t\t\t\tdungeonRow[n-4] = mainDeck.getNext();\r\n\t\t\t\t\tmainDeck.removeTop();\r\n\t\t\t\t\tif (dungeonRow[n-4].isHasArrive()) {\r\n\t\t\t\t\t\tdoArriveEffect(dungeonRow[n-4]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tupdateDungeonRow(currentPlayer, false);\r\n\t\t\t\t} else return;\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tif (n == 1) {\r\n\t\t\t\t\tcurrentPlayer.updateGold(1);\r\n\t\t\t\t} else if (n == 2 && currentPlayer.getGold() >= 7) {\r\n\t\t\t\t\tcurrentPlayer.updateGold(-7);\r\n\t\t\t\t\t// Tries to buy 2\r\n\t\t\t\t\tif (reserve.getSecretTomes().size() > 0) {\r\n\t\t\t\t\t\tcurrentPlayer.getDiscardPile().add(reserve.getSecretTomes().get(0));\r\n\t\t\t\t\t\treserve.removeSecretTome();\r\n\t\t\t\t\t\tcurrentPlayer.updateSecretTomes(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (reserve.getSecretTomes().size() > 0) {\r\n\t\t\t\t\t\tcurrentPlayer.getDiscardPile().add(reserve.getSecretTomes().get(0));\r\n\t\t\t\t\t\treserve.removeSecretTome();\r\n\t\t\t\t\t\tcurrentPlayer.updateSecretTomes(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tupdateDungeonRow(currentPlayer, false);\r\n\t\t\t\t} else return;\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tif (n == 1) {\r\n\t\t\t\t\tcurrentPlayer.updateSwords(3);\r\n\t\t\t\t} else if (n == 2) {\r\n\t\t\t\t\tcurrentPlayer.updateGold(2);\r\n\t\t\t\t} else if (n == 3) {\r\n\t\t\t\t\tupdateHealth(currentPlayer,1);\r\n\t\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t\t} else return;\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tif (n == 1) {\r\n\t\t\t\t\t// Only dragon attack in the middle of turn\r\n\t\t\t\t\tdragonAttack(cubesPerLevel[attackLevel]);\r\n\t\t\t\t} else if (n == 2) {\r\n\t\t\t\t\tcurrentPlayer.updateClankOnBoard(-2);\r\n\t\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t\t} else return;\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (n == 1) {\r\n\t\t\t\t\tcurrentPlayer.updateTeleports(1);\r\n\t\t\t\t} else if (n > 1) {\r\n\t\t\t\t\t// Take a secret from nearby room\r\n\t\t\t\t\tif (Utils.has(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()],n) || Utils.has(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()],n)) {\r\n\t\t\t\t\t\tif (mapContents[n].startsWith(\"Minor\") || mapContents[n].startsWith(\"Major\")) {\r\n\t\t\t\t\t\t\trewardPlayer(n);\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tupdateBoard();\r\n\t\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else return;\r\n\t\t\t\t} else return;\r\n\t\t\t}\r\n\t\t\tmustChoose.remove(i);\r\n\t\t}\r\n\t\tupdateMarketAndTreasures(false);\r\n\t\tupdateInfo(currentPlayer, false);\r\n\t\t// In case Mister Whiskers ends the game\r\n\t\tif (!checkIfGameIsOver()) {\r\n\t\t\tupdatePlayArea(currentPlayer, false);\r\n\t\t}\r\n\t}", "static void staircase(int n) {\n StringBuilder result = new StringBuilder();\n String result_str;\n for (int i = 1 ; i < n+1 ; i++){\n // append white space (n-i) + i # \n for ( int j = 1 ; j < n-i+1 ; j++ ){\n result = result.append(\" \");\n }\n for ( int j= 1 ; j< i+1; j++){ \n result = result.append(\"#\");\n }\n result_str = (result.toString()); \n System.out.println(result_str);\n result = new StringBuilder();\n }\n\n }", "public void MovesRemainingExists() {\n InsideMovesRemainingExists = 1;\n NoMovesRemaining = 1;\n Beginning:\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n previousX = i;\n previousY = j + 1;\n if ((i + 1) < 9) {\n ValidSwitch(i + 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the right\n ResetState();\n break Beginning; //breaks the loop\n }\n }\n\n if ((i - 1) >= 0) {\n ValidSwitch(i - 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the left\n ResetState();\n break Beginning;\n }\n }\n\n if ((j + 1) < 9) {\n ValidSwitch(i, j + 2);\n if (NoMovesRemaining == 0) { //checks the candies on the bottom\n ResetState();\n break Beginning;\n }\n }\n\n if ((j - 1) >= 0) {\n ValidSwitch(i, j);\n if (NoMovesRemaining == 0) { //checks the candies at the top\n ResetState();\n break Beginning;\n }\n }\n }\n\n }\n InsideMovesRemainingExists = 0;\n\n}", "private static int fibonacci(int n) {\n if (n == 1 || n == 2)\n return 1;\n else\n return fibonacci(n - 1) + fibonacci(n - 2);\n }", "public int checkCastle(Board b, char race) {\n Set<Coordinate> opponentPieces = (race == 'b') ? b.white : b.black;\n Set<Coordinate> opponentMoves = new HashSet<Coordinate>();\n\n for (Coordinate each : opponentPieces) {\n if (b.board[each.x][each.y] instanceof King) {\n continue;\n }\n if (b.board[each.x][each.y] instanceof Pawn) {\n opponentMoves.addAll(((Pawn) (b.board[each.x][each.y])).killableMoves(b));\n } else {\n opponentMoves.addAll(b.board[each.x][each.y].displayMoves(b));\n }\n }\n\n switch (race) {\n case 'b':\n if (b.board[0][4] != null && b.board[0][4].move == 0) {\n int i = 0;\n if (b.board[0][0] != null && b.board[0][0].move == 0) {\n if (b.board[0][1] == null && b.board[0][2] == null && b.board[0][3] == null) {\n if (!opponentMoves.contains(new Coordinate(0, 2)) && !opponentMoves.contains(new Coordinate(0, 3))\n && !opponentMoves.contains(new Coordinate(0, 4))) {\n i++;\n }\n }\n }\n\n if (b.board[0][7] != null && b.board[0][7].move == 0) {\n if (b.board[0][5] == null && b.board[0][6] == null) {\n if (!opponentMoves.contains(new Coordinate(0, 6)) && !opponentMoves.contains(new Coordinate(0, 5))\n && !opponentMoves.contains(new Coordinate(0, 4))) {\n i += 10;\n }\n }\n }\n return i;\n }\n break;\n\n case 'w':\n if (b.board[7][4] != null && b.board[7][4].move == 0) {\n int i = 20;\n if (b.board[7][0] != null && b.board[7][0].move == 0) {\n if (b.board[7][1] == null && b.board[7][2] == null && b.board[7][3] == null) {\n if (!opponentMoves.contains(new Coordinate(7, 2)) && !opponentMoves.contains(new Coordinate(7, 3))\n && !opponentMoves.contains(new Coordinate(7, 4))) {\n i++;\n }\n }\n }\n\n if (b.board[7][7] != null && b.board[7][7].move == 0) {\n if (b.board[7][5] == null && b.board[7][6] == null) {\n if (!opponentMoves.contains(new Coordinate(7, 6)) && !opponentMoves.contains(new Coordinate(7, 5))\n && !opponentMoves.contains(new Coordinate(7, 4))) {\n i += 10;\n }\n }\n }\n return i;\n }\n break;\n }\n return 69;\n }", "private static void towerofhanoi(int n, char A, char B, char C) {\n\t\tif(n==1)\n\t\t{\n\t\t\tSystem.out.println(\"Move disk from \" +A+ \" to \"+B );\n\t\t}\n\t\telse{\n\t\ttowerofhanoi(n-1,'A', 'C', 'B');\n\t\ttowerofhanoi(1,'A', 'B', 'C' );\n\t\ttowerofhanoi(n-1, 'C', 'B', 'A' );\n\t}\n\t}", "@Override\n public int generateNumber(int n) {\n if (n == 0) {\n return 0;\n } else if (n == 1) {\n return 1;\n } else {\n // We need the following nums to do the calculation by themselves\n int num1 = 0;\n int num2 = 1;\n int num3 = 0;\n // Starting from i = 1 is because we have done the first two in num1 and num2\n for (int i = 1; i < n; i++) {\n num3 = num1 + num2;\n num1 = num2;\n num2 = num3;\n }\n return num3;\n }\n }", "public int seat() {\n int result = 0;\n Pair gap = pq.poll();\n // if left is -1,,, next pos will be 0 for sure\n if (gap.left == -1) {\n result = 0;\n // if right is N.... next pos will be N-1 for sure\n } else if (gap.right == N) {\n result = N - 1 ;\n } else {\n // else it has to be the middle value\n result = gap.left + (gap.right - gap.left ) / 2;\n }\n pq.add(new Pair(gap.left, result));\n pq.add(new Pair(result, gap.right)); \n seats.add(result);\n return result;\n }", "int n_queens(int n, ArrayList<Integer> board){\n System.out.println(board.toString());\n\n if(n == board.size()){\n return 1;\n }\n\n int count = 0;\n\n for(int i = 0; i < n; i++){\n // make sure we haven't included it\n if(!board.contains(i)){\n board.add(i);\n System.out.println(\"!! \" + i);\n if(isValid(board)){\n count += n_queens(n,board);\n }\n board.remove(board.size()-1);\n }\n }\n\n return count;\n }", "void lowerNumberOfStonesOnBoard();", "public static int tripleStep(int n) {\n int[] steps = {1,2,3};\n int[] count = new int[n+1];\n\n for(int i=1; i<=n; i++) {\n for(int j=0; j<steps.length; j++) {\n if(i-j == 0) {\n count[i]++;\n }\n if(i-j > 0) {\n count[i] += count[i-j];\n }\n }\n }\n return count[n];\n }", "public static void main(String[] args) {\n\t\tint initialNumberOfBirds = 4;\n\t\tint birdsThatFlewAway = 1;\n\t\tint remainingNumberOfBirds = initialNumberOfBirds - birdsThatFlewAway;\n\n /*\n 2. There are 6 birds and 3 nests. How many more birds are there than\n nests?\n */\n\n\t\t// ### EXAMPLE:\n\t\tint numberOfBirds = 6;\n\t\tint numberOfNests = 3;\n\t\tint numberOfExtraBirds = numberOfBirds - numberOfNests;\n\n /*\n 3. 3 raccoons are playing in the woods. 2 go home to eat dinner. How\n many raccoons are left in the woods?\n */\n\t\t\tint raccoonsPlaying = 3;\n\t\t\tint raccoonsThatWentHome = 2;\n\t\t\tint raccoonsLeft = raccoonsPlaying - raccoonsThatWentHome;\n /*\n 4. There are 5 flowers and 3 bees. How many less bees than flowers?\n */\n\t\t\tint flowers = 5;\n\t\t\tint bees = 3;\n\t\t\tint difference = flowers - bees;\n /*\n 5. 1 lonely pigeon was eating breadcrumbs. Another pigeon came to eat\n breadcrumbs, too. How many pigeons are eating breadcrumbs now?\n */\n\t\t\tint pigeonEating = 1;\n\t\t\tint pigeonThatJoinedToEat = 1;\n\t\t\tint totalOfPigeonsEating = pigeonEating + pigeonThatJoinedToEat;\n /*\n 6. 3 owls were sitting on the fence. 2 more owls joined them. How many\n owls are on the fence now?\n */\n\t\t\tint owlsSittingOnFence = 3;\n\t\t\tint owlsThatJoined = 2;\n\t\t\tint totalOwlsOnFence = owlsSittingOnFence + owlsThatJoined;\n /*\n 7. 2 beavers were working on their home. 1 went for a swim. How many\n beavers are still working on their home?\n */\n\t\t\tint beaversWorking = 2;\n\t\t\tint beaversSwimming = 1;\n\t\t\tint beaversLeftWorking = beaversWorking - beaversSwimming;\n /*\n 8. 2 toucans are sitting on a tree limb. 1 more toucan joins them. How\n many toucans in all?\n */\n\t\t\tint toucansSitting = 2;\n\t\t\tint toucansThatJoined = 1;\n\t\t\tint totalToucans = toucansSitting + toucansThatJoined;\n /*\n 9. There are 4 squirrels in a tree with 2 nuts. How many more squirrels\n are there than nuts?\n */\n\t\t\tint squirrelsInTreesWithNuts = 4;\n\t\t\tint nuts = 2;\n\t\t\tint differenceBetweenSquirrelsAndNuts = squirrelsInTreesWithNuts - nuts;\n /*\n 10. Mrs. Hilt found a quarter, 1 dime, and 2 nickels. How much money did\n she find?\n */\n\t\t\tint quarter = 25;\n\t\t\tint dime = 10;\n\t\t\tint nickel = 5;\n\t\t\tint numberOfNickels = 2;\n\t\t\t\n\t\t\tfloat totalAmount = (float)(quarter + dime + (nickel * numberOfNickels))/100;\n\t\t\t\n /*\n 11. Mrs. Hilt's favorite first grade classes are baking muffins. Mrs. Brier's\n class bakes 18 muffins, Mrs. MacAdams's class bakes 20 muffins, and\n Mrs. Flannery's class bakes 17 muffins. How many muffins does first\n grade bake in all?\n */\n\t\t\tint brierClassMuffin = 18;\n\t\t\tint macAdamClassMuffin = 20;\n\t\t\tint flanneryClassMuffin = 17;\n\t\t\t\n\t\t\tint hiltFirstGradeTotalMuffins = brierClassMuffin + macAdamClassMuffin + flanneryClassMuffin;\n\t\t\t\n\t\t\t\n /*\n 12. Mrs. Hilt bought a yoyo for 24 cents and a whistle for 14 cents. How\n much did she spend in all for the two toys?\n */\n\t\t\tint yoyoCost = 24;\n\t\t\tint whistleCost = 14;\n\t\t\tfloat totalCostToys = (float)(yoyoCost + whistleCost)/100;\n /*\n 13. Mrs. Hilt made 5 Rice Krispie Treats. She used 8 large marshmallows\n and 10 mini marshmallows.How many marshmallows did she use\n altogether?\n */\n\t\t\t int largeMarshmallows = 8;\n\t\t\t int miniMarshmallows = 10;\n\t\t\t int totalMarshmallows = largeMarshmallows + miniMarshmallows;\n /*\n 14. At Mrs. Hilt's house, there was 29 inches of snow, and Brecknock\n Elementary School received 17 inches of snow. How much more snow\n did Mrs. Hilt's house have?\n */\n\t\t\t int hiltHouseSnow = 29;\n\t\t\t int brecknockSchoolSnow = 17;\n\t\t\t int snowDifferenceAtHiltHouse = hiltHouseSnow - brecknockSchoolSnow;\n /*\n 15. Mrs. Hilt has $10. She spends $3 on a toy truck and $2 on a pencil\n case. How much money does she have left?\n */\n\t\t\t int hiltTotalMoney = 10;\n\t\t\t\tint toyTruckCost = 3;\n\t\t\t\tint pencilCaseCost = 2;\n\t\t\t\t\n\t\t\t\tint hiltMoneyLeft = hiltTotalMoney - toyTruckCost - pencilCaseCost;\n /*\n 16. Josh had 16 marbles in his collection. He lost 7 marbles. How many\n marbles does he have now?\n */\n\t\t\t\tint joshTotalMarbles = 16;\n\t\t\t\tint joshLostMarbles = 7;\n\t\t\t\tint joshRemainingMarbles = joshTotalMarbles - joshLostMarbles;\n /*\n 17. Megan has 19 seashells. How many more seashells does she need to\n find to have 25 seashells in her collection?\n */\n\t\t\t\tint meganSeashells = 19;\n\t\t\t\tint desiredSeashells = 25;\n\t\t\t\tint numberSeashellsNeeded = desiredSeashells - meganSeashells;\n /*\n 18. Brad has 17 balloons. 8 balloons are red and the rest are green. How\n many green balloons does Brad have?\n */\n\t\t\t\t int bradBallons = 17;\n\t\t\t\t int bradRedBallons = 8;\n\t\t\t\t int bradGreenBallons = bradBallons - bradRedBallons;\n /*\n 19. There are 38 books on the shelf. Marta put 10 more books on the shelf.\n How many books are on the shelf now?\n */\n\t\t\t\t int shelfBooks = 38;\n\t\t\t\t int addedBooks = 10;\n\t\t\t\t \n\t\t\t\t int totalShelfBooks = shelfBooks + addedBooks;\n /*\n 20. A bee has 6 legs. How many legs do 8 bees have?\n */\n\t\t\t\t int beeLegs = 6;\n\t\t\t\t int beesRightHere = 8;\n\t\t\t\t \n\t\t\t\t int totalLegs = beeLegs * beesRightHere;\n /*\n 21. Mrs. Hilt bought an ice cream cone for 99 cents. How much would 2 ice\n cream cones cost?\n */\n\t\t\t\t int iceCreamCost = 99;\n\t\t\t\t\tint amountIceCream = 2;\n\t\t\t\t\t\n\t\t\t\t\tfloat totalIceCreamCost = (float)(iceCreamCost * amountIceCream) /100;\n /*\n 22. Mrs. Hilt wants to make a border around her garden. She needs 125\n rocks to complete the border. She has 64 rocks. How many more rocks\n does she need to complete the border?\n */\n\t\t\t\t\tint hiltRocksOwned = 64;\n\t\t\t\t\tint hiltRocksGoal = 125;\n\t\t\t\t\t\n\t\t\t\t\tint hiltRocksNeeded = hiltRocksGoal - hiltRocksOwned;\n /*\n 23. Mrs. Hilt had 38 marbles. She lost 15 of them. How many marbles does\n she have left?\n */\n\t\t\t\t\tint hiltMarbles = 38;\n\t\t\t\t\tint hiltMissedMarbles = 15;\n\t\t\t\t\t\n\t\t\t\t\tint hiltMarblesLeft = hiltMarbles - hiltMissedMarbles;\n /*\n 24. Mrs. Hilt and her sister drove to a concert 78 miles away. They drove 32\n miles and then stopped for gas. How many miles did they have left to drive?\n */\n\t\t\t\t\tint concertDistance = 78;\n\t\t\t\t\tint milesDriven = 32;\n\t\t\t\t\t\n\t\t\t\t\tint milesLeft = concertDistance - milesDriven;\n /*\n 25. Mrs. Hilt spent 1 hour and 30 minutes shoveling snow on Saturday\n morning and 45 minutes shoveling snow on Saturday afternoon. How\n much total time did she spend shoveling snow?\n */\n\t\t\t\t\tint hourToMinutes = 1 * 60;\n\t\t\t\t\tint remainingMinutes = 75;\n\t\t\t\t\t\n\t\t\t\t\tint totalTimeMinutes = hourToMinutes + remainingMinutes;\n\t\t\t\t\tfloat totalTimeHours = (float)totalTimeMinutes / 60;\t\n /*\n 26. Mrs. Hilt bought 6 hot dogs. Each hot dog cost 50 cents. How much\n money did she pay for all of the hot dogs?\n */\n\t\t\t\t\tint hotDogsBought = 6;\n\t\t\t\t\tint hotDogCost = 50;\n\t\t\t\t\t\n\t\t\t\t\tfloat totalHotDogsCost = (float) (hotDogsBought * hotDogCost) /100;\t\n /*\n 27. Mrs. Hilt has 50 cents. A pencil costs 7 cents. How many pencils can\n she buy with the money she has?\n */\n\t\t\t\t\tfloat hiltCash = 0.50f;\n\t\t\t\t\tfloat pencilCost = 0.07f;\n\t\t\t\t\t\n\t\t\t\t\tint pencilsAcquirable = (int) (hiltCash / pencilCost) ;\n /*\n 28. Mrs. Hilt saw 33 butterflies. Some of the butterflies were red and others\n were orange. If 20 of the butterflies were orange, how many of them\n were red?\n */\n\t\t\t\t\tint butterfliesSaw = 33;\n\t\t\t\t\tint orangeButterflies = 20;\n\t\t\t\t\t\n\t\t\t\t\tint redButterflies = butterfliesSaw - orangeButterflies;\n /*\n 29. Kate gave the clerk $1.00. Her candy cost 54 cents. How much change\n should Kate get back?\n */\n\t\t\t\t\tint moneyGivenInCents = 1 * 100;\n\t\t\t\t\tint productCostInCents = 54;\n\t\t\t\t\t\n\t\t\t\t\tfloat change = (float) (moneyGivenInCents - productCostInCents) /100;\n /*\n 30. Mark has 13 trees in his backyard. If he plants 12 more, how many trees\n will he have?\n */\n\t\t\t\t\tint treesInBackyard = 13;\n\t\t\t\t\tint treesPlanted = 12;\n\t\t\t\t\t\n\t\t\t\t\tint totalTrees = treesInBackyard + treesPlanted;\n /*\n 31. Joy will see her grandma in two days. How many hours until she sees\n her?\n */\n\t\t\t\t\tint daysLeft = 2;\n\t\t\t\t\tint hoursInDay = 24;\n\t\t\t\t\t\n\t\t\t\t\tint hoursLeft = daysLeft * hoursInDay;\n /*\n 32. Kim has 4 cousins. She wants to give each one 5 pieces of gum. How\n much gum will she need?\n */\n\t\t\t\t\tint kimCousins = 4;\n\t\t\t\t\tint gumToEach = 5;\n\t\t\t\t\t\n\t\t\t\t\tint gumNeeded = kimCousins * gumToEach;\t\n /*\n 33. Dan has $3.00. He bought a candy bar for $1.00. How much money is\n left?\n */\n\t\t\t\t\tint danCash = 3;\n\t\t\t\t\tint candyBarCost = 1;\n\t\t\t\t\t\n\t\t\t\t\tint cashLeft = danCash - candyBarCost;\n /*\n 34. 5 boats are in the lake. Each boat has 3 people. How many people are\n on boats in the lake?\n */\n\t\t\t\t\tint boatsInLake = 5;\n\t\t\t\t\tint peopleInEachBoat = 3;\n\t\t\t\t\t\n\t\t\t\t\tint peopleInBoats = boatsInLake * peopleInEachBoat;\n /*\n 35. Ellen had 380 legos, but she lost 57 of them. How many legos does she\n have now?\n */\n\t\t\t\t\tint ellenLegos = 380;\n\t\t\t\t\tint legosLost = 57;\n\t\t\t\t\t\n\t\t\t\t\tint legosLeft = ellenLegos - legosLost;\n /*\n 36. Arthur baked 35 muffins. How many more muffins does Arthur have to\n bake to have 83 muffins?\n */\n\t\t\t\t\tint arthurBakedMuffins = 35;\n\t\t\t\t\tint arthurGoalMuffins = 83;\n\t\t\t\t\t\n\t\t\t\t\tint muffinsLeftToBake = arthurGoalMuffins - arthurBakedMuffins;\n /*\n 37. Willy has 1400 crayons. Lucy has 290 crayons. How many more\n crayons does Willy have then Lucy?\n */\n\t\t\t\t\tint willyCrayons = 1400;\n\t\t\t\t\tint lucyCrayons = 290;\n\t\t\t\t\t\n\t\t\t\t\tint differenceInCrayons = willyCrayons - lucyCrayons;\n /*\n 38. There are 10 stickers on a page. If you have 22 pages of stickers, how\n many stickers do you have?\n */\n\t\t\t\t\tint stickersOnPage = 10;\n\t\t\t\t\tint numberOfPages = 22;\n\t\t\t\t\t\n\t\t\t\t\tint totalStickers = stickersOnPage * numberOfPages;\n /*\n 39. There are 96 cupcakes for 8 children to share. How much will each\n person get if they share the cupcakes equally?\n */\n\t\t\t\t\tint totalCupcakes = 96;\n\t\t\t\t\tint totalChildren = 8;\n\t\t\t\t\t\n\t\t\t\t\tint shareOfCupcakes = totalCupcakes / totalChildren;\n /*\n 40. She made 47 gingerbread cookies which she will distribute equally in\n tiny glass jars. If each jar is to contain six cookies each, how many\n cookies will not be placed in a jar?\n */\n\t\t\t\t\tint totalGingerbread = 47;\n\t\t\t\t\tint jarCapacity = 6;\n\t\t\t\t\t\n\t\t\t\t\tint cookiesLeftOutside = totalGingerbread % jarCapacity;\n /*\n 41. She also prepared 59 croissants which she plans to give to her 8\n neighbors. If each neighbor received and equal number of croissants,\n how many will be left with Marian?\n */\n\t\t\t\t\tint totalCroissants = 59;\n\t\t\t\t\tint neighboorsToGetCroissants = 8;\n\t\t\t\t\t\n\t\t\t\t\tint croissantsLeftToMarian = totalCroissants % neighboorsToGetCroissants;\n /*\n 42. Marian also baked oatmeal cookies for her classmates. If she can\n place 12 cookies on a tray at a time, how many trays will she need to\n prepare 276 oatmeal cookies at a time?\n */\n\t\t\t\t\tint oatmealCookiesGoal = 276;\n\t\t\t\t\tint trayCookieCapacity = 12;\n\t\t\t\t\t\n\t\t\t\t\tint traysNeeded = oatmealCookiesGoal / trayCookieCapacity;\n /*\n 43. Marian’s friends were coming over that afternoon so she made 480\n bite-sized pretzels. If one serving is equal to 12 pretzels, how many\n servings of bite-sized pretzels was Marian able to prepare?\n */\n\t\t\t\t\t \n\t\t\t\t\tint totalPretzels = 480;\n\t\t\t\t\tint oneServing = 12;\n\t\t\t\t\t\n\t\t\t\t\tint amountsOfServing = totalPretzels / oneServing;\n /*\n 44. Lastly, she baked 53 lemon cupcakes for the children living in the city\n orphanage. If two lemon cupcakes were left at home, how many\n boxes with 3 lemon cupcakes each were given away?\n */\n\t\t\t\t\tint lemonCupcakes = 53;\n\t\t\t\t\tint cupcakesLeftAtHome = 2;\n\t\t\t\t\tint cupcakesInABox = 3;\n\t\t\t\t\t\n\t\t\t\t\tint boxesGiven = (lemonCupcakes - cupcakesLeftAtHome) / cupcakesInABox;\n /*\n 45. Susie's mom prepared 74 carrot sticks for breakfast. If the carrots\n were served equally to 12 people, how many carrot sticks were left\n uneaten?\n */\n\t\t\t\t\t \n\t\t\t\t\tint carrotSticks = 74;\n\t\t\t\t\tint peopleEating = 12;\n\t\t\t\t\t\n\t\t\t\t\tint carrotLeftOut = carrotSticks % peopleEating;\n /*\n 46. Susie and her sister gathered all 98 of their teddy bears and placed\n them on the shelves in their bedroom. If every shelf can carry a\n maximum of 7 teddy bears, how many shelves will be filled?\n */\n\t\t\t\t\tint teddyBears = 98;\n\t\t\t\t\tint shelfCapacity = 7;\n\t\t\t\t\t\n\t\t\t\t\tint numberOfShelvesFilled = teddyBears / shelfCapacity;\n /*\n 47. Susie’s mother collected all family pictures and wanted to place all of\n them in an album. If an album can contain 20 pictures, how many\n albums will she need if there are 480 pictures?\n */\n\t\t\t\t\tint albumCapacity = 20;\n\t\t\t\t\tint pictures = 480;\n\t\t\t\t\t\n\t\t\t\t\tint albumsNeeded = pictures / albumCapacity;\n /*\n 48. Joe, Susie’s brother, collected all 94 trading cards scattered in his\n room and placed them in boxes. If a full box can hold a maximum of 8\n cards, how many boxes were filled and how many cards are there in\n the unfilled box?\n */\n\t\t\t\t\tint tradingCards = 94;\n\t\t\t\t\tint boxCapacity = 8;\n\t\t\t\t\t\n\t\t\t\t\tint boxesFilled = tradingCards % boxCapacity;\n\t\t\t\t\t \n\t\t\t\t\t\t\t\n /*\n 49. Susie’s father repaired the bookshelves in the reading room. If he has\n 210 books to be distributed equally on the 10 shelves he repaired,\n how many books will each shelf contain?\n */\n\t\t\t\t\tint numberOfBooks = 210;\n\t\t\t\t\tint shelvesAvailable = 10;\n\t\t\t\t\t\n\t\t\t\t\tint booksPerShelf = numberOfBooks / shelvesAvailable;\n /*\n 50. Cristina baked 17 croissants. If she planned to serve this equally to\n her seven guests, how many will each have?\n */\n\t\t\t\t\tint croissants = 17;\n\t\t\t\t\tint guests = 7;\n\t\t\t\t\t\n\t\t\t\t\tint croissantsPerGuest = croissants / guests;\n /*\n CHALLENGE PROBLEMS\n */\n\n /*\n Bill and Jill are house painters. Bill can paint a 12 x 14 room in 2.15 hours, while Jill averages\n 1.90 hours. How long will it take the two painter working together to paint 5 12 x 14 rooms?\n Hint: Calculate the hourly rate for each painter, combine them, and then divide the total walls in feet by the combined hourly rate of the painters.\n Challenge: How many days will it take the pair to paint 623 rooms assuming they work 8 hours a day?.\n */\n\t\t\t\t\tfloat billFeetTimeHourly = (12*14) / 2.15f;\n\t\t\t\t\tfloat jillFeetTimeHourly = (12*14) /1.90f;\n\t\t\t\t\t\n\t\t\t\t\tfloat hourlyFeetRateCombined = billFeetTimeHourly + jillFeetTimeHourly ; \n\t\t\t\t\tfloat wallsFeetCombined = 5 * (12*14) / hourlyFeetRateCombined;\n\t\t\t\t\t\n\t\t\t\t\tfloat finalAnswer = wallsFeetCombined;\n\t\t\t\t\t\n\t\t\t\t\t//challenge below\n\t\t\t\t\t\n\t\t\t\t\tfloat daysFor623Rooms = 623 * (12*14) / (hourlyFeetRateCombined * 8);\n /*\n Create and assign variables to hold your first name, last name, and middle initial. Using concatenation,\n build an additional variable to hold your full name in the order of last name, first name, middle initial. The\n last and first names should be separated by a comma followed by a space, and the middle initial must end\n with a period.\n Example: \"Hopper, Grace B.\"\n */\n\t\t\t\t\tString firstName = \"William\";\n\t\t\t\t\tString lastName = \"Rabuske\";\n\t\t\t\t\tString middleInitial = \"M\";\n\t\t\t\t\t\n\t\t\t\t\tString fullName = lastName + \",\" + \" \" + firstName + \" \" + middleInitial + \".\";\n /*\n The distance between New York and Chicago is 800 miles, and the train has already travelled 537 miles.\n What percentage of the trip has been completed?\n Hint: The percent completed is the miles already travelled divided by the total miles.\n Challenge: Display as an integer value between 0 and 100 using casts.\n */\n\t\t\t\t\tint distanceBetweenCities = 800;\n\t\t\t\t\tint distanceTravelled = 537;\n\t\t\t\t\tfloat completed = (float) distanceTravelled / distanceBetweenCities;\n\t\t\t\t\tint percentageCompleted = (int)(completed * 100);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(percentageCompleted);\n\t}", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "private static void shift(RescueMap rm, int n1, int n2, int n3, int[] c){\n\t\t//get the normal to the first road\n\t\tlong n1y = rm.getX(n2) - rm.getX(n1);\n\t\tlong n1x = rm.getY(n1) - rm.getY(n2);\n\t\t//get normal to the second road\n\t\tlong n2y = rm.getX(n3) - rm.getX(n2);\n\t\tlong n2x = rm.getY(n2) - rm.getY(n3);\n\t\t//get length of each normal\n\t\tdouble len1 = Math.sqrt(n1y*n1y+n1x*n1x);\n\t\tdouble len2 = Math.sqrt(n2y*n2y+n2x*n2x);\n\n\t\tint d = 3000;//Math.max(rm.getRoad(n1,n2),rm.getRoad(n2,n3))*2000 +500;\n\n\t\tint x1 = rm.getX(n1) - (int)(n1x*d*1.0/len1);\n\t\tint x2 = rm.getX(n2) - (int)(n1x*d*1.0/len1);\n\t\tint y1 = rm.getY(n1) - (int)(n1y*d*1.0/len1);\n\t\tint y2 = rm.getY(n2) - (int)(n1y*d*1.0/len1);\n\t\tint x3 = rm.getX(n2) - (int)(n2x*d*1.0/len2);\n\t\tint x4 = rm.getX(n3) - (int)(n2x*d*1.0/len2);\n\t\tint y3 = rm.getY(n2) - (int)(n2y*d*1.0/len2);\n\t\tint y4 = rm.getY(n3) - (int)(n2y*d*1.0/len2);\n\n\t\tint[] intersect = intersection(x1,y1,x2,y2,x3,y3,x4,y4);\n\t\tif(intersect == null){\n\t\t\tc[0] -= (n1x/len1)*d;\n\t\t\tc[1] -= (n1y/len1)*d;\n\t\t}\n\t\telse{\n\t\t\tc[0] = intersect[0];\n\t\t\tc[1] = intersect[1];\n\t\t}\n\t}", "public int C(int n, int k) {\n\tif (choose[n][k] != -1)\n\t\treturn choose[n][k];\n\tint t = C(n-1,k-1) + C(n-1,k);\n\tchoose[n][k] = t;\n\treturn t;\n}", "public static void main(String[] args) {\n int n = 1;\n System.out.println(\"With 1:\");\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 2:\");\n n = 2;\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 3:\");\n n = 3;\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 4:\");\n n = 4;\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 10:\");\n n = 10;\n createParenthesis(n*2, 0, \"\");\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int c = 0;\n int p = 0;\n int prev = 0;\n while (n-- > 0) {\n int a = scanner.nextInt();\n if (p == 0 ) {\n p = 1;\n } else if (prev != a - 1) {\n if (p >= 3) c+= p - 2;\n p = 1;\n } else if (prev == a - 1) {\n p++;\n }\n prev = a;\n }\n if (p >= 3) c+= p - 2;\n System.out.print(c);\n }", "public int countHandShakes(){\n\t\tif (this.getNCouples() < 1) {\n\t\t\treturn 0;\n\t\t}else if (this.getNCouples() == 1) {\n\t\t\treturn 1;\n\t\t}else{\n\t\t\tthis.setNCouples(this.getNCouples() - 1);\n\t\t\treturn (this.getNCouples() + 1) * 3 - 2 + countHandShakes();\n\t\t}\n\t}", "public int numWays(int n, int k) {\n if(n == 0)\n return 0;\n int numsDiff = k;\n int numsSame = 0;\n for(int i = 2; i <= n; i++){\n int preSame = numsSame;\n numsSame = numsDiff;\n numsDiff = preSame * (k - 1) + numsDiff * (k - 1);\n }\n return numsSame + numsDiff;\n }", "public static int frog(int n, int [] h){\n\n int dp[] = new int [n];\n\n dp[0] = 0;\n dp[1] = Math.abs(h[1] - h[0]);\n\n for(int i = 2; i < n ; i ++){\n\n dp[i] = Math.min(dp [i - 2] + Math.abs(h[i] - h[i - 2]), dp[i - 1] + Math.abs(h[i] - h[i - 1]));\n\n\n\n }\n //print(dp);\n return dp[n - 1];\n }", "int fibonacciNumberFinder(int n){\n if (n <= 1){\n return n;\n }\n return fibonacciNumberFinder(n - 1) + fibonacciNumberFinder(n - 2);\n }", "public void game(int set1hometeampoints, int set2hometeampoints,\n int set3hometeampoints, int set4hometeampoints, int set5hometeampoints,\n int set1awayteampoints, int set2awayteampoints, int set3awayteampoints, \n int set4awayteampoints, int set5awayteampoints)\n { \n if (set1hometeampoints == 21){\n setsWonHT ++;\n } else if(set1awayteampoints == 21){\n setsWonAT ++; \n } \n if (set2hometeampoints == 21){\n setsWonHT ++;\n } else if(set2awayteampoints == 21){\n setsWonAT ++; \n } \n if (set3hometeampoints == 21){\n setsWonHT ++;\n } else if(set3awayteampoints == 21){\n setsWonAT ++; \n }\n if (set4hometeampoints == 21){\n setsWonHT ++;\n } else if(set4awayteampoints == 21){\n setsWonAT ++; \n } \n if (set5hometeampoints == 15){\n setsWonHT ++;\n } else if(set5awayteampoints == 15){\n setsWonAT ++; \n }\n }", "private int rs(final int x) {\n assert(! leaf(x));\n return Math.min(2*x+2, n);\n }", "public int fact(int n){\n if(n == 1){\n return 1;\n }\n return n * (fact(n-1));\n }", "public static int hailstoneLength(int n) {\n /* to be implemented in part (a) */\n int length = 0;\n while (n != 1){\n if (n%2!=0)\n n= 3*n+1;\n else if (n%2==0)\n n= n/2;\n length ++;\n }\n return length + 1;\n }", "public static int numberOfWays(int n, int[]res) {\n if (n < 0) return 0;\n if (res[n] > 0) return res[n];\n\n int sum = numberOfWays(n - 1, res) + numberOfWays(n - 2, res) + numberOfWays(n - 3, res);\n res[n] = sum;\n return sum;\n }", "public int steps(int n) {\n\n\t\tint steps = 0;\n\t\tQueue<Integer> q = new ArrayDeque<>();\n\n\t\tSet<Integer> set = new HashSet<>();\n\n\t\tq.add(n);\n\t\tset.add(n);\n\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tint curr = q.poll();\n\t\t\t\tif (curr == 1)\n\t\t\t\t\treturn steps;\n\n\t\t\t\tif (!set.contains(curr-1)) {\n\t\t\t\t\tq.add(curr - 1);\n\t\t\t\t\tset.add(curr-1);\n\t\t\t\t}\n\n\t\t\t\tif (curr % 2 == 0 && !set.contains(curr / 2)) {\n\t\t\t\t\tq.add(curr / 2);\n\t\t\t\t\tset.add(curr / 2);\n\t\t\t\t}\n\n\t\t\t\tif (curr % 3 == 0 && !set.contains(curr / 3)) {\n\t\t\t\t\tq.add(curr / 3);\n\t\t\t\t\tset.add(curr / 3);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsteps++;\n\n\t\t}\n\n\t\treturn steps;\n\n\t}", "public int getBurnOut() {\n if (numberPlayers > 2) {\n if (corners1() != -2 && playersArray[corners1()] != -3) {\n int c = corners1();\n playersArray[corners1()] = -3;\n return c;\n }\n if (sides1() != -2 && playersArray[sides1()] != -3) {\n int s = sides1();\n playersArray[sides1()] = -3;\n return s;\n }\n if (middle1() != -2 && playersArray[middle1()] != -3) {\n int m = middle1();\n playersArray[middle1()] = -3;\n return m;\n }\n }\n return -1;\n }", "private static int path1(int n) {\n int[] path = new int[n+1];\n path[0] = 0;\n path[1] = 1;\n path[2] = 2;\n for (int i=3;i<=n;i++) {\n path[i] = path[i-1] + path[i-2];\n }\n return path[n];\n }" ]
[ "0.834371", "0.82454073", "0.8115144", "0.81112254", "0.79908586", "0.78786045", "0.78683615", "0.77719414", "0.77559716", "0.7708636", "0.75733846", "0.7478906", "0.7467492", "0.72521335", "0.7226858", "0.6892719", "0.67739403", "0.65951353", "0.6321294", "0.62819105", "0.6198217", "0.61890435", "0.61801755", "0.6135527", "0.60885334", "0.60611147", "0.58999485", "0.58820623", "0.58665746", "0.5799585", "0.5778338", "0.5773057", "0.5766087", "0.57432044", "0.5724945", "0.57138366", "0.5709573", "0.5708133", "0.5666747", "0.5603909", "0.558338", "0.55187654", "0.551015", "0.5496917", "0.5487412", "0.54770577", "0.54762155", "0.5475452", "0.5468092", "0.5462595", "0.5461879", "0.5459506", "0.5458016", "0.54579437", "0.5455514", "0.54409146", "0.54387975", "0.5432804", "0.5428248", "0.5424635", "0.5424446", "0.5421457", "0.54132324", "0.5409038", "0.54020065", "0.53872305", "0.53807265", "0.53798646", "0.53784996", "0.5369714", "0.5366358", "0.53616023", "0.5361594", "0.5359932", "0.5352702", "0.53478885", "0.5338342", "0.5336946", "0.53368646", "0.5330013", "0.5326125", "0.53256536", "0.53234416", "0.5319983", "0.5319915", "0.5319325", "0.5314384", "0.53050387", "0.5300919", "0.53002155", "0.52989286", "0.52959204", "0.5288466", "0.52673244", "0.52654934", "0.5264776", "0.5264159", "0.52624416", "0.52568036", "0.52559036" ]
0.8149742
2
Test of addRound method, of class RoundDaoDBImpl.
@Test public void testAddRound() { Game g = new Game(); g.setGameId(1); g.setGameStatus(true); g.setGameKey(1234); gameDao.addGame(g); Round round = new Round(); round.setGuess(1234); round.setGuessTime(LocalDateTime.now()); round.setGuessResult("e0 : p0"); round.setGameId(g.getGameId()); roundDao.addRound(round); Round DaoRound=roundDao.addRound(round); assertEquals(round, DaoRound); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetRoundById() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round roundBackFromDao = roundDao.getRoundById(testRound1.getRoundId());\n \n assertEquals(testRound1, roundBackFromDao);\n }", "@Test\n public void testAddGetAllRoundsByGameId() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round testRound2 = new Round();\n testRound2.setGameId(testGame.getGameId());\n testRound2.setUserGuess(\"4567\");\n testRound2.setTime(LocalDateTime.now());\n testRound2.setResult(\"RESULT\");\n testRound2 = roundDao.addRound(testRound2);\n \n List<Round> rounds = roundDao.getAllRoundsByGameId(testGame.getGameId());\n \n assertEquals(2, rounds.size());\n // assertNotNull(testRound1 = roundDao.getRoundById(testRound1.getRoundId()));\n //assertNotNull(testRound2 = roundDao.getRoundById(testRound2.getRoundId()));\n\n assertTrue(rounds.contains(testRound1));\n assertTrue(rounds.contains(testRound2));\n }", "@Test\n public void testGameProcess() {\n // set test player data\n mTournament.setPlayerCollection(getTestPlayersData());\n\n int roundNumber = mTournament.calculateRoundsNumber(mTournament.getPlayersCount());\n for (int i = 0; i < roundNumber; ++i) {\n Round round = mTournament.createNewRound();\n assertTrue(\"State of new round must be CREATED\", round.getState() == State.CREATED);\n\n // tests can't create new round because not all rounds are completed\n Round falseRound = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, falseRound);\n\n round.startRound();\n assertTrue(\"State of starting round must be RUNNING\", round.getState() == State.RUNNING);\n\n randomiseResults(round.getMatches());\n round.endRound();\n assertTrue(\"State of ending round must be COMPLETED\", round.getState() == State.COMPLETED);\n\n // tests that ended round can't be started again\n round.startRound();\n assertTrue(\"State of ended round must be COMPLETED\", round.getState() == State.COMPLETED);\n }\n // tests can't create one more round because game is over at this point\n Round round = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, round);\n\n }", "abstract GameRound setupRound();", "@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}", "public void setUpNewRound(){\n int newRound = getRoundNum() + 1;\n getRound().getPlayer(0).clearPiles();\n getRound().getPlayer(1).clearPiles();\n mRound = new Round(players);\n setRoundNum(newRound);\n mRound.beginRound();\n }", "private void newRound(){\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\tSystem.out.println(\"PREPPING ROUND \" + round + \" SETUP. Game Logic round (should be aligned) : \" + gameLogic.getRound());\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\n\t\tSystem.out.println(\"PRINTING LEADSUIT OF NEW ROUND \" + gameLogic.getLeadSuitCard());\n\t\tgameLogic.initialiseDeck();\n\t\tgameLogic.setDealer(round);\n\t\t\n\t\tSystem.out.println(\"Players Hand (Should be empty): \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getHand());\n\t\t\n\t\tgameLogic.setPlayersHand(round);\n\t\tgameLogic.setTrumpCard();\n\t\tgameLogic.setPlayerOrder(round);\n\t\tgameLogic.getTableHand().clearTableHand();\n\n\t\twaitingUser = false;\n\t\tif (waitingUser()){\n\t\t\twaitingUser = true;\n\t\t}\n\n\t\tcurrentPlayer = gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getPlayerId();\n\n\t\tdisplayRoundUI();\n\t\tdisplayTrumpUI();\n\t\tdisplayCardUI();\n\t\tdisplayAvailableBidsUI();\n\t\tdisplayTableHandUI();\n\n\t\tSystem.out.println(\"BEGIN ROUND \" + round);\n\t\ttodoThread();\n\t}", "@Test\npublic void testInsertAStudentScore() {\n//TODO: Test goes here...\n System.out.println(StudentDao.insertAStudentScore(1007,\"7\", 5, 5, 5));\n}", "@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"dbowman@yahoo.com\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }", "public void setRound(int round) {\r\n this.round = round;\r\n }", "public PaxosRound createRound(int a_round)\n {\n PaxosRound result = new PaxosRound(this, a_round, getNextRoundLeader(a_round));\n m_rounds.put(new Integer(a_round), result);\n return result;\n }", "public void addRound(ArrayList<Move> round) {\r\n\t\tfor (Move move : round) {\r\n\t\t\tadd(move);\r\n\t\t}\r\n\r\n\t\tint lastIndex = offsets.size() - 1;\r\n\t\toffsets.add(round.size() + offsets.get(lastIndex)); // accumulate the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// index\r\n\t}", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n int cod = 0;\n int semestre = 0;\n String nombre = \"\";\n int cod_es = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.add(cod, semestre, nombre, cod_es);\n assertEquals(expResult, result);\n \n }", "@Test\n public void addRecipeIngredient_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allRecipeIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n RecipeIngredient retrieved = new RecipeIngredient();\n if(allRecipeIngredients != null){\n for(int i = 0; i < allRecipeIngredients.size(); i++){\n if(allRecipeIngredients.get(i).getIngredientID() == ingredientID){\n retrieved = allRecipeIngredients.get(i);\n }\n }\n }\n assertEquals(\"addRecipeIngredient - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"addRecipeIngredient - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"addRecipeIngredient - Correct Details\", \"White Flour\", retrieved.getDetails());\n }", "@Test\n public void testAdd(){\n DogHouse testDogHouseAdd = new DogHouse();\n Integer expected = 1;\n\n Dog newDog = new Dog (\"Scully\", new Date(), 1);\n testDogHouseAdd.add(newDog);\n\n Integer actual = testDogHouseAdd.getNumberOfDogs();\n\n Assert.assertEquals(expected, actual);\n }", "@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }", "@Override\n\tpublic int add(Floor floor) {\n\t\treturn floorDao.add(floor);\n\t}", "public void handleNewAuctionRound(int roundNumber, int amount, long price);", "public void beginRound() {\r\n\t\tnewRound();\r\n\t}", "abstract void startRound();", "@Test\n\tpublic void testInsertObj() {\n\t}", "@Test\n public void shouldAddValidGameHistory()\n {\n boolean added = DatabaseHelper.addGameToStats(\"test\", \"test\", -25, \"test\", false, 0, 5, 9);\n DatabaseHelper.deleteTestEntry();\n assertTrue(added);\n }", "@Test\n public void savePlaces() {\n Assert.assertTrue(places.size() > 0);\n\n // save mock place\n boolean result = mDbHelper.savePlaces(Realm.getInstance(testConfig), places);\n\n // check result\n Assert.assertTrue(result);\n }", "@Override\n\t\t\tpublic TestEntity addTest(TestEntity test) \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}", "public void testInsert() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService service = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(service); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM \" + TABLE_NAME + \" WHERE employee = ?\");\r\n\t\tps.setString(1, \"employee\");\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tService expected = null;\r\n\t\twhile (rs.next()) {\r\n\t\t\texpected = new Service();\r\n\t\t\texpected.setId(rs.getInt(\"id\"));\r\n\t\t\texpected.setEmployee(rs.getString(\"employee\"));\r\n\t\t\texpected.setQuantity(rs.getInt(\"quantity\"));\r\n\t\t\texpected.setVariation(rs.getString(\"variation\"));\r\n\t\t\texpected.setNote(rs.getString(\"note\"));\r\n\t\t\texpected.setReceiptDate(rs.getDate(\"receipt_date\"));\r\n\t\t\texpected.setReturnDate(rs.getDate(\"return_date\"));\r\n\t\t\texpected.setArticleId(rs.getInt(\"article_id\"));\r\n\t\t\texpected.setCustomerId(rs.getInt(\"customer_id\"));\r\n\t\t}\r\n\r\n\t\t// compare database result with the method tested\r\n\t\tassertNotNull(expected);\r\n\t\tassertNotNull(service);\r\n\t\tassertEquals(expected, service);\r\n\r\n\t\tmodelDS.remove(expected.getId()); // return to the initial state of the\r\n\t\t\t\t\t\t\t\t\t\t\t// database before test\r\n\t}", "private void newRound() {\r\n\t\tballoonsThisRound = currentRoundNumber * balloonsPerRound * 5;\r\n\t\tcurrentRound = new Round(balloonTypes, 0.3f, balloonsThisRound);\r\n\t\tcurrentRoundNumber++;\r\n\r\n\t\tSystem.out.println(\"Begining Round: \" + currentRoundNumber);\r\n\t}", "public void setRoundNum(int roundNum){\n gameRounds = roundNum;\n }", "@Order(9)\n\t@Test\n\tpublic void Attempt_AddUser() throws SQLException\n\t{\n\t\tUser testUser = new User(\"Test\",\"Drone\",\"TestCase\",\"NoOne\",\"CaresAboutthis\",\"Test@Junit5.com\");\n\t\tboolean Expected = true, actual = us.addUser(testUser);\n\t\tassertEquals(Expected,actual);\n\t}", "public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}", "public abstract void executeRound(Deck d);", "public void handleNextRound() {\n\t\t\r\n\t}", "@Test\n public void addTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n Integer expected = 1;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }", "int add(Bill bill) throws SQLException;", "@Test\n public void test1Insert() {\n\n System.out.println(\"Prueba de SpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.insert(spec), 1);\n \n }", "public void executeRound(int round) {\n subBytes(stateMatrix);\n// System.out.println(\"after subBytes:\");\n// printMatrix(stateMatrix);\n\n ShiftRows(stateMatrix);\n// System.out.println(\"after shiftRows:\");\n// printMatrix(stateMatrix);\n\n MixColumns(stateMatrix);\n// System.out.println(\"after mixColumns:\");\n// printMatrix(stateMatrix);\n\n AddRoundKey(stateMatrix, getKeysForRound(round));\n// System.out.println(\"after addRound:\");\n// printMatrix(stateMatrix);\n }", "@Test(timeout = 50)\r\n\t// The below method is a test method\r\n\tpublic void testAdd() {\n\t\ttry {\r\n\t\t\tint calculatedValue = calc.add(20, 30);\r\n\t\t\tint expectedValue = 50;\r\n\t\t\tassertEquals(expectedValue, calculatedValue);\r\n\t\t} catch (NegativeNumberException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.out.println(\"Negative number\");\r\n\t\t}\r\n\t\t\r\n\t}", "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "void newRound() {\n // Increase the round number on every round.\n round++;\n\n // Write to the log file\n\t logger.log(divider);\n logger.log(\"\\nRound \" + round + \" starting.\");\n logger.log(\"Active player: \" + activePlayer.getName());\n\n // Log player name and topmost card for all players.\n for (Player player : players) {\n logger.log(player.getName() + \"'s card: \" + player.getTopMostCard()\n .toString());\n }\n\n setGameState(GameState.NEW_ROUND_INITIALISED);\n }", "@Test\n public void testAddOrd() {\n System.out.println(\"addOrd\");\n Criteria ctr = null;\n String orderProp = \"\";\n EDirecaoOrdenacao orderDir = null;\n ClassificacaoTributariaDAO instance = new ClassificacaoTributariaDAO();\n instance.addOrd(ctr, orderProp, orderDir);\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 addHighScoreTest() {\n database.createHighScoreTable(testTable);\n assertTrue(database.addHighScore(100, testTable));\n database.clearTable(testTable);\n\n }", "@Test\n public void testGetRoundsByGameID() {\n \n \n }", "public void newRound(){\r\n clearRandomDirections();\r\n this.currentAmountToPutIn++;\r\n initializeNewRound();\r\n //reset timer;\r\n }", "@Test\n\tpublic void saveRubrique() throws Exception {\n\t\tLocalDateTime now = LocalDateTime.now();\n\n\t\t/* creation du SUT */\n\n\t\tRubriqueService sut = new RubriqueService(this.rubriqueRepo, this.utilisateurRepo\n\n\t\t);\n\n\t\t// stubbing\n\t\tUtilisateur utilisateur = new Utilisateur();\n\t\tutilisateur.setId(1);\n\t\tutilisateur.setNom(\"nom1\");\n\t\tutilisateur.setPrenom(\"prenom1\");\n\t\tutilisateur.setEmail(\"email@gmail.com\");\n\t\tutilisateur.setUsername(\"username1\");\n\t\tutilisateur.setMotDePasse(\"mdp1\");\n\n\t\t// setup mocking\n\t\tRubrique rubrique = new Rubrique();\n\t\trubrique.setId(1);\n\t\trubrique.setContent(\"Contenue 1\");\n\t\trubrique.setDescription(\"description1\");\n\t\trubrique.setTitle(\"Titre1\");\n\n\t\t// Appel de fonction d'intégration\n\n\t\twhen(this.utilisateurRepo.getOne(utilisateur.getId())).thenReturn(utilisateur);\n\n\t\twhen(this.rubriqueService.createRubrique(1, rubrique.getTitle(), rubrique.getDescription(),\n\t\t\t\trubrique.getContent(), now)).thenReturn(new Rubrique());\n\n\t\twhen(this.rubriqueRepo.save(rubrique)).thenReturn(new Rubrique());\n\n\t\tsut.saveRubrique(rubrique);\n\n\t\t// verifier resultat\n\n\t\tMockito.verify(this.rubriqueRepo, times(1)).save(ArgumentMatchers.<Rubrique>any());\n\n\t}", "@Test\n public void insert() {\n// int insert = iUserDao.insert(u);\n// System.out.println(u);\n\n }", "@PostMapping(\"/{gameId}/round\")\n public Progress startNewRound(@PathVariable Long gameId) {\n return trainerService.startNewRound(gameId);\n // hier hoeft alleen de score gereturned te worden\n }", "@Test\n\tpublic void testCreateRow() throws SQLException\n\t{\n\t\tString insertStatement = \"INSERT INTO Nail (\" + \n\t\t\t\t\"id, UPC, ManufacturerID, Price,Length, NumberInBox\" +\n\t\t\t\t\") VALUES (1,'asdf',5,5,5.0,20)\";\n\t\tDatabaseGateway.createRow(insertStatement);\n\t\t\n\t\tResultSet rs = DatabaseGateway.getObjectByID(\"Nail\", 1);\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}", "@Test\n public void testSave()throws Exception {\n System.out.println(\"save\");\n String query = \"insert into librarian(name,password,email,address,city,contact) values(?,?,?,?,?,?)\";\n String name = \"Raf\";\n String password = \"rrrr\";\n String email = \"raf@gmail.com\";\n String address = \"1218/7\";\n String city = \"dacca\";\n String contact = \"016446\";\n int expResult = 0;\n \n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n int result = mockLibrarian.save(name, password, email, address, city, contact);\n assertEquals(result >0, true);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void addRecipeDirection_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedDirection1 = testDatabase.addRecipeDirection(recipeDirection1);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returnedRecipe);\n RecipeDirection retrieved = new RecipeDirection();\n if(allDirections != null){\n for(int i = 0; i < allDirections.size(); i++){\n if(allDirections.get(i).getKeyID() == returnedDirection1){\n retrieved = allDirections.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct Number\", 1, retrieved.getDirectionNumber(), 0);\n assertEquals(\"addRecipeDirection - Correct Text\", \"TestDirection1\", retrieved.getDirectionText());\n }", "@Test\r\n\tpublic void testInsertMoney() {\r\n\t\tvendMachine.insertMoney(10.0);\r\n\t\tassertEquals(10.0, vendMachine.getBalance(), 0.001);\r\n\t}", "@Override\n\tpublic void process(GuessRound guessRound) {\n\t\t\n\t}", "@Test\n public void testAddNewRate() {\n System.out.println(\"addNewRate\");\n int rate = 0;\n RateList instance = new RateList();\n Rate expResult = new Rate(0);\n Rate result = instance.addNewRate(rate);\n assertEquals(expResult, result);\n }", "@Test\n public void testAddprof_curso() {\n System.out.println(\"addprof_curso\");\n int codprof = 0;\n int codcurso = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.addprof_curso(codprof, codcurso);\n assertEquals(expResult, result);\n \n }", "@Test\n void insertSuccess() {\n GenericDao gameDao = new GenericDao(Game.class);\n\n Game game = (Game)gameDao.getById(1);\n\n RunCategory newCategory = new RunCategory(\"Ending E\", \"endinge\", \"<p>Reach the final ending</p>\");\n game.addCategory(newCategory);\n\n int id = dao.insert(newCategory);\n assertNotEquals(0,id);\n RunCategory insertedCategory = (RunCategory) dao.getById(id);\n\n\n assertEquals(newCategory, insertedCategory);\n }", "public static void resetDb(String round) throws Exception {\n\t\t\n\t\tPreparedStatement pst = conn.prepareStatement(\"DELETE FROM JTL_XML_RESULTS where ROUND = ?\");\n\t\tpst.setString(1, round);\n\t\tpst.execute();\n\t\tpst.close(); \n\t\tif(fetchDistinctTimeSlices(round).size() != 0) {\n\t\t\tthrow new Exception(\"Something went wrong purging the DB of JTL XML results for round [\"+round+\".]\");\n\t\t}\n\t\t\n//\t\tStatement st = conn.createStatement();\n//\t\tst.execute(\"CREATE TABLE JTL_XML_RESULTS (\" +\n//\t\t\t\t\"ID TEXT PRIMARY KEY NOT NULL, \" +\n//\t\t\t\t\"TEST_TYPE TEXT NOT NULL, \" +\n//\t\t\t\t\"ROUND TEXT NOT NULL, \" +\n//\t\t\t\t\"T TEXT NOT NULL, \" +\n//\t\t\t\t\"IT TEXT NOT NULL, \" +\n//\t\t\t\t\"LT TEXT NOT NULL, \" +\n//\t\t\t\t\"TS TEXT NOT NULL, \" +\n//\t\t\t\t\"S TEXT NOT NULL, \" +\n//\t\t\t\t\"LB TEXT NOT NULL, \" +\n//\t\t\t\t\"RM TEXT NOT NULL, \" +\n//\t\t\t\t\"TN TEXT NOT NULL, \" +\n//\t\t\t\t\"DT TEXT NOT NULL, \" +\n//\t\t\t\t\"BY TEXT NOT NULL, \" +\n//\t\t\t\t\"SC TEXT NOT NULL, \" +\n//\t\t\t\t\"EC TEXT NOT NULL, \" +\n//\t\t\t\t\"NG TEXT NOT NULL, \" +\n//\t\t\t\t\"NA TEXT NOT NULL);\");\n//\t\tst.close(); \n\t}", "public OnlineTest saveTest(OnlineTest onlineTest) throws UserException{\n\t\tString sql = \"insert into test(test_name, test_duration, test_total_marks,test_marks_scored, test_start_date_time, test_end_date_time) values(?,?,?,?,?,?)\";\r\n\t\ttry {\r\n\t\t\tpreparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tpreparedStatement.setString(1, onlineTest.getTestName());\r\n\t\t\tpreparedStatement.setTime(2,Time.valueOf(onlineTest.getTestDuration()));\r\n\t\t\tpreparedStatement.setDouble(3, onlineTest.getTestTotalMarks());\r\n\t\t\tpreparedStatement.setDouble(4, onlineTest.getTestMarksScored());\r\n\t\t\tpreparedStatement.setTimestamp(5, Timestamp.valueOf(onlineTest.getStartTime()));\r\n\t\t\tpreparedStatement.setTimestamp(6, Timestamp.valueOf(onlineTest.getEndTime()));\r\n\t\t\tint result = preparedStatement.executeUpdate();\r\n\t\t\tif(result == 0) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tBigInteger generatedId = BigInteger.valueOf(0L);\r\n\t\t\tresultSet = preparedStatement.getGeneratedKeys();\r\n\t\t\tif (resultSet.next()) {\r\n\t\t\t\tgeneratedId = BigInteger.valueOf(resultSet.getLong(1));\r\n\t\t\t\tSystem.out.println(\"Auto generated id : \" + generatedId);\r\n\t\t\t}\r\n\t\t\tonlineTest.setTestId(generatedId);;\r\n\t\t\tSystem.out.println(\"Added Test to the database with id as : \" + generatedId);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.out.println(\"Error at add Test Dao method: \" + e);\r\n\t\t} finally {\r\n\t\t\tif (preparedStatement != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpreparedStatement.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tSystem.out.println(\"Error at add Test Dao method: \" + e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn onlineTest;\r\n\t}", "@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "@Test\r\n\tpublic void saveGame() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: saveGame \r\n\t\tGame game = new tsw.domain.Game();\r\n\t\tTswacct tswAcct = null;\r\n\t\tservice.saveGame(tswAcct, game, null);\r\n\t}", "@Test\n public void testAddOrder() {\n\n System.out.println(\"addOrder\");\n OrderOperations instance = new OrderOperations();\n int orderNumber = 1;\n String date = \"03251970\";\n String customerName = \"Barack\";\n String state = \"MI\";\n String productType = \"Wood\";\n double area = 700;\n ApplicationContext ctx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n DAOInterface testInterface = (DAOInterface) ctx.getBean(\"testMode\");\n String productInfo, taxes;\n try {\n productInfo = testInterface.readFromDisk(\"productType.txt\");\n } catch (FileNotFoundException e) {\n productInfo = \"\";\n }\n\n try {\n taxes = testInterface.readFromDisk(\"taxes.txt\");\n } catch (FileNotFoundException e) {\n taxes = \"\";\n }\n instance.addOrder(customerName, date, state, productType, area, taxes, productInfo);\n assertEquals(instance.getOrderMap().containsKey(date), true);\n assertEquals(instance.getOrderMap().get(date).get(orderNumber).getCustomerName(), \"Barack\");\n\n }", "@Override\r\n\tpublic void setRound(int round) {\n\t\tthis.round = \"Round: \"+round;\r\n\t\tupdate();\r\n\t}", "public Round getRound(){\n return mRound;\n }", "public void insertReservation(TestDto testDto) throws Exception;", "@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(result, expResult);\n }", "@Test\r\n public void testSave() {\r\n System.out.println(\"save\");\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\"+System.currentTimeMillis());\r\n object.setPlace(\"Narnia\");\r\n boolean expResult = true;\r\n boolean result = Database.save(object);\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n\t public void addANonExistingRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(\"rutatest\", \"desctest\", \"asdfas\",\"2012-02-02\", this.rafter));\r\n\t\t Assert.assertNotNull(\"it should returns not null\", test);\r\n\t\t routeFatherDAO.delete(test);\r\n\t\t \r\n\t }", "@Test\n public void addDogTest() {\n Dog dog = new Dog(\"Her\", new Date(), 2);\n DogHouse.add(new Dog(\"Jim\", new Date(), 0));\n DogHouse.add(new Dog(\"Him\", new Date(), 1));\n Integer expected = DogHouse.getNumberOfDogs() + 1;\n DogHouse.add(dog);\n\n Assert.assertEquals(expected, DogHouse.getNumberOfDogs());\n }", "private void setRound(ChesspairingRound round) {\n\t\tint rNumber = round.getRoundNumber();\n\t\tif (rNumber < 1) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tif (rounds.size() >= rNumber) {\n\t\t\trounds.remove(rNumber - 1);\n\t\t}\n\t\trounds.add(rNumber - 1, round);\n\t}", "@Test\n public void addRecipe_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n\n // Check all recipe fields are accurate\n assertEquals(\"addRecipe - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"addRecipe - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"addRecipe - Correct prep_time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"addRecipe - Correct total_time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"addRecipe - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"addRecipe - Correct Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"addRecipe - Correct Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"addRecipe - Correct Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"addRecipe - Correct First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"addRecipe - Correct First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"addRecipe - Correct Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"addRecipe - Correct Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }", "@Test\r\n\tpublic void testAdd() {\n\t\tint num1=10;int num2=20;\r\n\t\t\r\n\t\t//Test here:\r\n\t\t//assertEquals(30, ClientMain.add(num1,num2));\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void testInsert() {\n int resultInt = disciplineDao.insert(disciplineTest);\n // Je pense à le suppr si l'insert à fonctionné\n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n disciplineDao.delete(disciplineTest);\n }\n assertTrue(resultInt > 0);\n }", "@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }", "@Test\n public void addStationUsesStationDaoToAddStationWithPassedInZone()\n {\n StationDao mockStationDao = mock(StationDao.class);\n LundergroundFacade facade = new LundergroundFacade();\n facade.setStationDao(mockStationDao);\n ArgumentCaptor<Station> args = ArgumentCaptor.forClass(Station.class);\n\n facade.addStation(SOME_NAME, SOME_ZONE);\n\n verify(mockStationDao).addStation(args.capture());\n assertThat(args.getValue()\n .getZone(), equalTo(SOME_ZONE));\n }", "@Test\n public void addRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertNotEquals(\"addRecipe - Returns True\", -1, returned);\n }", "public int calculate(java.util.List<Round> rounds, int index, Round round);", "@Test\n public void addTimeTest() {\n // TODO: test addTime\n }", "@Test\n public void testSave() throws Exception {\n System.out.println(\"save\");\n Item item = new Item(1L, new Category(\"name\", \"code\", \"description\"), \n new Shop(new Date(), \"12345\", \"Pepe perez\", \"Tienda\", \"Nit\", \"Natural\"), new Date(), \"name\", 20.0);\n \n \n// Item result = itemDAO.save(item);\n// Assert.assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void populatedDB() throws URISyntaxException{\n\t\tString pass;\n\t\t LoginController controller = new LoginController();\n\t\t \n\t\tpass = controller.gimmeSalt(\"PASSWORD\");\n pass = controller.hashBrowns(pass);\n\t\tdb.insertUser(\"TESTER\", pass, \"EMAIL\",666);\n\t\t\n\t\tdb.insertBusiness(\"Test1\",\"Somewhere\",7);\n\t\tdb.insertBusiness(\"Test2\",\"Somewhere\",8);\n\t\tdb.insertBusiness(\"Test3\",\"Somewhere\",9);\n\t\tlong start=12418*1000*60;\n\t\tlong end=912518*1000*60;\n\t\tdb.insertEvent(\"t1\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",1231);\n\t\t start=124118*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t2\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",674754);\n\t\t start=412418*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t3\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",241254);\n\t\tdb.insertEvent(\"t4\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",5432);\n\t\t start=1924218*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t5\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",12);\n\t\t start=124318*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t6\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",1241);\n\t\t\n\t\tdb.insertRelation(\"TESTER\",\"Test1\");\n\t\tdb.insertRelation( \"TESTER\",\"Test2\" );\n\t\tdb.insertRelation(\"TESTER\",\"Test3\");\n\t}", "@Test\n void insertSuccess() {\n String name = \"Testing a new event\";\n LocalDate date = LocalDate.parse(\"2020-05-23\");\n LocalTime startTime = LocalTime.parse(\"11:30\");\n LocalTime endTime = LocalTime.parse(\"13:45\");\n String notes = \"Here are some new notes for my new event.\";\n GenericDao userDao = new GenericDao(User.class);\n User user = (User)userDao.getById(1);\n\n Event newEvent = new Event(name, date, startTime, endTime, notes, user);\n int id = genericDao.insert(newEvent);\n assertNotEquals(0,id);\n Event insertedEvent = (Event)genericDao.getById(id);\n assertEquals(newEvent, insertedEvent);\n }", "public interface RoundImgDao {\n public int insertRoundImg(RoundImg roundImg);\n public int updateRoundImg(RoundImg roundImg);\n public RoundImg selectRoundImg(String imgId);\n public List<RoundImg> selectRoundImgs(Page page);\n public Integer selectRow();\n}", "public Round(ArrayList<Move> niceMoves, int roundNo) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = roundNo;\n\t}", "@Test\n\tvoid addReportDataToDBTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tboolean condition = false;\n\t\tdate = new Date(120, 4, 1);\n\t\texpected = \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 2 5\";\n\n\t\tString[] str = expected.split(\" \");\n\n\t\tif (ReportsController.CheckReportExistInDB(reportType, date, parkName))\n\t\t\tassertTrue(condition);\n\n\t\tReportsController.addReportToDB(reportType, date, new ArrayList<>(Arrays.asList(str)), parkName);\n\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}", "@Test\n public void startGameSuccess() throws PersistenceException {\n InMemoryDao successDao = new InMemoryDao();\n GuessService service = new GuessService(successDao);\n \n Game newGame = service.startGame();\n Assert.assertNotNull(newGame);\n \n// int gameID = newGame.getGameKeyID();\n// List<Game> allGames = successDao.getAllGames();\n// Game matchedGame = null;\n// \n// for(Game toCheck : allGames){\n// if(toCheck.getGameKeyID() == gameID){\n// matchedGame = toCheck;\n// } \n// }\n// Assert.assertNotNull(matchedGame);\n }", "@Test\n public void editIngredient_ReturnsTrue(){\n int returned = testDatabase.getIngredient(\"egg\");\n testDatabase.deleteIngredient(returned);\n Ingredient newIngredient = new Ingredient(ingredientID, \"egg\");\n assertEquals(\"editIngredient - Returns True\", true, testDatabase.editIngredient(newIngredient));\n }", "@Test\n public void test0(){\n when (mockDie1.getValue()).thenReturn(DiceValue.CLUB);\n when (mockDie2.getValue()).thenReturn(DiceValue.ANCHOR);\n when (mockDie3.getValue()).thenReturn(DiceValue.ANCHOR);\n\n //player to test on\n realPlayer = new Player(\"Bruce\", 100);\n\n //game to test on\n game = new Game(mockDie1, mockDie2, mockDie3);\n game.playRound(realPlayer,DiceValue.ANCHOR,0);\n\n System.out.println(\"players Balance = \" + realPlayer.getBalance());\n Assert.assertTrue(realPlayer.getBalance() == 100);\n\n //Confirmed nothing bad happens, works as normal without issue, better left alone...\n }", "@Test\n public void testInserts() throws ConnectionException {\n //adding test ProviderEntry to database\n ProviderEntry pe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n ProviderEntry ppe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n assertEquals(pe, ppe); // Passes if insert succeeded\n \n \n //adding test RouteEntry to database\n RouteEntry re = new RouteEntry();\n re.setName(\"test\");\n re.setDescription(\"test\");\n MariaDbConnectorTest.instance.insert(re);\n RouteEntry rre = MariaDbConnectorTest.instance.findRouteEntryByName(\"test\");\n assertEquals(re, rre); // Passes if insert has succeeded\n \n //adding test DataEntry to database\n int traveltime = 1234569;\n DataEntry de = new DataEntry(traveltime, rre, ppe);\n MariaDbConnectorTest.instance.insert(de);\n System.out.println(ppe.getId());\n System.out.println(rre.getId());\n System.out.println(de.getTimestamp());\n DataEntry dde = MariaDbConnectorTest.instance.findDataEntryByID(ppe.getId(), rre.getId(), de.getTimestamp());\n //assertEquals(de, dde); // Passes if insert has succeeded\n \n // Removing all added testdata from database. Removing route & providers suffices\n MariaDbConnectorTest.instance.delete(ppe);\n MariaDbConnectorTest.instance.delete(rre);\n \n // Check if the provider & route objects are removed from the database\n RouteEntry rrre = MariaDbConnectorTest.instance.findRouteEntryByID(rre.getId());\n assertNull(rrre); // Passes if the test RouteEntry object does not exist anymore in the database\n \n ProviderEntry pppe = MariaDbConnectorTest.instance.findProviderEntryByID(ppe.getId());\n assertNull(pppe);\n \n \n \n \n }", "@Test\n public void createNeighbourWithSuccess() {\n Neighbour newNeighbour = new Neighbour(13, \"Toto\", \"https://i.pravatar.cc/150?u=a042581f4e29026704d\", \"Saint-Pierre-du-Mont ; 5km\",\n \"+33 6 00 00 00 00 \", \"Bonjour !Je souhaiterais faire de la marche nordique...\");\n //when: I add the newNeighbour to the neighbourList\n service.addNeighbour(newNeighbour);\n List<Neighbour> neighbours = service.getNeighbours();\n assertTrue(neighbours.contains(newNeighbour));\n }", "@org.junit.Test\r\n public void testInsertReview1() throws Exception {\r\n System.out.println(\"insertReview1\");\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n Review result = service.insertReview(review);\r\n assertEquals(review, result);\r\n }", "@Test\n public void addIngredient_ReturnsID(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"addIngredients - Returns True\",-1, returned);\n }", "public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}", "@Test\n\tpublic void testInsert(){\n\t\tUser u = new User();\n\t\tu.setFirst(\"ttest\");\n\t\tu.setLast(\"ttest2\");\n\t\tu.setUsername(\"testusername\");\n\t\tu.setPassword(\"password\");\n\t\t//u.getSalt();\n\t\tu.setUserWins(1);\n\t\tu.setUserLosses(3);\n\t\tu.setUserRecord(0.25);\n\t\t\n\t\twhen(udaoMock.insert(u)).thenReturn(u);\n\t\tassertEquals(u, uSerMock.insertUser(u));\n\n\t}", "@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }", "public void createAllRoundMatches(Tournament tournament, Round newRound) {\r\n\t\tMatch match;\r\n\t\twhile ((match = createMatch(tournament, newRound)) != null) {\r\n\t\t\tnewRound.getMatches().add(match);\r\n\t\t}\r\n\t}", "@Test\n public void addRecipeIngredient_ReturnsID(){\n int returned = testDatabase.addRecipeIngredient(recipeIngredient);\n assertNotEquals(\"addRecipeIngredient - Returns True\", -1, returned);\n }", "@PostMapping(\"/startRound/{gameId}/{UID}\")\n public Round startARound() {\n return new Round();\n }", "@Test\r\npublic void unicoNumero(){\r\n try {\r\n assertEquals(Calculadora.add(\"1\"), 1);\r\n assertEquals(Calculadora.add(\"5\"), 5);\r\n assertEquals(Calculadora.add(\"9\"), 9);\r\n } catch (Exception ex) {\r\n fail(\"Error probando la calculadora con un único número\");\r\n }\r\n}", "@Test\r\n\t public void addANullRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(null, null, null, null, null));\r\n\t\t Assert.assertNull(\"it should returns null\", test);\r\n\t }", "@Test\n public void insertOne() throws Exception {\n\n }", "@Test\r\n public void testSave() throws SQLException{\r\n System.out.println(\"save\");\r\n //when(c.prepareStatement(any(String.class))).thenReturn(stmt);\r\n //mockStatic(DriverManager.class);\r\n //expect(DriverManager.getConnection(\"jdbc:mysql://10.200.64.182:3306/testdb\", \"jacplus\", \"jac567\"))\r\n // .andReturn(c);\r\n //expect(DriverManager.getConnection(null))\r\n // .andReturn(null);\r\n //replay(DriverManager.class);\r\n Title t = new Title();\r\n t.setIsbn(\"888888888888888\");\r\n t.setTitle(\"kkkkkk\");\r\n t.setAuthor(\"aaaa\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.save(t);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void addStationUsesStationDaoToAddStationWithPassedInName()\n {\n StationDao mockStationDao = mock(StationDao.class);\n LundergroundFacade facade = new LundergroundFacade();\n facade.setStationDao(mockStationDao);\n ArgumentCaptor<Station> args = ArgumentCaptor.forClass(Station.class);\n\n facade.addStation(SOME_NAME, SOME_ZONE);\n\n verify(mockStationDao).addStation(args.capture());\n assertThat(args.getValue()\n .getName(), equalTo(SOME_NAME));\n }", "private void nextRound() {\n\t\n\t\t\n\t\tcfight++;\n\t\tif(cfight>=maxround)\n\t\t{\n\t\tcfight=0;\n\t\t\n\t\tround++;\n\t\t\tmaxround/=2;\n\t\t}\n\t\t\n\tif(round<4)\n\t{\n\tcontrollPCRound();\n\t}\n\telse\n\t{\n\t\tint sp=0;\n\t\tint round=0;\n\t\tfor(int i=0; i<fighter.length; i++)\n\t\t{\n\t\t\tif(spieler[i]>0)\n\t\t\t{\n\t\t\t\tsp++;\n\t\t\t\tif(fround[i]>round)\n\t\t\t\t{\n\t\t\t\tround=fround[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\tif(geld==false)\n\t{\n\t\tgeld=true;\n\t\tif(sp==1)\n\t\t{\n\t\tZeniScreen.addZenis(round*3500);\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint w=round*4000-500*sp;\n\t\t\tif(w<1)\n\t\t\t{\n\t\t\t\tw=100;\n\t\t\t}\n\t\t\tZeniScreen.addZenis(w);\t\n\t\t}\n\t}\n\t}\n\t\n\t\n\t}", "@Test\n void add() {\n List<User> userList = Arrays.asList(\n new User(1L, \"star\", 20, \"123456\"),\n new User(2L, \"green\", 21, \"123456\"),\n new User(3L, \"red\", 22, \"123456\"),\n new User(4L, \"blue\", 23, \"123456\"),\n new User(5L, \"yellow\", 24, \"123456\"),\n new User(6L, \"black\", 26, \"123456\")\n );\n userRepository.saveAll(userList);\n }" ]
[ "0.7024352", "0.7021484", "0.6236615", "0.61518025", "0.59098315", "0.58385324", "0.5824404", "0.5820099", "0.5817672", "0.57993233", "0.57833385", "0.5768384", "0.56602067", "0.565512", "0.56199825", "0.5542027", "0.55402684", "0.5531375", "0.55293405", "0.5526006", "0.552506", "0.5514695", "0.55035454", "0.54888105", "0.5485847", "0.5467991", "0.54282975", "0.5414122", "0.5408247", "0.5401043", "0.54001033", "0.53892094", "0.53860706", "0.53792673", "0.5376582", "0.5364479", "0.53513354", "0.5328798", "0.53249323", "0.53211844", "0.5317397", "0.5302741", "0.5294182", "0.5286498", "0.5282758", "0.5273989", "0.5272671", "0.52658206", "0.5264421", "0.5263758", "0.52634066", "0.5260877", "0.5255288", "0.52535033", "0.5245844", "0.5231247", "0.52308756", "0.5225134", "0.52179253", "0.52134126", "0.5206045", "0.51955366", "0.51930285", "0.519267", "0.51913553", "0.51894814", "0.51837426", "0.5176753", "0.5163651", "0.51585215", "0.51492727", "0.51478446", "0.5145625", "0.5138796", "0.5136763", "0.5131087", "0.5130309", "0.51205844", "0.51177", "0.5117485", "0.51163113", "0.51149684", "0.51141423", "0.51094747", "0.51090854", "0.5105861", "0.5104921", "0.5100975", "0.509668", "0.50953484", "0.50945896", "0.5092103", "0.50904524", "0.5083618", "0.5080479", "0.507974", "0.50778127", "0.50701547", "0.5066235", "0.50575703" ]
0.77747226
0
Test of getRoundsByGameID method, of class RoundDaoDBImpl.
@Test public void testGetRoundsByGameID() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAddGetAllRoundsByGameId() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round testRound2 = new Round();\n testRound2.setGameId(testGame.getGameId());\n testRound2.setUserGuess(\"4567\");\n testRound2.setTime(LocalDateTime.now());\n testRound2.setResult(\"RESULT\");\n testRound2 = roundDao.addRound(testRound2);\n \n List<Round> rounds = roundDao.getAllRoundsByGameId(testGame.getGameId());\n \n assertEquals(2, rounds.size());\n // assertNotNull(testRound1 = roundDao.getRoundById(testRound1.getRoundId()));\n //assertNotNull(testRound2 = roundDao.getRoundById(testRound2.getRoundId()));\n\n assertTrue(rounds.contains(testRound1));\n assertTrue(rounds.contains(testRound2));\n }", "@Test\n public void testGetRoundById() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round roundBackFromDao = roundDao.getRoundById(testRound1.getRoundId());\n \n assertEquals(testRound1, roundBackFromDao);\n }", "public int getRoundNum(){\n return gameRounds;\n }", "@Test\n public void testAddRound() {\n Game g = new Game();\n g.setGameId(1);\n g.setGameStatus(true);\n g.setGameKey(1234);\n gameDao.addGame(g);\n \n Round round = new Round();\n round.setGuess(1234);\n round.setGuessTime(LocalDateTime.now());\n round.setGuessResult(\"e0 : p0\");\n round.setGameId(g.getGameId());\n roundDao.addRound(round);\n \n Round DaoRound=roundDao.addRound(round);\n \n \n assertEquals(round, DaoRound);\n \n \n }", "public void loadRounds ()\n {\n for (Integer roundId : selectedRounds) {\n log.info(\"Loading Round \" + roundId);\n }\n log.info(\"End of list of rounds that are loaded\");\n\n Scheduler scheduler = Scheduler.getScheduler();\n scheduler.loadRounds(selectedRounds);\n }", "public void setRoundNum(int roundNum){\n gameRounds = roundNum;\n }", "@Query(\"SELECT * FROM Round WHERE round_id= :roundId\")\n LiveData<Round> getByRoundId(long roundId);", "@Test\n public void testWinLossRatio(){\n float wins = 0;\n float losses = 0;\n\n realDie1 = new Dice();\n realDie2 = new Dice();\n realDie3 = new Dice();\n\n game = new Game(realDie1, realDie2, realDie3);\n\n when (mockPlayer.getBalance()).thenReturn(100);\n\n int currentGameWins = 0;\n\n for (int i = 0; i < 10000; i++) {\n currentGameWins = game.playRound(mockPlayer, DiceValue.ANCHOR, 10);\n\n if (currentGameWins == 0) {\n losses ++;\n } else {\n wins ++;\n }\n\n }\n System.out.println(\"Wins = \" + wins + \" Losses = \" + losses);\n float ratio = wins/(losses + wins);\n System.out.println(\"Win ratio = \" + ratio);\n }", "@Test\n public void testGameProcess() {\n // set test player data\n mTournament.setPlayerCollection(getTestPlayersData());\n\n int roundNumber = mTournament.calculateRoundsNumber(mTournament.getPlayersCount());\n for (int i = 0; i < roundNumber; ++i) {\n Round round = mTournament.createNewRound();\n assertTrue(\"State of new round must be CREATED\", round.getState() == State.CREATED);\n\n // tests can't create new round because not all rounds are completed\n Round falseRound = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, falseRound);\n\n round.startRound();\n assertTrue(\"State of starting round must be RUNNING\", round.getState() == State.RUNNING);\n\n randomiseResults(round.getMatches());\n round.endRound();\n assertTrue(\"State of ending round must be COMPLETED\", round.getState() == State.COMPLETED);\n\n // tests that ended round can't be started again\n round.startRound();\n assertTrue(\"State of ended round must be COMPLETED\", round.getState() == State.COMPLETED);\n }\n // tests can't create one more round because game is over at this point\n Round round = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, round);\n\n }", "@Test\n public void startGameSuccess() throws PersistenceException {\n InMemoryDao successDao = new InMemoryDao();\n GuessService service = new GuessService(successDao);\n \n Game newGame = service.startGame();\n Assert.assertNotNull(newGame);\n \n// int gameID = newGame.getGameKeyID();\n// List<Game> allGames = successDao.getAllGames();\n// Game matchedGame = null;\n// \n// for(Game toCheck : allGames){\n// if(toCheck.getGameKeyID() == gameID){\n// matchedGame = toCheck;\n// } \n// }\n// Assert.assertNotNull(matchedGame);\n }", "@Test\n public void shouldCreateNewRoundWithStatePlayingWhenPreviousRoundIsOver()\n throws RPSException, InvalidOperationException {\n GameSession gameSession = createGameSessionForTest();\n\n Map<String, GameSession> gameSessionMap = new HashMap<>(1);\n gameSessionMap.put(gameSession.getInviteCode(), gameSession);\n when(gameSessionService.sessions()).thenReturn(gameSessionMap);\n when(playerService.changePlayerState(gameSession.getFirstPlayer().getName(), State.PLAYING))\n .thenReturn(gameSession.getFirstPlayer());\n when(playerService.changePlayerState(gameSession.getSecondPlayer().getName(), State.PLAYING))\n .thenReturn(gameSession.getSecondPlayer());\n\n PlayRequest playRequest1 = new PlayRequest(gameSession.getFirstPlayer().getName(),\n gameSession.getInviteCode(),\n \"PAPER\");\n gameplayService.play(playRequest1);\n PlayRequest playRequest2 = new PlayRequest(gameSession.getSecondPlayer().getName(),\n gameSession.getInviteCode(),\n \"SCISSORS\");\n gameplayService.play(playRequest2);\n assertThat(gameSession.rounds().size(), is(1));\n assertThat(gameSession.rounds().get(0).getState(), is(OVER));\n // When a third Turn is played on the GameSession\n PlayRequest playRequest3 = new PlayRequest(gameSession.getSecondPlayer().getName(),\n gameSession.getInviteCode(),\n \"ROCK\");\n gameplayService.play(playRequest3);\n // Then it should create new round\n assertThat(gameSession.rounds().size(), is(2));\n assertThat(gameSession.latestRound().getState(), is(PLAYING));\n // And Latest Round should contain the latest turn played\n assertThat(gameSession.latestRound().latestTurn().getPlayer(), is(gameSession.getSecondPlayer()));\n assertThat(gameSession.latestRound().latestTurn().getMove(), is(ROCK));\n }", "public abstract Game getGame(int game_id) throws SQLException;", "public PaxosRound getRound(int a_round)\n {\n PaxosRound result = (PaxosRound) m_rounds.get(new Integer(a_round));\n return result;\n }", "public void load(){\n gameRounds = 0;\n mRound = new Round(players);\n mRound.loadRound();\n }", "@Test\n public void test0(){\n when (mockDie1.getValue()).thenReturn(DiceValue.CLUB);\n when (mockDie2.getValue()).thenReturn(DiceValue.ANCHOR);\n when (mockDie3.getValue()).thenReturn(DiceValue.ANCHOR);\n\n //player to test on\n realPlayer = new Player(\"Bruce\", 100);\n\n //game to test on\n game = new Game(mockDie1, mockDie2, mockDie3);\n game.playRound(realPlayer,DiceValue.ANCHOR,0);\n\n System.out.println(\"players Balance = \" + realPlayer.getBalance());\n Assert.assertTrue(realPlayer.getBalance() == 100);\n\n //Confirmed nothing bad happens, works as normal without issue, better left alone...\n }", "@Test\n public void testBettingLimit(){\n when (mockDie1.getValue()).thenReturn(DiceValue.CLUB);\n when (mockDie2.getValue()).thenReturn(DiceValue.ANCHOR);\n when (mockDie3.getValue()).thenReturn(DiceValue.CLUB);\n\n game = new Game(mockDie1, mockDie2, mockDie3);\n\n realPlayer = new Player(\"Bort\", 20);\n realPlayer.setLimit(10);\n\n game.playRound(realPlayer,DiceValue.CROWN,10);\n\n Assert.assertTrue(realPlayer.getBalance() == 10);\n\n }", "@Test\n\tpublic void getGameTestGameFound() {\n\t\tGame expectedGame = new Game();\n\t\tGame game = gameRepository.createGame(expectedGame);\n\n\t\texpectedGame.setGameId(game.getGameId());\n\n\t\tassertEquals(expectedGame, game);\n\n\t\t// Double check it is persisted by getting the game\n\t\tGame retrievedGame = gameRepository.getGame(game.getGameId());\n\t\tassertEquals(retrievedGame, game);\n\n\t}", "public int getRounds() {\n\n\t\treturn rounds;\n\t}", "public void playRound() {\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.setActivePlayer(winningPlayer) == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\ttheModel.displayTopCard();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\t\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\t\t\t\r\n\t\t\t\t//System.out.println(\"this should be the human having won round\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcheckIfHumanPlayerInGame();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round: \" + RoundID);\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\r\n\t\t\t\t//System.out.println(\"this should be the ai \" + winningPlayer.getName() + \"who has won the last round\");\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Test\n public void shouldCreateARoundWhenATurnIsPlayedForTheFirstTimeInASession()\n throws RPSException, InvalidOperationException {\n GameSession gameSession = createGameSessionForTest();\n Map<String, GameSession> gameSessionMap = new HashMap<>(1);\n gameSessionMap.put(gameSession.getInviteCode(), gameSession);\n when(gameSessionService.sessions()).thenReturn(gameSessionMap);\n playRequest = new PlayRequest(gameSession.getFirstPlayer().getName(),\n gameSession.getInviteCode(),\n \"PAPER\");\n when(playerService.changePlayerState(gameSession.getFirstPlayer().getName(), State.PLAYING))\n .thenReturn(gameSession.getFirstPlayer());\n // When A turn is played on the GameSession for the first time\n gameplayService.play(playRequest);\n // Then a new Round with state PLAYING Should be created\n assertThat(gameSession.rounds().size(), is(equalTo(1)));\n assertThat(gameSession.rounds().get(0).getState(), is(PLAYING));\n }", "public static int numRounds() {\n\t\treturn numRounds;\n\t}", "public void play(){\n\n gameRounds++;\n mRound = new Round(players);\n mRound.beginRound();\n\n }", "@Test\n public void testCalculateRoundNumber() {\n // key - player size, value - expected value\n Map<Integer, Integer> roundNumDependsOnPlayerNum = new HashMap<>();\n roundNumDependsOnPlayerNum.put(0, 0);\n roundNumDependsOnPlayerNum.put(1, 0);\n roundNumDependsOnPlayerNum.put(2, 1);\n roundNumDependsOnPlayerNum.put(3, 3);\n roundNumDependsOnPlayerNum.put(7, 3);\n roundNumDependsOnPlayerNum.put(8, 4);\n roundNumDependsOnPlayerNum.put(20, 4);\n roundNumDependsOnPlayerNum.put(21, 5);\n for(Map.Entry<Integer, Integer> entry : roundNumDependsOnPlayerNum.entrySet()) {\n final int testData = entry.getKey();\n final int expected = entry.getValue();\n final int actual = mTournament.calculateRoundsNumber(testData);\n assertEquals(expected, actual);\n }\n// for (Iterator iterator = roundNumDependsOnPlayerNum.keySet().iterator(); iterator.hasNext(); ) {\n// final int testData = (int) iterator.next();\n// final int expected = (int) roundNumDependsOnPlayerNum.get(testData);\n// final int actual = mTournament.calculateRoundsNumber(testData);\n// assertEquals(expected, actual);\n// }\n }", "@Test\r\n\tpublic void findAllGames() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: findAllGames \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tList<Game> response = null;\r\n\t\tTswacct tswacct = null;\r\n\t\tresponse = service.findAllGames4tsw(tswacct, startResult, maxRows);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: findAllGames\r\n\t}", "@Test\n public void checkBalanceLimitChecking(){\n when (mockDie1.getValue()).thenReturn(DiceValue.CLUB);\n when (mockDie2.getValue()).thenReturn(DiceValue.ANCHOR);\n when (mockDie3.getValue()).thenReturn(DiceValue.CLUB);\n\n game = new Game(mockDie1, mockDie2, mockDie3);\n\n realPlayer = new Player(\"Bort\", 20);\n realPlayer.setLimit(10);\n game.playRound(realPlayer,DiceValue.CROWN,40);\n Assert.assertTrue(realPlayer.getBalance() == 20);\n\n }", "public ArrayList<Move> getRound(int round) {\r\n\t\tint startIndex;\r\n\t\tint endIndex;\r\n\t\t\r\n\t\tArrayList<Move> moves = new ArrayList<Move>();\r\n\t\t\r\n\t\t// Guard against negatives\r\n\t\tif (round < 0) {\r\n\t\t\tround = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif (round >= offsets.size()) {\r\n\t\t\tround = offsets.size() - 1;\r\n\t\t\tendIndex = offsets.size();\r\n\t\t} else {\r\n\t\t\tendIndex = offsets.get(round+1);\r\n\t\t}\r\n\t\t\r\n\t\tstartIndex = offsets.get(round);\r\n\t\t\r\n\t\tfor(int i = startIndex; i < endIndex; i++) {\r\n\t\t\tmoves.add(this.getResults().get(i));\r\n\t\t}\r\n\t\t\r\n\t\treturn moves;\r\n\t}", "@Test\n public void round1() {\n BowlingGame bowlinggame = new BowlingGame();\n \n bowlinggame.roll(5);\n bowlinggame.roll(3);\n assertEquals(8, bowlinggame.getScore());\n \n \n }", "public static List<Match> getRound(int roundNum) {\n\t\tList<Match> round = new ArrayList<Match>();\n\t\tint numInRound = numInRound(roundNum);\n\t\tint roundStart = numInRound - 1;\n\t\tfor (int i = 0; i < numInRound; i++)\n\t\t\tround.add(matches[roundStart + i]);\n\t\treturn round;\n\t}", "public Collection<Die> getDice(int round){\n return new ArrayList<>(dice.get(round-1));\n }", "public void setRound(int round) {\r\n this.round = round;\r\n }", "@Test\n public void testBug1TwoWins(){\n // ensure player gets 2 Anchors\n when (mockDie1.getValue()).thenReturn(DiceValue.CLUB);\n when (mockDie2.getValue()).thenReturn(DiceValue.ANCHOR);\n when (mockDie3.getValue()).thenReturn(DiceValue.ANCHOR);\n\n //player to test on\n realPlayer = new Player(\"Bruce\", 100);\n\n //game to test on\n game = new Game(mockDie1, mockDie2, mockDie3);\n game.playRound(realPlayer,DiceValue.ANCHOR,10);\n\n System.out.println(\"players Balance = \" + realPlayer.getBalance());\n Assert.assertTrue(realPlayer.getBalance() == 120); //check that the player has won $20;\n //problem player does not win $20, gets $10 instead\n }", "public static String manyRounds(int rounds) {\n\t\tString StringToJSON = \"{\\\"Rounds\\\":[\";\n\t\tfor(int i = 1; i <= rounds; i++) {\n\t\t\tPlayerBean.PLAYERTWO = 0;\n\t\t\tStringToJSON += round();\n\t\t\tif ( i < rounds) {\n\t\t\t\tStringToJSON += \",\";\n\t\t\t}\n\t\t}\n\t\tStringToJSON += \"]}\";\n\t\treturn StringToJSON;\n\t}", "@Override\n public Game readGame(Long game_id) {\n return gameDataAccess.findById(game_id).get();\n }", "public abstract void executeRound(Deck d);", "Game getGameById(long id);", "public void setNumberRounds(int numberRounds) {\n this.numberRounds = numberRounds;\n }", "abstract GameRound setupRound();", "public Round getRound(){\n return mRound;\n }", "public int getRoundNumber() {\n return roundNumber;\n }", "private ChesspairingRound getRound(int roundNumber) {\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tfor (ChesspairingRound round : rounds) {\n\t\t\tif (round.getRoundNumber() == roundNumber) {\n\t\t\t\treturn round;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalStateException(\n\t\t\t\t\"Tournament in inconsistent state! Not able to find roundNumber = \" + roundNumber);\n\t}", "public int getCurrentGameRound(){\n\t\treturn currentGameRound;\n\t}", "void endOfRound(int roundsPlayed, int playerAScore, int playerBScore) throws IOException;", "public void handleNewAuctionRound(int roundNumber, int amount, long price);", "public void finishSubRound(){\n\n\t\t/* sorts the cards on in the table pool in a decsending order */\n List<PlayerCardArray> sortedTableHand =\n\t\t\t\tgameLogic.getTableHand().sortedTableHand(gameLogic.getTrumpCard().getSuit(),\n gameLogic.getLeadSuitCard().getSuit());\n\n System.out.println(sortedTableHand);\n\n PlayerCardArray winner = sortedTableHand.get(0);\n\n\t\t/* Display winner of the round */\n System.out.println(\"The winner of this round is player ID: \" + winner.getPlayerId());\n gameLogic.getScoreboard().addTricksWon(round, winner.getPlayerId());\n\n\t\t/* Get the winner name */\n\t\tif (winner.getPlayerId() == 0){\n\t\t\twinnerName = lblNameA.getText();\n\t\t} else if (winner.getPlayerId() == 1){\n\t\t\twinnerName = lblNameB.getText();\n\t\t}else if (winner.getPlayerId() == 2){\n\t\t\twinnerName = lblNameC.getText();\n\t\t}else if (winner.getPlayerId() == 3){\n\t\t\twinnerName = lblNameD.getText();\n\t\t}\n\n\t\t/* displays the message dialog box informing winner of the round */\n JOptionPane.showMessageDialog(null, \"Round: \" + round + \"\\nSubround: \" + (roundCounter+1) + \"\\nWinner is: \" + winnerName);\n\n\t\t/* set Winner for player */\n for (Player p : gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n if ( p.getPlayerId() == winner.getPlayerId() ) {\n p.setTrickWinner(true);\n } else {\n p.setTrickWinner(false);\n }\n }\n\n\t\t/* updates the UI informing play how many tricks won so far */\n\t\tfor (Player p : gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n\t\t\tif (winner.getPlayerId() == 0){\n\t\t\t\troundBidsWon += 1;\n\t\t\t\tbreak;\n\t\t\t} else if (winner.getPlayerId() == 1){\n\t\t\t\troundBidsWon1 += 1;\n\t\t\t\tbreak;\n\t\t\t} else if (winner.getPlayerId() == 2){\n\t\t\t\troundBidsWon2 += 1;\n\t\t\t\tbreak;\n\t\t\t} else if (winner.getPlayerId() == 3){\n\t\t\t\troundBidsWon3 += 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* Set position for players */\n System.out.println(\"OLD PLAYER ORDER: \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers());\n if (round != 11) {\n gameLogic.setPlayerOrder(round);\n currentPlayer = gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getPlayerId();\n if (currentPlayer == 0){\n \tSystem.out.println(\"YOU ARE NOW THE FIRST PERSON TO PLAY\");\n \twaitingUser = true;\n } else {\n \twaitingUser = false;\n }\n System.out.println(\"NEW PLAYER ORDER: \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers());\n }\n\n\t\t/* Clear tableHand at end of subround */\n gameLogic.getTableHand().clearTableHand();\n\t}", "@Test\n public void getRecipeByID_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n assertEquals(\"getRecipeByID - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"getRecipeByID - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"getRecipeByID - Correct Prep Time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"getRecipeByID - Correct Total Time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"getRecipeByID - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"getRecipeByID - Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"getRecipeByID - Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"getRecipeByID - Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"getRecipeByID - First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"getRecipeByID - First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"getRecipeByID - Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"getRecipeByID - Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }", "@Test\r\n\tpublic void loadGames() {\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tSet<Game> response = null;\r\n\t\tTswacct tswacct = null;\r\n\t\tresponse = service.loadGames4tsw(tswacct);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: loadGames\r\n\t}", "public int getRoundID() {\n return rounds.get(currentRound).getRoundID();\n }", "public static int numberOfRounds() {\n System.out.print(\"Entrez le nombre de rounds de cette partie : \");\n while (true) {\n try {\n int rounds = new Scanner(System.in).nextInt();\n if (rounds > 0) return rounds;\n } catch (Exception ignored) {\n }\n System.out.println(\"Entrez un entier supérieur à 0 : \");\n }\n }", "public int calculate(java.util.List<Round> rounds, int index, Round round);", "public void playRound(){\n\t\tsetHumanThrow(humanType); \n\t\tsetCompThrow();\n\t\tSystem.out.println(\"Your Throw: \" + humanThrow.getThrowType());\n\t\tSystem.out.println(\"The Computer's Throw: \" + compThrow.getThrowType());\n\t\tRound current = new Round(humanThrow, compThrow);\n\t\tthisGame.updateScores(current);\n\t\tSystem.out.println(current.getRoundSummary());\n\t\tif(thisGame.getRoundNumber() < totalRounds){\n\t\t\tplayRound();\n\t\t}\n\t\telse{\n\t\t\tendGame();\n\t\t}\n\t}", "public Integer getRound() {\n return round;\n }", "public void playGame()\n\t{\n\t\t// Playing a new round; increase round id\n\t\troundId += 1;\n\n\t\tint diceRoll = 1 + dice.nextInt(6);\n\t\t\n\t\tif(diceRoll <= 3)\n\t\t{\n\t\t\tbranchId = 0;\n\t\t\tresult = 0;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 0\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbranchId = 1;\n\t\t\tresult = 6;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 6\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n\tpublic void testGetObjectByID() throws SQLException\n\t{\n\t\tInventoryItem nail = new Nail(\"asdf\",5,5,5.0,20);\n\t\tResultSet rs = DatabaseGateway.getObjectByID(\"Nail\", nail.id);\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}", "public void playGame(){\n int roundNumber = 0;\n gameDeck.shuffle();\n while (!isGameOver()) {\n roundNumber++;\n System.out.println(\"\\n---Round \" + roundNumber + \"---\");\n playRound();\n }\n }", "@Query(\"SELECT * FROM Round WHERE shoe_id = :shoeId ORDER BY created ASC\") //: is a placeholder for expected method\n LiveData<List<Round>> getAllByShoeId(long shoeId);", "public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }", "@Test\n public void addRecipeIngredient_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allRecipeIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n RecipeIngredient retrieved = new RecipeIngredient();\n if(allRecipeIngredients != null){\n for(int i = 0; i < allRecipeIngredients.size(); i++){\n if(allRecipeIngredients.get(i).getIngredientID() == ingredientID){\n retrieved = allRecipeIngredients.get(i);\n }\n }\n }\n assertEquals(\"addRecipeIngredient - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"addRecipeIngredient - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"addRecipeIngredient - Correct Details\", \"White Flour\", retrieved.getDetails());\n }", "public int getRound() {\n return round;\n }", "public int getRound()\r\n\t{\r\n\t\treturn this.round;\r\n\t}", "public static void startRunnableGames (List <Round> runningRounds)\n {\n if (runningRounds == null || runningRounds.isEmpty()) {\n log.info(\"No rounds available for runnable games\");\n return;\n }\n\n log.info(\"Looking for Runnable Games\");\n\n List<Game> games = new ArrayList<Game>();\n\n Session session = HibernateUtil.getSession();\n Transaction transaction = session.beginTransaction();\n try {\n games = GamesScheduler.getStartableGames(session, runningRounds);\n log.info(\"Check for startable games\");\n transaction.commit();\n } catch (Exception e) {\n transaction.rollback();\n e.printStackTrace();\n }\n session.close();\n\n log.info(String.format(\"Found %s game(s) ready to start\", games.size()));\n\n machinesAvailable = true;\n for (Game game: games) {\n log.info(String.format(\"Game %s will be started ...\", game.getGameId()));\n new RunGame(game).run();\n\n if (!machinesAvailable) {\n log.info(\"No free machines, stop looking for Startable Games\");\n break;\n }\n }\n }", "public static void resetDb(String round) throws Exception {\n\t\t\n\t\tPreparedStatement pst = conn.prepareStatement(\"DELETE FROM JTL_XML_RESULTS where ROUND = ?\");\n\t\tpst.setString(1, round);\n\t\tpst.execute();\n\t\tpst.close(); \n\t\tif(fetchDistinctTimeSlices(round).size() != 0) {\n\t\t\tthrow new Exception(\"Something went wrong purging the DB of JTL XML results for round [\"+round+\".]\");\n\t\t}\n\t\t\n//\t\tStatement st = conn.createStatement();\n//\t\tst.execute(\"CREATE TABLE JTL_XML_RESULTS (\" +\n//\t\t\t\t\"ID TEXT PRIMARY KEY NOT NULL, \" +\n//\t\t\t\t\"TEST_TYPE TEXT NOT NULL, \" +\n//\t\t\t\t\"ROUND TEXT NOT NULL, \" +\n//\t\t\t\t\"T TEXT NOT NULL, \" +\n//\t\t\t\t\"IT TEXT NOT NULL, \" +\n//\t\t\t\t\"LT TEXT NOT NULL, \" +\n//\t\t\t\t\"TS TEXT NOT NULL, \" +\n//\t\t\t\t\"S TEXT NOT NULL, \" +\n//\t\t\t\t\"LB TEXT NOT NULL, \" +\n//\t\t\t\t\"RM TEXT NOT NULL, \" +\n//\t\t\t\t\"TN TEXT NOT NULL, \" +\n//\t\t\t\t\"DT TEXT NOT NULL, \" +\n//\t\t\t\t\"BY TEXT NOT NULL, \" +\n//\t\t\t\t\"SC TEXT NOT NULL, \" +\n//\t\t\t\t\"EC TEXT NOT NULL, \" +\n//\t\t\t\t\"NG TEXT NOT NULL, \" +\n//\t\t\t\t\"NA TEXT NOT NULL);\");\n//\t\tst.close(); \n\t}", "public void executeRound(int round) {\n subBytes(stateMatrix);\n// System.out.println(\"after subBytes:\");\n// printMatrix(stateMatrix);\n\n ShiftRows(stateMatrix);\n// System.out.println(\"after shiftRows:\");\n// printMatrix(stateMatrix);\n\n MixColumns(stateMatrix);\n// System.out.println(\"after mixColumns:\");\n// printMatrix(stateMatrix);\n\n AddRoundKey(stateMatrix, getKeysForRound(round));\n// System.out.println(\"after addRound:\");\n// printMatrix(stateMatrix);\n }", "public Vector<String[]> startGame(int rounds){\n\t\tSystem.out.println(\"Game started!\");\n\t\t\n\t\t//signal all connected clients that game has started\n\t\tbroadCastMessage(\"@startGame\"); \n\t\t\n\t\t//initialize the game data results\n\t\tVector<String[]> resultsData = new Vector<String[]>();\n\t\t\n\t\t/*\n\t\t * the number of word challenges/rounds\n\t\t * TODO: this could be defined by the game host \n\t\t */\n\t\twhile(rounds > 0){\n\t\t\tString word = gameServer.getAword();\n\n\t\t\t//get a random word (results does not contain)\n\t\t\tword = gameServer.getAword(); //TODO reduce chances of repeated words per game\n\t\t\t\n\t\t\t//the first string in the round result is the received word from teh server\n\t\t\tString [] results = new String [clientListeners.size()+1];\n\t\t\tresults[0] = word; \n\t\t\t\n\t\t\tbroadCastMessage(word);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep(timeOut); //timer or wait for clients to reply their entries\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t/*Iterate through listeners collection and store answers in resultsMap*/\n\t\t\tfor(int i=0;i<clientListeners.size();i++){\n\t\t\t\tresults[i+1] = clientListeners.get(i).getAnswer(); //populate the collection of answers from all clients\n\t\t\t}\n\t\t\t\n\t\t\t//store result data\n\t\t\tresultsData.add(results);\n\t\t\t\n\t\t\trounds--;\n\t\t}\n\t\treturn resultsData;\n\t}", "public void setGameRound(boolean gameRound){\n this.gameRound = gameRound;\n }", "public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}", "public Items[] findWhereStockIdEquals(int stockId) throws ItemsDaoException;", "public void setRoundScore(int roundScore) {\n\t\tthis.roundScore = roundScore;\n\t}", "public static int playOneRound(String name1, int roundNumber) {\n\t\t\n\t\t//if the round number that was an input is not a number between 1 and 6\n\t\tif ((roundNumber < 1) || (roundNumber > 6)) {\n\t\t\t\n\t\t\t//the program prints an error and returns -1\n\t\t\tSystem.out.println(\"Error: invalid input\");\n\t\t\treturn -1; \n\t\t} else {\n\t\t\n\t\t//otherwise, the dice roll method is called three times and stored as an integer each time\t\n\t\tint dieOne = diceRoll(); \n\t\tint dieTwo = diceRoll();\n\t\tint dieThree = diceRoll(); \n\t\t\n\t\t//these values are used as input to get the score of the round, which is stored as an integer\n\t\tint points = getScore(dieOne, dieTwo, dieThree, roundNumber); \n\t\t\n\t\t//the program displays what the player rolled and their score\n\t\tSystem.out.println(name1 + \" rolled \" + dieOne + \" \" + dieTwo + \" \" + dieThree + \" and scored \" + points + \" points\");\t\n\t\n\t\t//the number of points the player received is returned\n\t\treturn points;\n\t\t}\n\t}", "public abstract ArrayList<String> getPlayer(int gameId) throws SQLException;", "public void logRound(int round){\n\t\tcountRounds++;\n\t\tlog += String.format(\"ROUND %d\", round);\n\t\tlineBreak();\n\t}", "@Test\n\tpublic void getGameTestGameNotFound() {\n\t\tGame game = gameRepository.getGame(9999);\n\t\tassertNull(\"Game should be returned as null if not found in the repository\", game);\n\n\t}", "@Test\n public void testDiceThrown() {\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n testDie(game.diceThrown(), 3, 4);\n game.nextTurn();\n testDie(game.diceThrown(), 3, 4);\n game.nextTurn();\n testDie(game.diceThrown(), 5, 6);\n game.nextTurn();\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n\n }", "@Test\n public void testGetAllSnacks() throws Exception {\n\n //creating a snack to test\n Snack testSnack = new Snack(\"1111\");\n testSnack.setName(\"Cookies\");\n testSnack.setPrice(new BigDecimal(\"6.99\"));\n testSnack.setQuantity(1);\n\n //adding the snack to the hashmap (inventory)\n dao.addSnack(testSnack.getSnackId(), testSnack);\n\n //the size returned should be 1\n assertEquals(1, dao.getAllSnacks().size());\n\n //removing the test snack from the hashmap\n dao.removeSnack(testSnack.getSnackId());\n }", "public interface RoundScoreCalculator {\n\n\t/**\n\t * Generic interface used to calculate final score for an specific bowling round\n\t * \n\t * @param rounds List of rounds\n\t * @param index Indicates round number in the list\n\t * @param round Bowling round\n\t * @return int Final score of the round\n\t */\n\tpublic int calculate(java.util.List<Round> rounds, int index, Round round);\n}", "@Test\n void testRoundTrack(){\n RoundTrack roundTrack=new RoundTrack();\n\n ArrayList<Die> dieList1=new ArrayList<>();\n dieList1.add(new Die(\"THREE\",\"GREEN\"));\n dieList1.add(new Die(\"TWO\",\"RED\"));\n roundTrack.putDice(0,dieList1);\n\n ArrayList<Die> dieList2=new ArrayList<>();\n dieList2.add(new Die(\"FOUR\",\"YELLOW\"));\n dieList2.add(new Die(\"ONE\",\"RED\"));\n roundTrack.putDice(1,dieList2);\n\n assertEquals(dieList1.get(0).toString(),roundTrack.getTrack().get(0).get(0).toString());\n assertEquals(dieList2.get(0).toString(),roundTrack.getTrack().get(1).get(0).toString());\n\n List<Die> trackList= roundTrack.getTrackList();\n assertEquals(trackList.size(),4);\n assertEquals(dieList1.get(0).toString(),trackList.get(0).toString());\n assertEquals(dieList2.get(0).toString(),trackList.get(2).toString());\n\n roundTrack.removeDie(2);\n List<Die> trackList2= roundTrack.getTrackList();\n assertEquals(trackList2.size(),3);\n assertEquals(dieList1.get(0).toString(),trackList2.get(0).toString());\n assertEquals(dieList2.get(0).toString(),trackList2.get(2).toString());\n assertEquals(trackList2.get(2).getShade().toInt(),1);\n }", "public void unloadRounds ()\n {\n log.info(\"Unloading Rounds\");\n\n Scheduler scheduler = Scheduler.getScheduler();\n scheduler.unloadRounds(true);\n }", "public boolean runRound() {\n gameMove();\n // return/check if gameover condiation is meet\n return isGameOver();\n }", "@Test\n\tpublic void test08FindByIdCRIL() throws SQLException {\n\t\tEntreprise entreprise = spentreprise.findById(0);\n\t\tassertThat(entreprise, is(Entreprise.CRIL));\n\t}", "public int[] getYourScore(int[] details, int round) throws RemoteException {\n return sd.getGames().get(details[0]).getRound(round).\n getPlayerScore(details[1]);\n }", "public void round(Player playerWhoseTurn, ArrayList<Player> players) {\n\n view.print(\"\");\n view.print(\"--Player \" + playerWhoseTurn.getPlayerId() + \"--\");\n view.print(\"\");\n\n // displaying decisive player's card\n view.printCard(playerWhoseTurn.showTopCard());\n view.print(\"\\n\\n\");\n\n // creating list of cards currently in game (table)\n ArrayList<Card> cardsOnTable = new ArrayList<Card>();\n\n // All players lay their cards on table\n for (Player player : players) {\n cardsOnTable.add(player.layCardOnTable());\n }\n\n // Actual round\n\n // Asking player for decision which feature to fight with\n int playerDecision;\n\n while (true) {\n\n // decisive player decides which feature to fight with\n playerDecision = view.decideWhichFeature();\n\n // possible decisions\n int[] possibleChoices = {1, 2, 3, 4};\n\n // check if player choose existing option\n if (!checkIfValueInArray(possibleChoices, playerDecision)) {\n view.print(\"No such choice! Try again!\");\n } else {\n break;\n }\n }\n\n // Dealer checks who won (there might be exequo winners!)\n ArrayList<Integer> winnersIds = dealer.getWinner(cardsOnTable, playerDecision);\n\n // if there are no exequo winners, so there is only one winner:\n if (winnersIds.size() == 1) {\n\n // display message who won\n view.print(\"\\nPlayer \" + winnersIds.get(0) + \" won the round!\");\n\n //add cards from cardsOnTable to winner's hand\n for (Card card : cardsOnTable) {\n for (Player player : players) {\n if (player.getPlayerId() == winnersIds.get(0)) {\n player.addCard(card);\n }\n }\n }\n // clear cardsOnTable\n cardsOnTable.clear();\n\n //add cards from tempCardStack (if ther are any) to winner's hand\n for (Card card : tempCardStack) {\n for (Player player : players) {\n if (player.getPlayerId() == winnersIds.get(0)) {\n player.addCard(card);\n }\n }\n }\n // clear tempCardStack\n tempCardStack.clear();\n }\n\n // when there are exequo winners:\n else if (winnersIds.size() > 1) {\n\n // Nobody gets the cards, instead cards go to temporary stack untill someone wins them\n // in the next round\n for (Card card : cardsOnTable) {\n tempCardStack.add(card);\n }\n // display who won (for example \"Players 1, 2, 3 exequo won the round\")\n view.printExequoWinners(winnersIds);\n }\n }", "private void playGame() {\n do {\n new Round(this);\n } while (!winner.isPresent());\n }", "public static void runGame() {\n Scanner read = new Scanner(System.in);\n Random generator = new Random();\n \n //get username\n String userName = getUserName(read);\n\n //get number of rounds\n int rounds = getRounds(read, userName);\n \n //play the game!\n playGame(read, generator, userName, rounds);\n }", "private void newRound(){\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\tSystem.out.println(\"PREPPING ROUND \" + round + \" SETUP. Game Logic round (should be aligned) : \" + gameLogic.getRound());\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\n\t\tSystem.out.println(\"PRINTING LEADSUIT OF NEW ROUND \" + gameLogic.getLeadSuitCard());\n\t\tgameLogic.initialiseDeck();\n\t\tgameLogic.setDealer(round);\n\t\t\n\t\tSystem.out.println(\"Players Hand (Should be empty): \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getHand());\n\t\t\n\t\tgameLogic.setPlayersHand(round);\n\t\tgameLogic.setTrumpCard();\n\t\tgameLogic.setPlayerOrder(round);\n\t\tgameLogic.getTableHand().clearTableHand();\n\n\t\twaitingUser = false;\n\t\tif (waitingUser()){\n\t\t\twaitingUser = true;\n\t\t}\n\n\t\tcurrentPlayer = gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getPlayerId();\n\n\t\tdisplayRoundUI();\n\t\tdisplayTrumpUI();\n\t\tdisplayCardUI();\n\t\tdisplayAvailableBidsUI();\n\t\tdisplayTableHandUI();\n\n\t\tSystem.out.println(\"BEGIN ROUND \" + round);\n\t\ttodoThread();\n\t}", "public void playRound(List<Player> players) {\n\n //winners ArrayList initializer\n List<Player> winners = new ArrayList<>();\n\n //When the tournament started\n start = System.currentTimeMillis();\n\n //Main loop for running rounds, loop x numberOfRounds\n for (int i = 0; i < numberOfRounds; i++) {\n //Loop for titles, if not the last iteration then roundTitle\n if (i != numberOfRounds - 1) {\n roundTitle();\n //else display finalTitle\n } else {\n finalTitle();\n }\n //winners List is passed as the players to run through the round\n winners = playMatch(players);\n players = winners;\n\n //for each loop that calls on Player object method calculateScore, this happens with each round iteration\n for (Player player : players) {\n player.calculateScore();\n }\n\n //Output for the champion\n if (i == numberOfRounds - 1) {\n lineDivider();\n //With numberOfRounds - 1, append remaining winner in the List output as Champion\n String champion = \"\\n\" + winners.get(0).printName() + \" is the champion !!\";\n //Convert string to uppercase for increased impact\n String championUpper = champion.toUpperCase();\n System.out.println(championUpper);\n lineDivider();\n System.out.println(\"******************************************************\");\n\n }\n\n\n }\n //Small method to calculate/sys out time taken to complete the tournament\n end = System.currentTimeMillis();\n timeTaken = start - end;\n System.out.println(\"\\n\\n This Tournament took\" + timeTaken + \" milliseconds to complete\");\n\n }", "public boolean uploadRocord(int draws, int winner, int rounds, int[] playerWinRounds) {\n\t\tint gameid = 1, row = 0;\n\t\tboolean state = true;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"select count(id) from tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tgameid = rs.getInt(1) + 1;\n\t\t\t} else {\n\t\t\t\tstate = false;\n\t\t\t\tSystem.err.println(\"upload is failed! because cannot generate gameid\");\n\t\t\t}\n\t\t\trow = smt.executeUpdate(\"INSERT INTO tp.gamerecord VALUES (\"+gameid+\",\"+winner+\",\"+draws+\",\"+rounds+\")\");\n\t\t\tif (row == 0)\n\t\t\t\tstate = false;\n\t\t\tfor(int i = 0; i < playerWinRounds.length; i++) {\t\n\t\t\t\trow = smt.executeUpdate(\"INSERT INTO tp.gamePlayerRecord VALUES (\"+gameid+\",\"+i+\",\"+playerWinRounds[i]+\")\");\n\t\t\t\tif (row == 0)\n\t\t\t\t\tstate = false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Upload is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn state;\n\t}", "@Test\n\tpublic void getBookingTest() {\n\n\t\tBooking outputBooking = bookingDao.getBooking(booking.getBookingId());\n\n\t\tAssert.assertEquals(2, outputBooking.getFlightId());\n\n\t}", "public CheckersGame getGameByID(Integer gameID){\n return games.get(gameID);\n }", "public interface RoundImgDao {\n public int insertRoundImg(RoundImg roundImg);\n public int updateRoundImg(RoundImg roundImg);\n public RoundImg selectRoundImg(String imgId);\n public List<RoundImg> selectRoundImgs(Page page);\n public Integer selectRow();\n}", "public void run() {\r\n\t\tGameArchive ga = GameArchive.getInstance();\r\n\t\tga.newGame();\r\n\t\t_game = ga.getCurrentGame();\r\n\t\tint startRound = 1;\r\n\t\tint endRound = (int)(1.0*cardFinder.getCardsInDeck() /_playerCollection.size());\r\n\t\tint dealer = -1;\r\n\t\tint lead = 0;\r\n\t\tint inc = 1;\r\n\t\tif(go.getGameSpeed().equals(GameSpeed.QUICK_PLAY)) {\r\n\t\t\tinc = 2;\r\n\t\t\tif(_playerCollection.size() != 4) {\r\n\t\t\t\tstartRound = 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tList<Integer> playerIds = getPlayerId();\r\n\t\tList<String> playerNames = getPlayerNames();\r\n\t\tfor (int i = 0; i < playerIds.size(); i++) {\r\n\t\t\t_game.addPlayer(playerIds.get(i), playerNames.get(i));\r\n\t\t}\r\n\t\tgameEventNotifier.notify(new NewGameEvent(playerIds,playerNames));\r\n\t\tfor (int roundId = startRound; roundId < endRound + 1; roundId = roundId + inc) {\r\n\t\t\tdealer = (dealer + 1)% _playerCollection.size();\r\n\t\t\tlead = (dealer + 1)% _playerCollection.size();\r\n\t\t\tgameEventNotifier.notify(new NewRoundEvent(roundId));\r\n\t\t\t_game.newRound(roundId);\r\n\t\t\tRound round = _game.getCurrentRound();\r\n\t\t\tCard trump = dealCards(roundId, dealer, lead);\r\n\t\t\tgameEventNotifier.notify(new NewTrumpEvent(trump));\r\n\t\t\tround.setTrump(trump);\r\n\r\n\t\t\tif(trump != null && trump.getValue().equals(Value.WIZARD)) {\r\n\t\t\t\tPlayer trumpPicker = _playerCollection.get(dealer);\r\n\t\t\t\t//_logger.info(trumpPicker.getName() + \" gets to pick trump.\");\r\n\t\t\t\ttrump = new Card(null, trumpPicker.pickTrump(), -1);\r\n\t\t\t\tgameEventNotifier.notify(new NewTrumpEvent(trump));\r\n\t\t\t\tround.setTrump(trump);\r\n\t\t\t}\r\n\t\t\tint cardsDealt = roundId;\r\n\t\t\tBid bid = bid(trump, lead, cardsDealt, round);\r\n\t\t\tif(go.getBidType().equals(BidType.HIDDEN)) {\r\n\t\t\t\tfor(IndividualBid individualBid :bid.getBids()) {\r\n\t\t\t\t\tgameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));\r\n\t\t\t\t\tround.setBid(individualBid.getPlayer().getId(), individualBid.getBid());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tRoundSummary roundSummary = new RoundSummary();\r\n\t\t\tfor (int i = 0; i < roundId; i++) {\r\n\t\t\t\tTrickTracker trickTracker = playTrick(trump, lead, round);\r\n\t\t\t\troundSummary.addTrickTracker(trickTracker);\r\n\t\t\t\tint playerIdWhoWon = trickTracker.winningPlay().getPlayerId();\r\n\t\t\t\tlead = findPlayerIndex(playerIdWhoWon);\r\n\t\t\t}\r\n\t\t\tif(go.getBidType().equals(BidType.SECRET)) {\r\n\t\t\t\tfor(IndividualBid individualBid :bid.getBids()) {\r\n\t\t\t\t\tgameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));\r\n\t\t\t\t\tround.setBid(individualBid.getPlayer().getId(), individualBid.getBid());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tscoreRound(roundSummary, bid, _game);\r\n\t\t\tthis.overallScores.displayScore();\r\n\t\t}\r\n\t\tCollection<Integer> winningPlayerIds = calcWinningIds();\r\n\t\tCollection<String> winningPlayers = getPlayerNames(winningPlayerIds);\r\n\t\tfor(int winningIds:winningPlayerIds) {\r\n\t\t\t_game.addWinner(winningIds);\r\n\t\t}\r\n\t\tgameEventNotifier.notify(new GameOverEvent(winningPlayerIds, winningPlayers));\r\n\t}", "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "public PaxosRound createRound(int a_round)\n {\n PaxosRound result = new PaxosRound(this, a_round, getNextRoundLeader(a_round));\n m_rounds.put(new Integer(a_round), result);\n return result;\n }", "public int calculateRounds(int numberOfPlayers) {\n //logarithm to find how many 2s to multiply to get numberOfPlayers 32 players (2 x 2 x 2 x 2 x 2 = 32) = 5 Rounds\n return (int) (Math.log(numberOfPlayers) / Math.log(2));\n }", "@Test\n public void testRoundsDown() throws Exception {\n gm.setPlayerInfo(clientPlayer2);\n gm.setThisPlayerIndex(clientPlayer2.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertEquals(4, dc.getMaxDiscard());\n dc.increaseAmount(ResourceType.WHEAT);\n dc.increaseAmount(ResourceType.BRICK);\n dc.increaseAmount(ResourceType.BRICK);\n dc.increaseAmount(ResourceType.ORE);\n // This increase should not work\n dc.increaseAmount(ResourceType.ORE);\n assertEquals(1, getAmounts().getOfType(ResourceType.WHEAT));\n assertEquals(2, getAmounts().getOfType(ResourceType.BRICK));\n assertEquals(1, getAmounts().getOfType(ResourceType.ORE));\n }", "public abstract boolean existsGame(int game_id) throws SQLException;", "@Test\n public void getAllRecipes_RecipeInfo(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n Recipe retrieved = allRecipes.get(allRecipes.size()-1);\n //Retrieved should now contain all the same information as testRecipe\n assertEquals(\"getAllRecipes - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"getAllRecipes - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"getAllRecipes - Correct Prep Time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"getAllRecipes - Correct Total Time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"getAllRecipes - Correct Favorited\", false, retrieved.getFavorited());\n }", "public String wantPlayGame(int[][] payoffs, int roundTotal){\n\tcurRound=0;\n\tthis.roundTotal = roundTotal;\n\tprintString=getWelcomeScreen()+\"\\n\\n\";\n\tp1.setPayoffsAndTurns(payoffs[0][0],payoffs[1][0],payoffs[2][0],payoffs[3][0],roundTotal);\n\tp2.setPayoffsAndTurns(payoffs[0][1],payoffs[2][1],payoffs[1][1],payoffs[3][1],roundTotal);\n\tprintString+=\"------Player Rulesets------\\n\";\n\tprintString+=rulesNiceAndTidy(true);\n\tprintString+=rulesNiceAndTidy(false);\n\tprintString+=\"---------------------------\\n\\n\";\n\twhile (curRound<roundTotal){\n\t p1move = p1.nextMove(); //gets move for both players\n\t p2move = p2.nextMove();\n\t p1choice = (p1move==true?0:1); //gets index to assign points\n\t p2choice = (p2move==true?0:1);\n\t p1.yourReward(p1choice,p2choice); //gives them their rewaaaarrhhdd (this is a crucial Aladdin reference)\n\t p2.yourReward(p2choice,p1choice);\n\t curRound++;\t\t\t\t\t\t\t\t//increments the round\n\t p1.andSoItGoes(p1move,p2move,curRound); //updates histories and rounds of players\n\t p2.andSoItGoes(p2move,p1move,curRound);\n\t printString+=getMoveData(0)+\"\\n\\n\";\n\t}\n\tprintString+=\"\\n\\n\"+getWinner();\n\tprintDataToFile();\n\treturn getWinner();\n }", "@Test\n public void testGetGameInfo() throws Exception {\n System.out.println(\"getGameInfo\");\n int pubID = 1;\n int prodID = 2;\n String name = \"Name\";\n int age = 12;\n String desc = \"This is my description\";\n int runtime = 12;\n String genre = \"Action\";\n double price = 22.22;\n JSONObject gameJSON = new JSONObject();\n gameJSON.put(\"productID\", prodID);\n gameJSON.put(\"name\", name);\n gameJSON.put(\"price\", price);\n gameJSON.put(\"ageRating\", age);\n gameJSON.put(\"description\", desc);\n gameJSON.put(\"minimumSpecs\", \"Min specs\");\n gameJSON.put(\"genre\", genre);\n gameJSON.put(\"publisherID\", pubID);\n StoreListing result = GameStorePageInfoFactory.getGameInfo(gameJSON);\n assertEquals(prodID, result.getProductID());\n assertEquals(name, result.getName());\n }", "@Test\n public void testGetSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n\n Song result = library.getSong(songId);\n assertTrue(result.getTitle().equals(\"titre2\"));\n assertTrue(result.getAlbum().equals(\"album2\"));\n assertTrue(result.getArtist().equals(\"artiste2\"));\n assertTrue(result.getSongId().equals(\"2\"));\n\n }", "@Test\n public void shouldFindAllMatchingRoomsWithTheDaoAndReturnItToTheClient()\n\t throws Exception {\n\n\tfinal ArrayList<String> criteria = Lists.newArrayList(null, null, null,\n\t\tnull, null, null, null);\n\tfinal FindRoomCommand command = new FindRoomCommand(criteria.get(0),\n\t\tcriteria.get(1), true);\n\n\tfinal UrlyBirdRoomOfferService roomOfferService = new UrlyBirdRoomOfferService(\n\t\tdao, null, null, null);\n\n\tfinal List<UrlyBirdRoomOffer> result = Lists\n\t\t.newArrayList(validRoomOffer);\n\twhen(dao.find(criteria)).thenReturn(result);\n\n\tfinal List<RoomOffer> foundRooms = roomOfferService\n\t\t.findRoomOffer(command);\n\n\tassertEquals(result, foundRooms);\n }", "@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }" ]
[ "0.79034245", "0.75018966", "0.64947075", "0.63049597", "0.6269305", "0.6183469", "0.594477", "0.5836095", "0.58280164", "0.57475066", "0.5725244", "0.5722827", "0.57146466", "0.5663037", "0.5657274", "0.56351054", "0.5561396", "0.5559315", "0.5529638", "0.5490142", "0.54761475", "0.5461972", "0.5452205", "0.54392654", "0.5412968", "0.5411339", "0.54081637", "0.5399979", "0.53673244", "0.5362955", "0.53261983", "0.53236187", "0.5320589", "0.5307328", "0.5276756", "0.5257715", "0.5235703", "0.5233765", "0.52018815", "0.51798034", "0.51713145", "0.5143217", "0.5136904", "0.51146805", "0.5112435", "0.5103395", "0.50923944", "0.5084055", "0.5071674", "0.50625694", "0.5056736", "0.50498813", "0.50472724", "0.50439715", "0.50401825", "0.50170165", "0.5014503", "0.501275", "0.50082326", "0.5004025", "0.499198", "0.4970563", "0.49674553", "0.49634063", "0.49632716", "0.49589217", "0.4958557", "0.49519435", "0.4947543", "0.49353945", "0.49248922", "0.49102104", "0.49086526", "0.48957273", "0.48947018", "0.48931858", "0.48904634", "0.48796105", "0.48789045", "0.48788804", "0.4877991", "0.4861333", "0.48592362", "0.48579112", "0.48565134", "0.4848584", "0.48437876", "0.48398498", "0.48370072", "0.4834414", "0.4833893", "0.48253876", "0.48230278", "0.48189613", "0.4817194", "0.48103434", "0.4784183", "0.47811583", "0.47772318", "0.4776777" ]
0.77249444
1
random.nextInt gives a int in the range of 0 to areaSum and ceilingKey returns a key greater than or equal to the argument passed to it.
public int[] pick() { int key = map.ceilingKey(random.nextInt(areaSum) + 1); int[] rectangle = map.get(key); int length = rectangle[2] - rectangle[0] + 1; int breadth = rectangle[3] - rectangle[1] + 1; //length denotes the no of x coordinates we can have. //breadth denotes the no of y coordinates we can have //random.nextInt gives a random value from x1 - x2-1 which we can add to the current x and we can have a valid x . //random.nextInt gives a random value from y1 - y2-1 which we can add to the current y and we can have a valid y . int x = rectangle[0] + random.nextInt(length); int y = rectangle[1] + random.nextInt(breadth); return new int[]{x, y}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public K ceiling(K key);", "public Key ceiling(Key key)\t\t\t\t//smallest key greater than or equal to the given key\n\t{\n\t\tNode x=ceiling(root,key);\n\t\tif(x!=null)\n\t\t\treturn x.key;\n\t\telse return null;\n\t}", "public K floor(K key);", "int CalcKey(int g, int x, int n)\r\n {\r\n int rtn = 1;\r\n for(int i = 0; i < x; i++)\r\n rtn = (rtn * g) % n;\r\n return rtn;\r\n }", "@Override\r\n public K ceilingKey(final K key) {\n return null;\r\n }", "private int hashFunction(KeyType key) {\r\n // use hashCode() method to get the hashCode and take the absolute value % capacity\r\n return Math.abs(key.hashCode()) % capacity;\r\n }", "public static int ceiling(int[] a, int key) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n \n int candidate = Integer.MAX_VALUE;\n boolean happen = false;\n \n for (int i : a) {\n if (i >= key && i <= candidate) {\n candidate = i;\n happen = true;\n }\n }\n \n if (happen) {\n return candidate;\n }\n throw new IllegalArgumentException();\n }", "public Key getCeiling(Key key) {\n\n Node current = root;\n while (current != null) {\n if (current.key == key) {\n return key;\n }\n if (current.key.compareTo(key) > 0) {\n if (current.left != null && current.left.key.compareTo(key) < 0) {\n return current.key;\n } else {\n current = current.left;\n }\n } else {\n current = current.right;\n }\n }\n return null;\n }", "public static int generateRandomNumber(int topBoundary)\n\t{\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(topBoundary);\n\t}", "int arraykey(int max);", "public Key floor(Key key)\t\t\t\t//largest key less than or equal to the given key\n\t{\n\t\tNode x=floor(root,key);\n\t\tif(x!=null)\n\t\t\treturn x.key;\n\t\telse return null;\n\t}", "private int getUniqueSecretKey () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentSecretKeys =\n hashMapOfSecretKeys.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int theNum : listOfCurrentSecretKeys) {\n if (candidateNumber == theNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "public abstract Key getLargest();", "@Override\n public int getInt(String key) {\n return random.nextInt(RANDOM_INT_BOUND);\n }", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "private Integer getRandomMapKey() {\r\n\t\tList<Integer> mapKeys = new ArrayList<Integer>(this.compleQuestions.keySet());\r\n\t\tint randomIndex = (int) (Math.random() * mapKeys.size());\r\n\t\treturn mapKeys.get(randomIndex);\r\n\t}", "public int hashFunction(int key){\r\n return (int) Math.floor((constFactor*key - Math.floor(constFactor*key)) * Math.pow(2,electionTable.length));\r\n }", "private static int createSelectedKey(int bBit) {\r\n\t\tRandom random = new Random();\r\n\t\tint maxKey = (int) Math.pow(2, bBit);\r\n\t\tint randomKey = random.nextInt((maxKey - 1) + 1) + 1;\t\r\n\t\treturn randomKey;\r\n\t}", "public static int floor(int[] a, int key) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n \n int candidate = Integer.MIN_VALUE;\n boolean happen = false;\n \n for (int i : a) {\n if (i <= key && i >= candidate) {\n candidate = i;\n happen = true;\n }\n }\n \n if (happen) {\n return candidate;\n }\n throw new IllegalArgumentException();\n }", "public Area GetNextAreaRandom(Area area)\n\n {\n\n Random rand = new Random();\n\n int i = 0;\n\n switch(area.paths)\n\n {\n\n case Constants.North:\n\n i = rand.nextInt(2);\n\n if(i==0)\n\n return area.areaMap.get(Constants.North);\n\n if(i==1)\n\n return area;\n\n case Constants.South:\n\n if(i==0)\n\n return area.areaMap.get(Constants.South);\n\n if(i==1)\n\n return area;\n\n \n\n case Constants.East:\n\n if(i==0)\n\n return area.areaMap.get(Constants.East);\n\n if(i==1)\n\n return area;\n\n \n\n case Constants.West:\n\n if(i==0)\n\n return area.areaMap.get(Constants.West);\n\n if(i==1)\n\n return area;\n\n \n\n \n\n case Constants.NorthAndSouth:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area;\n\n case Constants.NorthAndEast:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 2)\n\n return area;\n\n case Constants.NorthAndWest:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 2)\n\n return area;\n\n case Constants.SouthAndEast:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area;\n\n case Constants.SouthAndWest:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area;\n\n case Constants.EastAndWest:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 2)\n\n return area;\n\n case Constants.NorthSouthAndEast:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 3)\n\n return area;\n\n case Constants.NorthSouthAndWest:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 3)\n\n return area;\n\n case Constants.NorthEastAndWest:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 3)\n\n return area;\n\n case Constants.SouthEastAndWest:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 3)\n\n return area;\n\n \n\n case Constants.NorthSouthEastAndWest:\n\n i = rand.nextInt(5);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 3)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 4)\n\n return area;\n\n }\n\n \n\n return area;\n\n \n\n \n\n }", "public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }", "public static int getRndInt(int upperBound){\n\t\tRandom randomNumber; \n\t\trandomNumber = new Random(); \n\t\tint z = randomNumber.nextInt(upperBound);\n\t\treturn z;\n\t}", "@Override\r\n public Entry<K, V> ceilingEntry(final K key) {\n return null;\r\n }", "private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}", "@Test\n public void test_ceiling_Integer_Collection3() {\n populate_i3();\n int actual = Selector.ceiling(i3, 0, new CompareIntegerAscending());\n int expected = 4;\n Assert.assertEquals(\"Did not find ceiling value\", expected, actual);\n }", "public int getRandomInt(int upper) {\n int retVal = myRandom.nextInt() % upper;\n if (retVal < 0) {\n retVal += upper;\n }\n return (retVal);\n }", "public abstract Key getSmallest();", "T getRandomKey();", "@Test\n public void randomInt() {\n HashMap<Integer, Integer> hist = new HashMap<Integer, Integer>();\n for(int i = 0; i < 300; i++){\n // we can think of random int as a coin toss\n Integer coin = test.randInt();\n Integer coinTotal = hist.get(coin);\n if (coinTotal == null){\n hist.put(coin, 1);\n } else {\n hist.put(coin, coinTotal+1);\n }\n }\n assertTrue(\"Should be more than 100 of each\",\n hist.get(0) > 100 && hist.get(1) > 100);\n System.out.println(hist);\n }", "private static int getSecretNum(int arg1) {\n Random rand = new Random();\n return rand.nextInt(UPPERBOUND)+1; //make range 1-100\n }", "public Key floor(final Key key) {\n int rank = rank(key);\n if (rank == 0) {\n return null;\n }\n if (rank < size && key.compareTo(keys[rank]) == 0) {\n return keys[rank];\n } else {\n return keys[rank - 1];\n }\n }", "@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic Entry<K, V> ceilingEntry(K key) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t */\n\t\treturn safeEntry(findIndex(key));\n\t}", "Integer getNextRandomExcluding(int exclusion);", "int getRandom(int max);", "public int calcBucket(int keyValue) {\n\t\treturn(keyValue % buckets.length);\r\n\t}", "public int getHash(int key, int i, int max);", "private int hashFunction(int hashCode) {\n int location = hashCode % capacity;\n return location;\n }", "@Test\n public void test_ceiling_Integer_Collection1() {\n populate_i1();\n int actual = Selector.ceiling(i1, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"Did not find ceiling value\", expected, actual);\n }", "private int randomInt(int lower, int upper) {\n\t\treturn (int) ((upper - lower + 1) * Math.random()) + lower;\n\t}", "private LinkedList<Entry> chooseBucket(Object key) { \t\n // hint: use key.hashCode() to calculate the key's hashCode using its built in hash function\n // then use % to choose which bucket to return.\n return buckets[key.hashCode() % buckets.length];\n }", "public static int curve(int key, int lowerBound, int upperBound) {\n\n\n double d = (lowerBound + upperBound) / 2.0;\n\n double majorAmplitude = (double) (upperBound - d) * (2.0 / 3.0);\n double minorAmplitude = (double) (upperBound - d) * (1.0 / 3.0);\n\n\n int index1 = key % passwordHashAlpha.length();\n int translator1 =\n Character.getNumericValue(passwordHashAlpha.charAt(index1));\n\n int index2 = (key * translator1) % passwordHashBeta.length();\n int translator2 =\n Character.getNumericValue(passwordHashBeta.charAt(index2));\n\n\n return (int) Math.round(\n (majorAmplitude * Math.sin(56 * (key - translator1)))\n + (minorAmplitude * Math.cos(key * (key - translator2)))\n + d);\n\n }", "public int calcBucket(int keyValue) {\n return (keyValue % buckets.length);\n }", "private Integer randomHemoglobina(){\n\t\t\tint Min = 9, Max = 23;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "private int evaluate() {\n return (int) (Math.random() * 8);\n }", "public int hashFunction(String key){\r\n return Math.abs(key.hashCode())%electionTable.length;\r\n }", "public Key min();", "public String getHighestChromKey();", "int find(K key)\n {\n return Math.abs(key.hashCode() % this.buckets.length);\n }", "private int calcIndex(K key) {\n\t\treturn Math.abs(key.hashCode() % capacity);\n\t}", "@Nullable\n protected abstract Map.Entry<K, V> onGetCeilingEntry(@Nullable final K key);", "private int hashValue(K key) {\r\n\t\treturn (Math.abs(key.hashCode()) % currentCapacity);\r\n\t}", "private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }", "private int validateKey (int key) {\n return (key < 0 || key > ALPHABET_LENGTH-1) ? 0 : key;\n }", "@Override\r\n public K floorKey(final K key) {\n return null;\r\n }", "public static void main(String[] args) {\n// System.out.println(Math.floor(12.34));/\n// System.out.println(Math.(12.34));/\n// System.out.println(Math.ceil(12.34));/\n// System.out.println(Math.ceil(12.34));/\n int start=5;\n int end=66;\n int i=start+(int)(Math.round(Math.random()*(end-start)) );\n System.out.println(i);\n }", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "private int getIndex(K key){\n int hashcode=key.hashCode();\n int index=hashcode%maxBuckets;\n return index;\n }", "public void generateKey(int min, int max) {\n double [][] key = new double[CHAR_SET_SIZE][CHAR_SET_SIZE];\n Random rand = new Random(System.currentTimeMillis());\n boolean keyGenerated = false;\n while (!keyGenerated) {\n for (int i = 0; i < key.length; i++) {\n for (int j = 0; j < key.length; j++) {\n // Generate random double between min,max\n key[i][j] = max + (max - min) * rand.nextInt();\n }\n }\n // Ensure the matrix is invertible\n Matrix m = new Matrix(key);\n if (m.det() != 0) {\n keyGenerated = true;\n this.key = key;\n }\n }\n }", "int getKey() {\n\n\n\t\tint key =0;\n\t\tdo{\n\t\t\tjokerA();\n\t\t\tjokerB();\n\t\t\ttripleCut();\n\t\t\tcountCut();\n\n\t\t\tint head = deckRear.next.cardValue;\n\n\t\t\t//if 28 change the value of it to 27\n\t\t\tif(head == 28){\n\t\t\t\thead = 27;\n\t\t\t}\n\n\t\t\tCardNode pointer= deckRear.next;\n\t\t\tint i = 1;\n\t\t\twhile(i< head){\n\t\t\t\tpointer = pointer.next;\n\t\t\t\ti++;\n\t\t\t}\n\n\n\t\t\tCardNode keyNode = pointer.next;\n\t\t\tkey = keyNode.cardValue;\n\n\n\t\t} while(key > 26);\n\n\t\t// COMPLETE THIS METHOD\n\t\t// THE FOLLOWING LINE HAS BEEN ADDED TO MAKE THE METHOD COMPILE\n\n\t\tSystem.out.println(\"key\" + key); \n\n\t\treturn key;\n\t}", "public K floor(K key) {\n if (root == null)\n return null;\n else {\n Node tmp = null;\n Node curr = root;\n while (true) {\n if (curr == null) {\n if (tmp != null)\n return tmp.key;\n return null;\n }\n int cmp = key.compareTo(curr.key);\n if (cmp == 0)\n return curr.key;\n else if (cmp < 0)\n curr = curr.left;\n else {\n tmp = curr;\n curr = curr.right;\n }\n }\n }\n }", "private int rand(int lower, int higher) {\n\t\treturn lower + (int) ((higher - lower + 1) * Math.random());\n\t\t\n\t}", "int nextInt(int origin, int bound);", "int getHeight(K key);", "int midFavoringRandom(int upperBound) {\n int runningTotal = 0;\n int rolls = 3;\n for (int i = 0; i < rolls; i++) {\n int result = random.nextInt(upperBound);\n runningTotal += result;\n }\n int mean = (int) Math.round((double) runningTotal / rolls);\n return mean;\n }", "public QuestObj floor(int key) {\n Node x = floor(root, key);\n if (x == null)\n return null;\n return new QuestObj(x.key, x.val);\n }", "public KeyArea setupKey(int iKeyArea)\n {\n KeyArea keyArea = null;\n if (iKeyArea == 0)\n {\n keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);\n keyArea.addKeyField(ID, DBConstants.ASCENDING);\n }\n if (iKeyArea == 1)\n {\n keyArea = this.makeIndex(DBConstants.SECONDARY_KEY, NAME_KEY);\n keyArea.addKeyField(NAME, DBConstants.ASCENDING);\n }\n if (keyArea == null)\n keyArea = super.setupKey(iKeyArea); \n return keyArea;\n }", "protected int myHashKey(KeyType key) {\n int hashValue;\n hashValue = key.hashCode() % mTableSize;\n if (hashValue < 0) {\n hashValue += mTableSize;\n }\n return hashValue;\n }", "private int rand(int lower, int upper) {\n return lower + (int)(Math.random() * ((upper - lower) + 1));\n }", "public void raiseKey(){\n\t\tkey = clamp(key+INCREMENT, MINKEY, MAXKEY);\n\t}", "private Integer randomBilirrubina(){\n\t\t\tint Min = 0, Max = 14;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "@Test\n public void test_ceiling_Integer_Collection2() {\n populate_i2();\n int actual = Selector.ceiling(i2, 7, new CompareIntegerDescending());\n int expected = 7;\n Assert.assertEquals(\"Did not find ceiling value\", expected, actual);\n }", "public String getMaxKey();", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }", "private static int randInt(int lower, int upper) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((upper - lower) + 1) + lower;\n\t}", "private static int eval(Board board) {\n if (board.piecesContiguous(board.turn())) {\n return Integer.MAX_VALUE;\n } else if (board.piecesContiguous(board.turn().opposite())) {\n return Integer.MIN_VALUE;\n } else {\n Random r = new Random();\n return r.nextInt();\n }\n }", "private int getUniqueAccountNumber () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentAccountNumbers =\n hashMapOfAllAccts.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int acctNum : listOfCurrentAccountNumbers) {\n if (candidateNumber == acctNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "private int getValue(int lowerBound, int upperBound) {\n int problemRange = upperBound - lowerBound + 1;\n\n return lowerBound + rng.nextInt(problemRange);\n }", "private int getIndex(K key) {\r\n int index = -1;\r\n if (key != null) {\r\n index = key.hashCode()%capacity;\r\n }\r\n if (index < 0) {\r\n index *= -1;\r\n }\r\n return index;\r\n }", "public static int getOreValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}", "public ECP getKGCRandomKey(){return R;}", "public int getRandom() {\n Set<Integer> keys = map.keySet();\n Object[] objects = keys.toArray();\n Random rand = new Random();\n int key = rand.nextInt(keys.size());\n return map.get(objects[key]);\n }", "public static Supplier<Integer> random(int lowerBoundIncl, int upperBoundIncl) {\n Validator.validateBounds(lowerBoundIncl, upperBoundIncl);\n Random random = new Random();\n\n return () -> random.nextInt(upperBoundIncl - lowerBoundIncl + 1) + lowerBoundIncl;\n }", "public String getLowestChromKey();", "@Override\n\tpublic int hashFunction(int key) {\n\t\treturn key%M;\n\t}", "public String getMinKey();", "@Override\n public int orinar() {\n\n return (int) (Math.random() * 400) + 400;\n }", "int getRandom(int limit){\n Random rand = new Random();\n int upperBound = limit;\n return rand.nextInt(upperBound) + 1;\n }", "public static int getFoodValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "@Override\n public int nextInt(int bound) {\n return super.nextInt(bound);\n }", "public static String generateHalfKey(){\n return randomChars(HALF_KEY_LENGTH);\n }", "public int getAtkAmount(){\r\n return (int) (Math.random() * (maxAtk - minAtk) + minAtk);\r\n\r\n }", "public int getMaxFloor();", "public static <T> T ceiling(Collection<T> c, T key, Comparator<T> comp) {\n \n // a is null or has a length of 0\n if (c == null || comp == null) {\n throw new IllegalArgumentException(); \n }\n \n if (c.isEmpty()) {\n throw new NoSuchElementException();\n }\n \n T ceiling = null;\n Iterator<T> itr = c.iterator();\n boolean found = false; //Tells if first possible ceiling found\n while (itr.hasNext()) {\n T temp = itr.next();\n //if haven't found first ceiling, just compare to key.\n if (!found && comp.compare(temp, key) >= 0) {\n ceiling = temp;\n found = true;\n }\n //if found first ceiling, compare to key and current ceiling value\n else if (comp.compare(temp, key) >= 0 && comp.compare(temp, ceiling) <= 0) {\n ceiling = temp;\n }\n }\n if (!found) {\n throw new NoSuchElementException();\n }\n return ceiling;\n }", "int compFunction(int code) {\r\n if (code % num_buckets < 0) {\r\n return (code % num_buckets) + num_buckets;\r\n } else {\r\n return code % num_buckets;\r\n } \r\n /*int a = 13;\r\n int b = 23;\r\n int p = 1000000 * num_buckets;\r\n while (isPrime(p) == false) { \r\n p += 1; \r\n }\r\n return ((a * code + b) % p) % num_buckets; */\r\n }", "protected int pathDrawLots(int bound)\n {\n Random r= new Random();\n int num = r.nextInt(bound);\n return num;\n\n\n }", "@Override\n public Integer pee() {\n return (int) (random() * 8);\n }", "private static int myRandom(int low, int high) {\n return (int) (Math.random() * (high + 1 - low) + low);\n }", "public int generate(int k) {\n // PUT YOUR CODE HERE\n }", "private int getRandomWithExclusion(int bound, List<Integer> exclude) {\n int random = Constants.RAND.nextInt(bound - exclude.size());\n for (int ex : exclude) {\n if (random < ex) break;\n random++;\n }\n return random;\n \n }" ]
[ "0.5943403", "0.5814456", "0.56181854", "0.5600514", "0.5478525", "0.540979", "0.5398603", "0.5384824", "0.53722227", "0.53439575", "0.5341303", "0.5263113", "0.526268", "0.52386165", "0.5206813", "0.5180169", "0.5171578", "0.5163573", "0.5107561", "0.5100204", "0.50746274", "0.5064706", "0.5058711", "0.5044616", "0.5041753", "0.5040238", "0.5024953", "0.49974272", "0.49798167", "0.49614072", "0.4958849", "0.4950434", "0.49386793", "0.4936254", "0.49232176", "0.49036488", "0.48829326", "0.48775467", "0.48705488", "0.4864472", "0.48589766", "0.4854879", "0.485324", "0.48456734", "0.48165667", "0.4802721", "0.47981936", "0.47962478", "0.47924545", "0.47878563", "0.4768561", "0.47658184", "0.4763933", "0.4760234", "0.4757641", "0.47446102", "0.47401115", "0.4739421", "0.47376955", "0.4737069", "0.47326726", "0.47166228", "0.47118023", "0.46972048", "0.46895152", "0.46824762", "0.46794835", "0.46642652", "0.4648514", "0.46457976", "0.4626673", "0.46255776", "0.46179634", "0.4599249", "0.4595782", "0.45939758", "0.4588743", "0.4586871", "0.45771983", "0.4573455", "0.45733702", "0.4572612", "0.4572311", "0.45701957", "0.4553327", "0.4552916", "0.4542479", "0.45422933", "0.4534384", "0.45314425", "0.45306313", "0.45244905", "0.45208222", "0.45056134", "0.45051542", "0.45023727", "0.4499659", "0.44790256", "0.44771388", "0.4475169" ]
0.52569884
13
acesses other methods and solves the question with step by step walkthrough
public static void solve(String question) { int add_function = 0; int sub_function = 0; String string_alpha = find_a(question); //finds the value of first input including x String string_beta = find_b(question); //finds the value of second input including x int var_alpha = find_a_num(question); //finds value as integer not including x, of first function int var_beta = find_b_num(question); //finds value as integer not including x, of second function System.out.println((find_par(2,question) + find_par(3,question))); String function_1 = function_1(question); //finds just the trig operator of the first function only used to check what type of equation String function_2 = function_2(question); //finds just the trig operator of the second function //check to make sure question is valid if not will start over if (!((function_1.equalsIgnoreCase("sin") && function_1.equalsIgnoreCase("cos") && function_1.equalsIgnoreCase("tan")) || (function_2.equalsIgnoreCase("sin") || function_2.equalsIgnoreCase("cos") || function_2.equalsIgnoreCase("tan")))) { error(); } //checking to see what equation to use if (function_1.equalsIgnoreCase("sin") && function_2.equalsIgnoreCase("sin")) { sin_sin(string_alpha,string_beta,var_alpha,var_beta); /*System.out.println("Step 1: (1/2)[(cos(" + string_alpha + "-" + string_beta + ")) - (cos(" + string_alpha + "+" + string_beta +"))]"); //prints first step add_function = var_alpha + var_beta; //adds the two values as integer sub_function = var_alpha - var_beta; //substracts the two values as integers String string_alpha2 = add_function +"x"; //reasigns string including x after substracting two values String string_beta2 = sub_function +"x"; //reasigns string including x after substracting two values System.out.println("\nStep 2: (1/2)[cos(" + string_beta2 + ") - cos(" + string_alpha2 + ")]"); // uses x a literal instead of from string because they are always there and substracts both halfs System.out.println("\nStep 3: (1/2)cos(" + string_beta2 + ") - (1/2)cos(" + string_alpha2 + ")"); finished();*/ } if (function_1.equalsIgnoreCase("sin") && function_2.equalsIgnoreCase("cos")) { System.out.println("Step 1: (1/2)[(cos(" + string_alpha + "+" + string_beta + ")) - (cos(" + string_alpha + "-" + string_beta +"))]\t\tenter values into equation"); //prints first step add_function = var_alpha + var_beta; //adds the two values as integer sub_function = var_alpha - var_beta; //substracts the two values as integers String string_alpha2 = add_function +"x"; //reasigns string including x after substracting two values String string_beta2 = sub_function +"x"; //reasigns string including x after substracting two values System.out.println("\nStep 2: (1/2)[cos(" + string_alpha2 + ") + cos(" + string_beta2 + ")]\t\tsimplify values"); // uses x a literal instead of from string because they are always there and substracts both halfs System.out.println("\nStep 3: (1/2)cos(" + string_alpha2 + ") + (1/2)cos(" + string_beta2 + ") t\tdistribute 1/2"); finished(); } //not done if (function_1.equalsIgnoreCase("cos") && function_2.equalsIgnoreCase("cos")) { System.out.println("Step 1: (1/2)[(cos(" + string_alpha + "+" + string_beta + ")) - (cos(" + string_alpha + "-" + string_beta +"))]\t\tenter values into equation"); //prints first step add_function = var_alpha + var_beta; //adds the two values as integer sub_function = var_alpha - var_beta; //substracts the two values as integers String string_alpha2 = add_function +"x"; //reasigns string including x after substracting two values String string_beta2 = sub_function +"x"; //reasigns string including x after substracting two values System.out.println("\nStep 2: (1/2)[cos(" + string_alpha2 + ") + cos(" + string_beta2 + ")]\t\tsimplify values"); // uses x a literal instead of from string because they are always there and substracts both halfs System.out.println("\nStep 3: (1/2)cos(" + string_alpha2 + ") + (1/2)cos(" + string_beta2 + ") t\tdistribute 1/2"); finished(); } //////////// //System.out.println(function_1 + " " + function_2); //find_b(question); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solution() {\n\t\t\n\t}", "@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}", "public abstract void solve();", "public void findSolution() {\n\n\t\t// TODO\n\t}", "public static void doExercise3() {\n // TODO: Complete Exercise 3 Below\n\n }", "public void question() {\n\t\tlead.answer(this);\n\t}", "public static void doExercise4() {\n // TODO: Complete Exercise 4 Below\n\n }", "public abstract TrajectoryInfo solve();", "public static void doExercise5() {\n // TODO: Complete Exercise 5 Below\n\n }", "public static void main(String[] args) throws Exception {\n\t\tsolve1();\n//\t\tsolve2();\n\t}", "public static void main(String[] args) {\n\t\tsolve(8, 3);\r\n\t\tsolve(2, 4);\r\n\t\tsolve(3, 2);\r\n\t}", "public static void doExercise2() {\n // TODO: Complete Exercise 2 Below\n\n }", "public void solveIt() {\n\t\tfirstFreeSquare.setNumberMeAndTheRest();\n\t}", "public void solve() {\n // TODO\n // This function should use next. You should also create and use any\n // other helper fuctions you find helpful here.\n \t// get start position \t\n \tSquare s = sea.getStart();\n \texploreList.add(s);\n \twhile(this.exploreList.size() != 0) {\n \t\tSquare c = step();\n \t\tif(c.hasNemo()) {\n \t\t\tsetPath(c);\n \t\t\tfoundNemo = true;\n \t\t\tbreak;\n \t\t}\n \t}\n }", "public static void doExercise1() {\n // TODO: Complete Exercise 1 Below\n\n }", "public static long solve(/* change signature to provide required inputs */) {\n throw new UnsupportedOperationException(\"Problem085 hasn't been solved yet.\");\n }", "public void testExercises() {\n\t\tSystem.out.println(\"Exercise 2:\");\n\t\tSATSolver solver = get2Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Exercise 5:\");\n\t\tsolver = get5Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t}", "public void solve() {\n System.out.println(\"Solving...\");\n solving = true;\n Solver s = new Solver(b.getBoard());\n ArrayList<Integer> solution = s.solve();\n\n System.out.println(\"Printing solution...\");\n try{\n Thread.sleep(300);\n }catch (Exception e){}\n\n solution.trimToSize();\n\n solveMoves = solution;\n\n Board bRef = new Board(b.getBoard());\n\n System.out.println(\"Step 0\");\n System.out.println(bRef.toString());\n\n for (int i = 0; i < solution.size(); i++) {\n bRef.move(solution.get(i));\n System.out.println(\"Step \" + (i + 1));\n System.out.println(bRef.toString());\n }\n\n System.out.println(\"Solved by Computer in \" + solution.size()+ \" move(s).\\n\");\n System.out.println(\"Left-click screen to follow steps.\");\n System.out.println(\"Right-click the screen to play again.\");\n\n solveStep = 0; //Reset for user\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "@Override\n\tpublic void solve() {\n\t\tlong startTime = System.nanoTime();\n\n\t\twhile(!unvisitedPM.isEmpty()){\n\t\t\tProblemModel current = findCheapestNode();\n\t\n\t\t\tfor(ProblemModel pm : current.getSubNodes()){\n\t\t\n\t\t\t\tif(!visited.contains(pm) && !unvisitedPM.contains(pm)){\n\t\t\t\t\t\n\t\t\t\t\tunvisitedPM.add(pm);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(current.getSideStart().isEmpty()){\n\t\t\t\tSystem.out.print( \"\\n\"+ \"StartSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideStart()){\n\t\t\t\t\tSystem.out.print( \" \" +r) ;\n\t\t\t\t}\n\t\t\t\tSystem.out.print( \"\\n\" + \"EndSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideEnd()){\n\t\t\t\t\tSystem.out.print( \" \" + r);\n\t\t\t\t}\n\n\t\t\t\tprintPathTaken(current);\n\t\t\t\tSystem.out.print( \"\\n\" + \"------------done--------------\");\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tlong duration = ((endTime - startTime)/1000000);\n\t\t\t\tSystem.out.print( \"\\n\" + \"-AS1 Time taken: \" + duration + \"ms\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tvisited.add(current);\n\t\t\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n Homework1 hw1 = new Homework1();\n\n System.out.println(\"===Problem 1===\");\n hw1.problem1();\n\n System.out.println(\"===Problem 2===\");\n System.out.println(hw1.topInt(1.5));\n System.out.println(hw1.topInt(5.1));\n System.out.println(hw1.topInt(1.0));\n System.out.println(hw1.topInt(-4.2));\n\n\n System.out.println(\"===Problem 3===\");\n hw1.draw4x4('-');\n hw1.draw4x4('4');\n\n System.out.println(\"===Problem 4===\");\n System.out.println(hw1.citationName(\"Alastair\", \"Reynolds\"));\n System.out.println(hw1.citationName(\"Grace\", \"Hopper\"));\n\n System.out.println(\"===Problem 5===\");\n System.out.println(String.valueOf(hw1.min3(1.0, 2.0, 3.0)));\n System.out.println(String.valueOf(hw1.min3(4.0, 3.0, 2.0)));\n System.out.println(String.valueOf(hw1.min3(0.5, 0.1, 0.5)));\n \n System.out.println(\"===Problem 6===\");\n System.out.println(hw1.fibonacci(0));\n System.out.println(hw1.fibonacci(1));\n System.out.println(hw1.fibonacci(2));\n System.out.println(hw1.fibonacci(3));\n System.out.println(hw1.fibonacci(10));\n System.out.println(hw1.fibonacci(25));\n \n \n System.out.println(\"===Problem 7===\");\n //System.out.println(hw1.isPalindrome(\"racecar\"));\n //System.out.println(hw1.isPalindrome(\"cat\"));\n //System.out.println(hw1.isPalindrome(\"hannah\"));\n //System.out.println(hw1.isPalindrome(\"saippuakivikauppias\"));\n }", "abstract int steps();", "@Test\n public void solve1() {\n }", "public void affichageSolution() {\n\t\t//On commence par retirer toutes les traces pré-existantes du labyrinthe\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Trace) {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j] = new Case();\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//On parcourt toutes les cases du labyrinthe. Si on trouve un filon non extrait dont le chemin qui le sépare au mineur est plus petit que shortestPath, on enregistre la longueur du chemin ainsi que les coordonnees de ledit filon\n\t\tint shortestPath = Integer.MAX_VALUE;\n\t\tint[] coordsNearestFilon = {-1,-1};\n\t\tfor (int i=0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j=0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Filon && ((Filon)this.laby.getLabyrinthe()[i][j]).getExtrait() == false) {\n\t\t\t\t\tif (this.laby.solve(j,i) != null) {\n\t\t\t\t\t\tint pathSize = this.laby.solve(j,i).size();\n\t\t\t\t\t\tif (pathSize < shortestPath) {\n\t\t\t\t\t\t\tshortestPath = pathSize;\n\t\t\t\t\t\t\tcoordsNearestFilon[0] = j;\n\t\t\t\t\t\t\tcoordsNearestFilon[1] = i;\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//Si il n'y a plus de filon non extrait atteignable, on cherche les coordonnes de la clef\n\t\tif (coordsNearestFilon[0] == -1) {\n\t\t\tcoordsNearestFilon = this.laby.getCoordsClef();\n\t\t\t//Si il n'y a plus de filon non extrait atteignable et que la clef a deja ouvert la porte, on cherche les coordonnes de la sortie\n\t\t\tif (coordsNearestFilon == null)\tcoordsNearestFilon = this.laby.getCoordsSortie();\n\t\t}\n\n\t\t//On cree une pile qui contient des couples de coordonnees qui correspondent a la solution, puis on depile car le dernier element est l'objectif vise\n\t\tStack<Integer[]> solution = this.laby.solve(coordsNearestFilon[0], coordsNearestFilon[1]);\n\t\tsolution.pop();\n\n\t\t//Tant que l'on n'arrive pas au premier element de la pile (cad la case ou se trouve le mineur), on depile tout en gardant l'element depile, qui contient les coordonnees d'une trace que l'on dessine en suivant dans la fenetre\n\t\twhile (solution.size() != 1) {\n\t\t\tInteger[] coordsTmp = solution.pop();\n\t\t\tTrace traceTmp = new Trace();\n\t\t\tthis.laby.getLabyrinthe()[coordsTmp[1]][coordsTmp[0]] = new Trace();\n\t\t\t((JLabel)grille.getComponents()[coordsTmp[1]*this.laby.getLargeur()+coordsTmp[0]]).setIcon(traceTmp.imageCase());\n\t\t}\n\t\tSystem.out.println(\"\\n========================================== SOLUTION =====================================\\n\");\n\t\tthis.affichageLabyrinthe();\n\t}", "@Override\n\t public String solve() {\n\t if (count == 0) {\n\t answer1 = getVariable2()*getVariable3();\n\t setAnswer(answer1 + \"\");\n\t } else if (count == 1) {\n\t answer1 = getVariable1()/getVariable2();\n\t setAnswer(answer1 + \"\");\n\t }else if (count == 2) {\n\t answer1 = getVariable1()/getVariable3();\n\t setAnswer(answer1 + \"\");\n\t }\n\t return getAnswer();\n\t }", "public void runAlgorithm()\n\t{\n\t\tboolean done = false;\n while (!done)\n {\n switch (step)\n {\n case 1:\n step=stepOne(step);\n break;\n case 2:\n step=stepTwo(step);\n break;\n case 3:\n step=stepThree(step);\n break;\n case 4:\n step=stepFour(step);\n break;\n case 5:\n step=stepFive(step);\n break;\n case 6:\n step=stepSix(step);\n break;\n case 7:\n stepSeven(step);\n done = true;\n break;\n }\n }\n\t}", "@Override\n\tpublic void challenge7() {\n\n\t}", "@Test\n public void test() {\n Assert.assertEquals(3L, Problem162.solve(/* change signature to provide required inputs */));\n }", "@Test\n public void test() {\n Assert.assertEquals(0.83648556F, Problem232.solve(/* change signature to provide required inputs */));\n }", "protected abstract String answer();", "public void mo21792Q() {\n }", "@Override\n public void handleSolution(String solution,long time) {\n \n }", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "boolean nextStep();", "public void solve() {\n /** To solve the traveling salesman problem:\n * Set up the graph, choose a starting node, then call the recursive backtracking method and pass it the starting node.\n */\n\n // We need to pass a starting node to recursive backtracking method\n Node startNode = null;\n\n // Grab a node, any node...\n for( Node n : graph.nodes() ) {\n startNode = n;\n break;\n }\n\n // Visit the first node\n startNode.visit();\n\n // Add first node to the route\n this.route[0] = startNode;\n\n // Pass the number of choices made\n int nchoices = 1;\n\n // Recursive backtracking\n explore(startNode, nchoices );\n\n\n }", "public boolean solve(){\n\t\t//Solve the puzzle using backtrack method\n\t\treturn solve(0,0);\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\t\r\n\t\t\tint [] numReps= {3,1,2,2,2};\r\n\t\t\tMathModelClass.solveMe(85, 5, 2,numReps, 1);\r\n\t\r\n\t\t}", "@Override\n public final void solve() {\n this.flag1 = this.neo.getPosition().equals(this.goal);\n \n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "@Override\n\tpublic void step2() {\n\t\t\n\t}", "public void logicCycles()throws Exception\r\n\t{\r\n\t\t\r\n\t\twhile(isSolved() == false)\r\n\t\t{\r\n\t\t\tint changesMade = 0;\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\tchangesMade = 0;\r\n\t\t\t\tchangesMade += logic1();\r\n\t\t\t\tchangesMade += logic2();\r\n\t\t\t\tchangesMade += logic3();\r\n\t\t\t\tchangesMade += logic4();\r\n\t\t\t\tif(errorFound())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}while(changesMade != 0);\r\n\t\r\n\t\t}\t\t\t\r\n\t\t\r\n\t}", "public abstract void performStep();", "public static void main(String[] args) {\n int input = 0;\n int armLength;\n int solution = 0;\n\n // get the puzzle input\n System.out.print(\"Please provide the puzzle input: \");\n input = new Scanner(System.in).nextInt();\n\n /// PART 1\n // figure out which spiral input is on to calculate distance on one axis\n armLength = SpiralUtils.lengthOfSprialArm(input);\n solution = (armLength - 1) / 2;\n\n // find the midpoints of the spiral the input is on\n List<Integer> midpoints = SpiralUtils.midpointsOfSprialArm(armLength);\n\n // calculate the smallest distance from any midpoint to our input for other access\n solution += SpiralUtils.smallestDistanceFromMidpoints(input, midpoints);\n\n System.out.println(\"The solution to part 1 is: \" + solution);\n\n /// PART 2\n // this part is less elegant, as I'm just going to create the spiral instead of run calculations\n System.out.println(\"The solution to part 2 is: \" + SpiralUtils.spiralUntilAtLeast(input));\n }", "public static void main(String[] args) {\n\t\t\tSystem.out.println(Solution(5, 83));\n\t\t\t\n\t\t}", "@Override\n\tpublic void challenge6() {\n\n\t}", "public boolean solve()\n\t{\n Position[] pos=path.getLastStep().neighbors();\n if (grid.isOnBoundary(path.getLastStep())&&grid.isOpen(path.getLastStep()))\n\t\treturn true;\n if (path.getLastStep()==start)\n return false;\n for (int i=0;i<4;i++)\n {\n if (pos[i]!=path.getLastStep() && grid.isOpen(pos[i]))\n path.extend(pos[i]);\n }\n if (grid.isBlocked(path.getLastStep())||grid.isRejected(path.getLastStep()))\n {\n path.backUp();\n solve();\n }\n return false;\n \n\t}", "public static void main(String[] args){\n\t\tSystem.out.print(\"This was the initial input\");\r\n\t\tfillBoard();\r\n\t\tprintSudoBoard(table);\r\n\t\tsolve(table);\r\n\t\t//prints the final board\r\n\t\tSystem.out.print(\"This is the answer to the board\");\r\n\t\tprintSudoBoard(table);\r\n\r\n\r\n\r\n\t}", "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "@Override\n\tpublic void challenge9() {\n\n\t}", "public abstract double evaluer(SolutionPartielle s);", "private static void solve() throws IOException {\n\n OptimizationGame.solve();\n SumOfSumOfDigits.solve();\n CrossTheStreet.solve();\n }", "public void easy() {\n\t\tGenerator solve = new Generator();\n\t\tsolve.easy();\n\t\tAnswer = solve.getEquationResult();\n\t\tTextView Equation = (TextView) findViewById(R.id.textView3);\n\t\tEquation.setText(solve.getEquation());\n\t}", "@Override\n\tpublic void challenge17() {\n\n\t}", "public boolean solve(){\n\t\treturn solve(0,0);\n\t}", "public void askQuestions() {\r\n overallRoot = askQuestionsHelper(overallRoot);\r\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int[] arr = new int[4];\n for (int i = 0; i < 4; i++)\n arr[i] = sc.nextInt();\n \n Q1 q1 = new Q1();\n int[] answer = q1.solution(arr);\n \n for (int i = 0; i < answer.length; i++) {\n System.out.println(answer[i]);\n }\n }", "@Override\n\tpublic void step() {\n\t\t\n\t}", "@Override\n\tpublic void step() {\n\t\t\n\t}", "public static void main(String[] args) {\n Steps ways = new Steps();\n int n=5;\n System.out.println(\"Recursion ways: \"+ways.getStepsRecur(n));\n \n System.out.println(\"DP ways: \"+ways.getStepDP(n));\n \n }", "private static Solution go(Formula formula, PardinusBounds bounds, ExtendedOptions options) {\n\t\tReporter rep = options.reporter();\n\t\t\n\t\t// if not decomposed, use the amalgamated if any\n\t\tif (!options.decomposed() && bounds.amalgamated!=null)\n\t\t\tbounds = bounds.amalgamated();\n\n\t\t// create a directory with the specified unique name\n\t\tString temp=System.getProperty(\"java.io.tmpdir\");\n\t\tFile dir = new File(temp+File.separatorChar+options.uniqueName());\n\t\tif (!dir.exists()) dir.mkdir();\n\t\t\n\t\tString file = dir.toString()+File.separatorChar+String.format(\"%05d\", bounds.integration);\n\t\tPrintWriter writer;\n\t\ttry {\n\t\t\tif (!Options.isDebug())\n\t\t\t\tnew File(file+\".elo\").deleteOnExit();\n\t\t\twriter = new PrintWriter(file+\".elo\");\n\t\t\tString electrod = ElectrodPrinter.print(formula, bounds, rep);\n\t\t\twriter.println(electrod);\n\t\t\twriter.close();\n\t\t\trep.debug(\"New Electrod problem at \"+dir+\".\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new AbortedException(\"Electrod problem generation failed.\", e);\n\t\t}\n\t\tProcessBuilder builder;\n\t\tList<String> args = new ArrayList<String>();\n\t\targs.add(((ExternalSolver) options.solver().instance()).executable);\n\t\targs.addAll(Arrays.asList(((ExternalSolver) options.solver().instance()).options));\n\t\targs.add(Options.isDebug()?\"-v\":\"--\");\n\t\targs.add(file+\".elo\");\n\t\t\t\t\n\t\tbuilder = new ProcessBuilder(args);\n\t\t\n\t\tbuilder.environment().put(\"PATH\", builder.environment().get(\"PATH\")+\":/usr/local/bin:.\");\n\t\tbuilder.redirectErrorStream(true);\n\t\tint ret = -1;\n\t\tfinal Process p;\n\t\ttry {\n\t\t\toptions.reporter().solvingCNF(-1, -1, -1);\n\n\t\t\tp = builder.start();\n\t\t\t// stores the pid so that it can be correctly terminated\n\t\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif (!System.getProperty(\"os.name\").toLowerCase(Locale.US).startsWith(\"windows\"))\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tField f = p.getClass().getDeclaredField(\"pid\");\n\t\t\t\t\t\t\tf.setAccessible(true);\n\t\t\t\t\t\t\tRuntime.getRuntime().exec(\"kill -SIGTERM \" + f.get(p));\n\t\t\t\t\t\t} catch (NoSuchFieldException | SecurityException | IllegalArgumentException\n\t\t\t\t\t\t\t\t| IllegalAccessException | IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tp.destroy();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\ttry {\n\t\t\t\tBufferedReader output = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tp.getInputStream()));\n\n\t\t\t\tString oline = \"\";\n\t\t\t\twhile ((oline = output.readLine()) != null)\n\t\t\t\t\trep.debug(oline);\n\n\t\t\t\tret = p.waitFor();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tp.destroy();\n\t\t\t\tthrow new AbortedException(\"Electrod problem interrupted.\", e);\n\t\t\t}\n\t\t} catch (IOException e1) {\n\t\t\tthrow new AbortedException(\"Electrod problem failed.\", e1);\n\t\t}\n\t\t\n\t\tif (ret != 0) {\n\t\t\trep.warning(\"Electrod exit code: \"+ret);\n\t\t\tthrow new AbortedException(\"Electrod exit code: \"+ret);\n\t\t}\n\t\telse\n\t\t\trep.debug(\"Electrod ran successfully.\");\n\t\t\n\t\tFile xml = new File(file+\".xml\");\n\t\t\n\t\tif (!Options.isDebug())\n\t\t\txml.deleteOnExit();\n\n\t\tif (!xml.exists())\n\t\t\tthrow new AbortedException(\"XML solution file not found: \"+file+\".xml.\");\n\t\telse {\n\t\t\trep.debug(file);\n\n\t\t\tElectrodReader rd = new ElectrodReader(bounds);\n\t\t\tTemporalInstance res = rd.read(xml);\n\t\t\t\n\t\t\tStatistics st = new Statistics(rd.nbvars, 0,0, rd.ctime, rd.atime);\n\n\t\t\tSolution sol;\n\t\t\t// ElectrodReader#read returns null if unsat\n\t\t\tif (res == null)\n\t\t\t\tsol = Solution.unsatisfiable(st, null);\n\t\t\telse\n\t\t\t\tsol = Solution.satisfiable(st, res);\n\t\t\t\n\t\t\treturn sol;\n\t\t}\n\t}", "public static long solve(/* change signature to provide required inputs */) {\n throw new UnsupportedOperationException(\"Problem141 hasn't been solved yet.\");\n }", "public static int step() {\n if (instructions_addr.get(line_count) == null) {\n // System.exit(1);\n return -1;\n }\n String[] in = (instructions_addr.get(line_count)).split(\"\\\\s+\");\n int r1 = 0;\n int r2 = 0;\n int r3 = 0;\n try {\n r1 = registers.get(in[1]);\n r2 = registers.get(in[2]);\n r3 = registers.get(in[3]);\n } catch (NullPointerException npe) {\n // sike no exception\n } catch (ArrayIndexOutOfBoundsException e) {\n\n }\n System.out.println(line_count+Arrays.toString(in));\n String op = in[0];\n switch (op) {\n case \"add\":\n register[r1] = register[r2] + register[r3];\n line_count = line_count + 1;\n break;\n\n case \"sub\":\n register[r1] = register[r2] - register[r3];\n line_count = line_count + 1;\n break;\n\n case \"addi\":\n register[r1] = register[r2] + Integer.parseInt(in[3]);\n line_count = line_count + 1;\n break;\n\n case \"beq\":\n if (register[r1] == register[r2]) {\n actual(1);\n line_count = labels_addr.get(in[3]);\n } else {\n actual(0);\n line_count++;\n }\n break;\n\n case \"bne\":\n if (register[r1] != register[r2]) {\n line_count = labels_addr.get(in[3]);\n actual(1);\n } else {\n line_count = line_count + 1;\n actual(0);\n }\n break;\n\n case \"or\":\n register[r1] = register[r2] | register[r3];\n line_count = line_count + 1;\n break;\n\n case \"and\":\n register[r1] = register[r2] & register[r3];\n line_count = line_count + 1;\n break;\n\n case \"sll\":\n register[r1] = register[r2] << Integer.parseInt(in[3]);\n line_count = line_count + 1;\n break;\n\n case \"slt\":\n if (register[r2] < register[r3]) {\n register[r1] = 1;\n } else {\n register[r1] = 0;\n }\n line_count = line_count + 1;\n break;\n\n case \"lw\":\n r2 = Integer.parseInt(in[2].substring(0, in[2].indexOf(\"(\")));\n r3 = registers.get(in[3].substring(0, in[3].indexOf(\")\"))); // imm\n register[r1] = data_mem[r2 + register[r3]];\n line_count = line_count + 1;\n break;\n\n case \"sw\":\n r2 = Integer.parseInt(in[2].substring(0, in[2].indexOf(\"(\")));\n r3 = registers.get(in[3].substring(0, in[3].indexOf(\")\"))); // imm\n data_mem[r2 + register[r3]] = register[r1];\n line_count = line_count + 1;\n break;\n\n case \"j\":\n line_count = labels_addr.get(in[1]);\n break;\n\n case \"jr\":\n line_count = register[31];\n break;\n\n case \"jal\":\n register[31] = line_count + 1;\n line_count = labels_addr.get(in[1]);\n break;\n\n default:\n line_count = line_count + 1;\n }\n return 1;\n }", "public static void main(String[] args) {\n\n Solution2.solution();\n }", "public void solve(int x, int y, int number)\r\n\t{\r\n\t\t\r\n\t}", "@Test\n public void test23() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver(1.0);\n Floor floor0 = new Floor();\n AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE;\n double double0 = illinoisSolver0.solve(2297949, (UnivariateRealFunction) floor0, 0.5, 1.0, allowedSolution0);\n double double1 = illinoisSolver0.doSolve();\n }", "@Test\n public void testSolution() throws Exception {\n assertEquals(4, new Task5().solution(4, new int[]{1, 2, 3}));\n // 1. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 2. 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 3. 2, 2, 1, 1, 1, 1, 1, 1, 1, 1\n // 4. 2, 2, 2, 1, 1, 1, 1, 1, 1\n // 5. 2, 2, 2, 2, 1, 1, 1, 1\n // 6. 2, 2, 2, 2, 2, 1, 1\n // 7. 2, 2, 2, 2, 2, 2\n // 8. 5, 1, 1, 1, 1, 1, 1, 1\n // 9. 5, 2, 1, 1, 1, 1, 1\n // 10. 5, 2, 2, 1, 1, 1\n // 11. 5, 2, 2, 2, 1\n // 12. 5, 5, 1, 1\n // 13. 5, 5, 2\n assertEquals(13, new Task5().solution(12, new int[]{1, 2, 5}));\n // 1. 2, 2, 2, 2, 2, 2\n // 2. 5, 5, 2\n assertEquals(2, new Task5().solution(12, new int[]{2, 5}));\n }", "public void step();", "public void step();", "public void correct() {\n\n\n }", "@SuppressWarnings(\"Main Logic\")\n void solve() {\n n = ii();\n m = ii();\n a = iia(n);\n int from[] = new int[n - 1];\n int to[] = new int[n - 1];\n for (int i = 0; i < n - 1; i++) {\n from[i] = ii() - 1;\n to[i] = ii() - 1;\n }\n g = packU(n, from, to, n - 1);\n int[][] pars = parents3(g, 0);\n par = pars[0];\n int[] ord = pars[1];\n dep = pars[2];\n spar = logstepParents(par);\n subTree = new int[n];\n dfs(0, -1);\n pointer = 1;\n baseArray = new int[n + 1];\n chainNo = 0;\n chainInHead = new int[n];\n Arrays.fill(chainInHead, -1);\n posInBase = new int[n];\n chainInInd = new int[n];\n HLD(0, -1);\n makeTree();\n out.println(Arrays.toString(baseArray));\n out.println(Arrays.toString(a));\n for (int q = 0; q < m; q++) {\n int type = ii();\n if (type == 1) {\n int u = ii() - 1, v = ii() - 1;\n query(u, v);\n out.println(\"DONE\");\n } else {\n int u = ii(), v = ii();\n // update\n }\n }\n }", "private void doResearch() {\n\t\tSystem.out.println(\"Students must do research\");\n\t}", "public static void solveQuadraticEquation() {\n }", "public static void main(){\n \n \n String question = \"There are 10 types of people in this world, those who understand binary and those who don't.\";\n String answer = \"true\";\n \n Question tfQuest = new Question (question, answer);\n tfQuest.getAnswer();\n \n }", "private void method_2684(ahb var1, int var2, int var3, int var4) {\r\n String[] var10000 = class_752.method_4253();\r\n int var6 = var1.method_33(var2, var3, var4);\r\n int var7 = method_2686(var6);\r\n String[] var5 = var10000;\r\n int var9 = var7;\r\n if(var5 != null) {\r\n if(var7 == 7) {\r\n return;\r\n }\r\n\r\n var9 = this.method_2685(var1, var2, var3, var4, var7);\r\n }\r\n\r\n int var8 = var9;\r\n var9 = var8;\r\n if(var5 != null) {\r\n label45: {\r\n if(var8 != 0) {\r\n var9 = method_2687(var6);\r\n if(var5 == null) {\r\n break label45;\r\n }\r\n\r\n if(var9 == 0) {\r\n ahb var10 = var1;\r\n int var10001 = var2;\r\n int var10002 = var3;\r\n int var10003 = var4;\r\n if(var5 != null) {\r\n if(!method_2690(var1, var2, var3, var4, var7)) {\r\n return;\r\n }\r\n\r\n var10 = var1;\r\n var10001 = var2;\r\n var10002 = var3;\r\n var10003 = var4;\r\n }\r\n\r\n var10.method_2193(var10001, var10002, var10003, this, 0, var7);\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n var9 = var8;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 != 0) {\r\n return;\r\n }\r\n\r\n var9 = method_2687(var6);\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 == 0) {\r\n return;\r\n }\r\n\r\n var1.method_2055(var2, var3, var4, var7, 2);\r\n }\r\n\r\n var1.method_2193(var2, var3, var4, this, 1, var7);\r\n }", "public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}", "public static void main(String[] args) {\n\t\tint arr[] = {9,3,9,3,9,7,9};\n\t\tSolution(arr);\n\t}", "@Test\n public void test19() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = illinoisSolver0.solve(16, (UnivariateRealFunction) tanh0, (-0.5), (double) 16, (-0.5), allowedSolution0);\n }", "public void askQuestions() {\r\n finalRoot = askQuestionsInternal(finalRoot);\r\n }", "@Override\n\tpublic void challenge14() {\n\n\t}", "@Test\n\tvoid test() {\n\t\tassertEquals(0, solution1.solution(2147483647));\n\t\tassertEquals(1, solution1.solution(5));\n\t}", "public static void main(String[] args) {\n System.out.println(solution(\"1 + 2\"));\n System.out.println(solution(\"1 * 2 + 3\"));\n System.out.println(solution(\"1 + 2 * 3\"));\n System.out.println(solution(\"1 + 2 * 3 - 4 / 2 + 6 / 2 - 7\"));\n\n System.out.println(solution(\"1 + 2 * (3 * (1 + 2))\"));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public String nextStep();", "public static int csQuestions(int csPathway) {\r\n int questionNumber = (int) (Math.random() * 20) + 1;\r\n\r\n switch (questionNumber) {\r\n case 1:\r\n System.out.println(\r\n \"\\r\\n\" + \"Which of the following is not one of the 8 ethics of programming\\r\\n\" + \"1.) Self\\r\\n\"\r\n + \"2.) Product\\r\\n\" + \"3.) Gracious Professionalism \\r\\n\" + \"4.) Public\\r\\n\");\r\n break;\r\n case 2:\r\n System.out.println(\r\n \"What’s wrong with the following main method? Public static boolean main(String args[]) {\\r\\n\"\r\n + \"1.) The main should be private\\r\\n\" + \"2.) The p in public should be lowercase\\r\\n\"\r\n + \"3.) The arguments should be int\\r\\n\"\r\n + \"4.) The p in public should be lowercase and boolean should be void\\r\\n\");\r\n break;\r\n case 3:\r\n System.out.println(\r\n \"What are the primitive types?\\r\\n\"\r\n + \"1.) byte, String, int, double, char, boolean, float, long\\r\\n\"\r\n + \"2.) double, char, boolean, float\\r\\n\"\r\n + \"3.) byte, short, int, long, float, double, char, boolean\\r\\n\"\r\n + \"4.) double, class, boolean, float\\r\\n\");\r\n break;\r\n case 4:\r\n System.out.println(\r\n \"The “less than or equal to” comparison operator in Java is _______.\\r\\n\" + \"1.) =<\\r\\n\"\r\n + \"2.) !=\\r\\n\" + \"3.) <=\\r\\n\" + \"4.) <\\r\\n\");\r\n break;\r\n case 5:\r\n System.out.println(\r\n \"What are the benefits of modular programming?\\r\\n\"\r\n + \"1.) Methods are used to break code into manageable pieces\\r\\n\"\r\n + \"2.) Make code more reusable\\r\\n\" + \"3.) Help to debug code\\r\\n\"\r\n + \"4.) All of the above\\r\\n\");\r\n break;\r\n case 6:\r\n System.out.println(\r\n \"The following code displays ______.\\r\\n\" + \" double temp = 50;\\r\\n\" + \" \\r\\n\"\r\n + \" if (temp >= 100)\\r\\n\" + \" System.out.println(“too hot’);\\r\\n\"\r\n + \" else if (temp <=40)\\r\\n\" + \" System.out.println(“too cold”);\\r\\n\"\r\n + \" else \\r\\n\" + \" System.out.println(“just right”);\\r\\n\"\r\n + \"1.) too hot too cold just right\\r\\n\" + \"2.) too hot\\r\\n\" + \"3.) too cold\\r\\n\"\r\n + \"4.) just right\\r\\n\");\r\n break;\r\n case 7:\r\n System.out.println(\r\n \"The order of precedence (from high to low) of the operators +,*, &&, ||, ! is\\r\\n\"\r\n + \"1.) *, +, !, &&, ||\\r\\n\" + \"2.) *, +, &&, ||, !\\r\\n\" + \"3.) &&, ||, !, +, *\\r\\n\"\r\n + \"4.) *, +, !, ||, &&\\r\\n\");\r\n break;\r\n case 8:\r\n System.out.println(\r\n \"What does the String Class, s.length() do?\\r\\n\" + \"1.) returns the character at index x\\r\\n\"\r\n + \"2.) returns true/false if the string stored in s is the same as that in t ignoring the case\\r\\n\"\r\n + \"3.) returns the number of characters in the string\\r\\n\"\r\n + \"4.) returns the string in all lowercase\\r\\n\");\r\n break;\r\n case 9:\r\n System.out.println(\r\n \"What does the Math Class, Math.random() do?\\r\\n\"\r\n + \"1.) returns a double from 0.0 and less than 1.0\\r\\n\"\r\n + \"2.) return a double of the square root of the value given\\r\\n\"\r\n + \"3.) returns the minimum of the two values given\\r\\n\"\r\n + \"4.) returns a double of the base raised to the exponent\\r\\n\");\r\n break;\r\n case 10:\r\n System.out.println(\r\n \"What does void in the following method, public static void main(String[] args), mean?\\r\\n\"\r\n + \"1.) when called on, this method will not have a return value\\r\\n\"\r\n + \"2.) void is the method name\\r\\n\"\r\n + \"3.) when called on, this method will return a boolean\\r\\n\"\r\n + \"4.) void represent that this method needs no parameters\\r\\n\");\r\n break;\r\n case 11:\r\n System.out.println(\r\n \"What is wrong with the following line, System.out.println(“Hello World”)\\r\\n\"\r\n + \"1.) System should be lowercase\\r\\n\" + \"2.) missing a semicolon at the end\\r\\n\"\r\n + \"3.) Hello World needs to be in single quotations\\r\\n\"\r\n + \"4.) missing a comma at the end\\r\\n\");\r\n break;\r\n case 12:\r\n System.out.println(\r\n \"What is // used for?\\r\\n\" + \"1.) print a new line\\r\\n\" + \"2.) block comments\\r\\n\"\r\n + \"3.) single line comments\\r\\n\" + \"4.) print double space\\r\\n\");\r\n break;\r\n case 13:\r\n System.out.println(\r\n \"What does the String Class, s.equalsIgnoreCase(t) do?\\r\\n\"\r\n + \"1.) returns the string in all lowercase\\r\\n\" + \"2.) returns the character at index x\\r\\n\"\r\n + \"3.) returns true/false if the string stored in s is the same as that in t\\r\\n\"\r\n + \"4.) returns true/false if the string stored in s is the same as that in t ignoring the case\\r\\n\");\r\n break;\r\n case 14:\r\n System.out.println(\r\n \"If you run a program and it returns with ArrayIndexOutOfBoundsException. There’s a ______.\\r\\n\"\r\n + \"1.) runtime error\\r\\n\" + \"2.) syntax error\\r\\n\" + \"3.) format error \\r\\n\"\r\n + \"4.) logic error\\r\\n\");\r\n break;\r\n case 15:\r\n System.out.println(\r\n \"What are two ways to make code more readable?\\r\\n\" + \"1.) comments and arrays\\r\\n\"\r\n + \"2.) descriptive names and randomized casing\\r\\n\"\r\n + \"3.) descriptive names and comments\\r\\n\" + \"4.) indentation and return statements \\r\\n\");\r\n break;\r\n case 16:\r\n System.out.println(\r\n \"A for statement is a _________.\\r\\n\" + \"1.) conditional loop\\r\\n\" + \"2.) counter loop \\r\\n\"\r\n + \"3.) selection statement\\r\\n\" + \"4.) selection loop\\r\\n\");\r\n break;\r\n case 17:\r\n System.out.println(\r\n \"// are used for what in Java?\\r\\n\" + \"1.) single line commenting \\r\\n\"\r\n + \"2.) end of a java statement \\r\\n\" + \"3.) block comment\\r\\n\"\r\n + \"4.) Java doc comment\\r\\n\");\r\n break;\r\n case 18:\r\n System.out.println(\r\n \"Which of the following is the correct way to name a variable?\\r\\n\" + \"1.) StudentNumber\\r\\n\"\r\n + \"2.) _student_number\\r\\n\" + \"3.) STUDENTNUMBER\\r\\n\" + \"4.) studentNumber\\r\\n\");\r\n break;\r\n case 19:\r\n System.out.println(\r\n \"What will the following code execute?\\r\\n\" + \" int x = 10;\\r\\n\" + \" x += 5;\\r\\n\"\r\n + \" System.out.println(“X equals” + x);\\r\\n\" + \"1.) prints out “X equals x”\\r\\n\"\r\n + \"2.) prints out “X equals 10”\\r\\n\" + \"3.) prints out “X equals 15”\\r\\n\"\r\n + \"4.) prints out “X equals 5”\\r\\n\");\r\n break;\r\n case 20:\r\n System.out.println(\r\n \"What does the Math Class, Math.pow(base, exp) do?\\r\\n\"\r\n + \"1.) return a double of the square root of the value given\\r\\n\"\r\n + \"2.) returns a double from 0.0 and less than 1.0\\r\\n\"\r\n + \"3.)returns the maximum of the two values given\\r\\n\"\r\n + \"4.) returns a double of the base raised to the exponent\\r\\n\");\r\n }\r\n\r\n return questionNumber;\r\n }", "public void solve() {\n \tsquares[0][0].fillInRemainingOfBoard();\n }", "void solve() throws IOException {\n\t\tint n = ni();\n\t\tint[] v = new int[n];\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\tv[i] = ni();\n\t\tsolve(v);\n\t\tout.println(result.size());\n\t\tfor (int a : result)\n\t\t\tout.print(a + \" \");\n\t}", "public static void main(String[] args) {\n\t\tString resName = \"A-small-attempt0.in\";\r\n\t\tCodeJam.solver(resName, (F0<String> lineF) -> {\r\n\t\t\tint firstAnswer = Integer.parseInt(lineF.e());\r\n\t\t\tArrayList<ArrayList<Integer>> rows1 = CodeJam.toInts(lineF, 4);\r\n\t\t\tint secondAnswer = Integer.parseInt(lineF.e());\r\n\t\t\tArrayList<ArrayList<Integer>> rows2 = CodeJam.toInts(lineF, 4);\r\n\t\t\treturn () -> {\r\n\t\t\t\treturn cal(firstAnswer, rows1, secondAnswer, rows2);\r\n\t\t\t};\r\n\t\t})\r\n\t\t.solve();\r\n\t}", "public static void helpermethod(int numberofsteps){\n ways(numberofsteps, 0, \"[\");\r\n }", "public void checkAnswer() {\n }", "@Override\n\tpublic void challenge11() {\n\n\t}", "@Override\n\tpublic void step() {\n\t}", "@Override\n\tpublic void step() {\n\t}", "private void generalKnowledgeQuestions(){\n QuestionUtils.generalKnowledgeQuestions(); //all the questions now are stored int the QuestionUtils class\n }", "private void method_4318() {\r\n String[] var1;\r\n int var11;\r\n label68: {\r\n var1 = class_752.method_4253();\r\n class_758 var10000 = this;\r\n if(var1 != null) {\r\n if(this.field_3417 != null) {\r\n label71: {\r\n var11 = this.field_3417.field_3012;\r\n if(var1 != null) {\r\n if(this.field_3417.field_3012) {\r\n var10000 = this;\r\n if(var1 != null) {\r\n if(!this.field_2990.field_1832) {\r\n this.method_409(this.field_3404, class_1691.method_9334((class_1036)null), 10.0F);\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var10000.field_3417 = null;\r\n if(var1 != null) {\r\n break label71;\r\n }\r\n }\r\n\r\n var11 = this.field_3029 % 10;\r\n }\r\n\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 == 0) {\r\n float var13;\r\n var11 = (var13 = this.method_406() - this.method_405()) == 0.0F?0:(var13 < 0.0F?-1:1);\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 < 0) {\r\n this.method_4188(this.method_406() + 1.0F);\r\n }\r\n }\r\n }\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var11 = var10000.field_3028.nextInt(10);\r\n }\r\n\r\n if(var11 == 0) {\r\n float var2 = 32.0F;\r\n List var3 = this.field_2990.method_2157(class_705.class, this.field_3004.method_7097((double)var2, (double)var2, (double)var2));\r\n class_705 var4 = null;\r\n double var5 = Double.MAX_VALUE;\r\n Iterator var7 = var3.iterator();\r\n\r\n while(true) {\r\n if(var7.hasNext()) {\r\n class_705 var8 = (class_705)var7.next();\r\n double var9 = var8.method_3891(this);\r\n if(var1 == null) {\r\n break;\r\n }\r\n\r\n label43: {\r\n double var12 = var9;\r\n if(var1 != null) {\r\n if(var9 >= var5) {\r\n break label43;\r\n }\r\n\r\n var12 = var9;\r\n }\r\n\r\n var5 = var12;\r\n var4 = var8;\r\n }\r\n\r\n if(var1 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.field_3417 = var4;\r\n break;\r\n }\r\n }\r\n\r\n }", "@Test\n public void test22() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE;\n double double0 = illinoisSolver0.solve(16, (UnivariateRealFunction) tanh0, (-0.5), (double) 16, (-0.5), allowedSolution0);\n }", "public static void main(String[] args) {\n\t\t\n\t\tquestion2();\n\t//\tq2\n\t\t\n\t}", "@Override\n\tpublic void solve(String result) {\n\t\tSystem.out.println(\"你告诉我的答案是--->\"+result); \n\t}", "protected abstract R runStep();", "public void SolveTowers() {\n\n\t\tif(startingDepth == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.println(this.toString());\n\t\tthis.BreakDown(startingTower, endingTower, startingDepth);\n\t\tthis.BuildUp(endingTower,startingTower,startingDepth);\n\t}", "public void trySolve() {\n\t\tboolean change = true;\n\t\twhile (change) {\n\t\t\tchange = boardSolve();\n\t\t}\n\t}" ]
[ "0.74163353", "0.7111618", "0.65530807", "0.64217824", "0.63977504", "0.6374271", "0.63715285", "0.6296686", "0.62907916", "0.6289423", "0.6282495", "0.6278425", "0.62609076", "0.619913", "0.6149276", "0.6096484", "0.6048747", "0.6025306", "0.5991478", "0.5983299", "0.5982996", "0.5977622", "0.59761137", "0.59640586", "0.59507805", "0.59477395", "0.5941447", "0.5926628", "0.5915803", "0.5910516", "0.59072256", "0.5906166", "0.58867145", "0.5832821", "0.5822655", "0.5821312", "0.5805531", "0.58004785", "0.5781731", "0.5771978", "0.5749789", "0.572068", "0.571851", "0.5715338", "0.5714557", "0.57110924", "0.5708432", "0.57010406", "0.56950265", "0.56929016", "0.5684048", "0.56826353", "0.56808245", "0.56806314", "0.5660911", "0.5650878", "0.56465286", "0.56465286", "0.56355995", "0.56342137", "0.5633445", "0.56322414", "0.5632027", "0.56232387", "0.5607763", "0.5593708", "0.5591134", "0.5591134", "0.5590358", "0.55897826", "0.5589739", "0.5588511", "0.5586555", "0.5583221", "0.5572056", "0.557197", "0.5565992", "0.5560087", "0.5558803", "0.55538887", "0.5553057", "0.55467445", "0.5546694", "0.55445933", "0.5543874", "0.5543436", "0.55418205", "0.55386525", "0.5538284", "0.5535233", "0.5528326", "0.5528326", "0.55240256", "0.5522723", "0.5516825", "0.5515153", "0.55143255", "0.55136526", "0.5512506", "0.55053747" ]
0.60290027
17
//finds the value of the first varaible including x and exports as a string
public static String find_a(String question) { int first_par = 0; int second_par = 0; String a = ""; first_par = question.indexOf("("); second_par = question.indexOf(")"); a = question.substring(first_par+1,second_par); return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getVar(String s)\n {\n String var = null;\n Pattern pattern = Pattern.compile(\"[A-Z]+[a-z]*\");\n Matcher matcher = pattern.matcher(s);\n if(matcher.find())\n {\n var = matcher.group(0);\n }\n return var;\n }", "private static int find_value(String b)\n {\n int store = 0;\n List<String> name = new ArrayList<String>(library.return_name());\n //System.out.println(name);\n for(int x = 0; x < name.size(); x++)\n {\n if(name.get(x).charAt(0) == b.charAt(0))\n store = x;\n }\n List<Integer> value = new ArrayList<Integer>(library.return_value());\n return value.get(store);\n }", "String getVariable();", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "String getSourceVariablePart();", "public String resolveVariableName(int slot, int l) {\n \t\treturn null;\n \t}", "private static String findVariable(final String value) {\n int start = value.lastIndexOf(\"${\");\n if (start >= 0) {\n start += 2;\n final int end = value.indexOf(\"}\", start);\n if (end >= 0) {\n return value.substring(start, end);\n }\n }\n return null;\n }", "String getVarName();", "String getVarName();", "String getVarName();", "String getVarDeclare();", "public String getVariable();", "public static String extractVariable(String s) {\n Matcher matcher = VARS_RE.matcher(s);\n return matcher.find() ? matcher.group(1) : null;\n }", "java.lang.String getX();", "String getVarName(String name);", "java.lang.String getField1071();", "private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}", "public String getPertanyaan(int x){\n String soal = pertanyaan[x];\n return soal;\n }", "private String resolveVars(String s, Module m, Call c)\n {\n HashMap<String,String> vars = getVarValues(m,c);\n // System.out.println(vars);\n s = groundVars(s, vars, c);\n return s;\n }", "private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }", "private String getVariable(IInstallableUnit iu) {\n \t\tString v = (String) variables.get(iu);\n \t\tif (v == null) {\n \t\t\t//\t\t\tv = new String(\"x\" + (variables.size() + shift) + iu.toString()); //$NON-NLS-1$\n \t\t\tv = new String(\"x\" + (variables.size() + shift)); //$NON-NLS-1$\n \t\t\tvariables.put(iu, v);\n \t\t}\n \t\treturn v;\n \t}", "private int findPos(String x) {\n\t int offset = 1;\n\t int currentPosition = myhash(x);\n\t \n\t while (array[currentPosition] != null && !array[currentPosition].element.getContent().equals(x)) {\n\t currentPosition += offset; // Compute ith probe\n\t offset += 2;\n\t if(currentPosition >= array.length)\n\t currentPosition -= array.length;\n\t }\n\t \n\t return currentPosition;\n\t }", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CS1010\").get());\n }", "private String getSymbolString(String key, String numsys) {\n String value = null;\n try {\n value = cldrFile.getWinningValue(\"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n if (value == null || value.length() < 1) {\n throw new RuntimeException();\n }\n return value;\n } catch (RuntimeException e) {\n throw new IllegalArgumentException(\"Illegal value <\" + value + \"> at \"\n + \"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n }\n }", "public String variable()\n\t{\n\t\treturn _var;\n\t}", "String getTargetVariablePart();", "public static int getX(){\n return \"3.1415\";\n }", "String getVariableDefinition();", "private String reg(SSAStatement s) {\n return registers[freeRegisters[s.getRegister()]];\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "public String getParameterName(int index) {\n List<? extends VariableElement> parameters = executable.getParameters();\n String name = parameters.get(index).getSimpleName().toString();\n return name;\n }", "public String getPilihanJawaban1(int x){\n String jawaban1 = pilihanJawaban[x][0];\n return jawaban1;\n }", "private String name(String module)\n {\n return module.split(\"%%\")[1];\n }", "private static int getVar(int initInd, String var)throws Exception{\n int num;\n int perInd;\n char addMode;\n String[] inst;\n\n try{//tries to retrieve relative field\n num = Integer.parseInt(var);\n }catch(Exception e){//if not relative then seperates the address mode\n addMode = var.charAt(0);\n num = Integer.parseInt(var.substring(1, var.length()));\n perInd = (initInd + num) % coreSize; //this makes sure that the index wraps around without being a negative number\n inst = sepInst(core[perInd]); //this is used if addMode is indirect\n\n switch(addMode){\n\n case '*':\n num = num + getVar(perInd, inst[1]);\n break;\n\n case '@':\n if(inst[2] == null){\n num = num + getVar(perInd, inst[1]);\n }else{\n num = num + getVar(perInd, inst[2]);\n }//end ifelse\n break;\n\n default:\n break;\n }//end switch\n }//end try\n\n return num;\n }", "java.lang.String getField1186();", "String getFirstInt();", "public String getx()\n\t{\n\t\treturn x.getText();\n\t}", "java.lang.String getField1134();", "java.lang.String getField1129();", "java.lang.String getField1171();", "public String getSQLVariableAt(int pos) {\n\t\treturn sqlVariables[pos]; \n\t}", "java.lang.String getField1137();", "java.lang.String getField1156();", "java.lang.String getField1177();", "java.lang.String getField1143();", "public String getParameterFromX();", "java.lang.String getField1356();", "@Nullable\n PsiElement findExportedName(String name);", "java.lang.String getField1157();", "java.lang.String getField1135();", "java.lang.String getField1277();", "java.lang.String getField1237();", "java.lang.String getField1189();", "java.lang.String getField1106();", "private String getTypeVariableNamePrefix(String string)\r\n {\r\n string = string.trim();\r\n for (String typeVariableName : typeVariableNames)\r\n {\r\n if (string.equals(typeVariableName))\r\n {\r\n return typeVariableName;\r\n }\r\n if (string.startsWith(typeVariableName+\" \"))\r\n {\r\n return typeVariableName;\r\n }\r\n }\r\n return null;\r\n }", "String getDeclare();", "java.lang.String getField1286();", "java.lang.String getField1256();", "java.lang.String getField1109();", "java.lang.String getField1173();", "public String getJawabanBenar(int x){\n String jawaban = jawabanBenar[x];\n return jawaban;\n }", "java.lang.String getField1121();", "private GradsVariable findVar(Variable v2) {\n List<GradsVariable> vars = gradsDDF.getVariables();\n String varName = v2.getFullName();\n for (GradsVariable var : vars) {\n if (var.getName().equals(varName)) {\n return var;\n }\n }\n\n return null; // can't happen?\n }", "public static String get_import(String s)\n {\n read_if_needed_();\n \n return (String) _map_imports.get(s);\n \n }", "java.lang.String getField1178();", "java.lang.String getField1174();", "java.lang.String getField1233();", "java.lang.String getField1371();", "java.lang.String getField1133();", "java.lang.String getField1187();", "java.lang.String getField1176();", "java.lang.String getField1151();", "java.lang.String getField1243();", "java.lang.String getField1034();", "public Character fragmentar(String expresion, int x) {\n Character caracter = expresion.charAt(x);\r\n return caracter;\r\n }", "java.lang.String getField1756();", "public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }", "public int getTheXPosition(int x){\n\t\t\tif(x==5 || x==13 || x==21 || x==29){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(x==1 || x==9 || x==17 || x==25){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(x==6 || x==14 || x==22 || x==30){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\telse if(x==2 || x==10 || x==18 || x==26){\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(x==7 || x==15 || x==23 || x==31){\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\telse if(x==3 || x==11 || x==19 || x==27){\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t\telse if(x==8 || x==16 || x==24 || x==32){\n\t\t\t\treturn 6;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 7;\n\t\t\t}\t\t\n\t}", "java.lang.String getField1147();", "java.lang.String getField1138();", "java.lang.String getField1153();", "java.lang.String getField1172();", "private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }", "public String getPilihanJawaban2(int x){\n String jawaban2 = pilihanJawaban[x][1];\n return jawaban2;\n }", "java.lang.String getField1019();", "java.lang.String getField1112();", "java.lang.String getField1103();", "java.lang.String getField1771();", "java.lang.String getField1107();", "java.lang.String getField1131();", "java.lang.String getField1273();", "java.lang.String getField1126();", "java.lang.String getField1077();", "static String type(String sin){\n String s = new String();\n for(int c = 0; 0<sin.length();c++){\n if(sin.charAt(c)>='a'&&sin.charAt(c)<='z'){\n s+=\"variable\";\n }else if(sin.charAt(c)>='0'&&sin.charAt(c)<='0'){\n s+=\"Integer\";\n }\n }\n return s;\n }", "java.lang.String getField1141();", "java.lang.String getField1336();", "java.lang.String getField1159();", "java.lang.String getField1111();", "private String getExportPackage() {\n boolean hasSharedPackages = false;\n StringBuilder exportPackage = new StringBuilder();\n // XXX: Because of issue #1517, root package is returned more than once\n // I wrap packages in the LinkedHashSet, that elliminates duplicates \n // while retaining the insertion order. \n // (see https://github.com/ceylon/ceylon-compiler/issues/1517)\n for (Package pkg : new LinkedHashSet<>(module.getPackages())) {\n if (pkg.isShared()) {\n if (hasSharedPackages) {\n exportPackage.append(\";\");\n }\n exportPackage.append(pkg.getNameAsString());\n //TODO : should we analyze package uses as well?\n hasSharedPackages = true;\n }\n }\n if (hasSharedPackages) {\n // Ceylon has no separate versioning of packages, so all\n // packages implicitly inherit their respective module version\n exportPackage.append(\";version=\").append(module.getVersion());\n }\n return exportPackage.toString();\n }", "java.lang.String getField1270();", "java.lang.String getField1257();" ]
[ "0.57259333", "0.56370974", "0.5615063", "0.55286413", "0.55282164", "0.5411115", "0.5393505", "0.53167063", "0.53167063", "0.53167063", "0.5284504", "0.5272043", "0.52684635", "0.522583", "0.5180181", "0.51601183", "0.5117336", "0.5107552", "0.5106929", "0.51032794", "0.5096857", "0.5086583", "0.5056704", "0.5047493", "0.5033965", "0.50251055", "0.49942467", "0.49894202", "0.49879214", "0.49674994", "0.4954593", "0.49493596", "0.49246842", "0.49234393", "0.49201506", "0.4915382", "0.49091896", "0.48922774", "0.48917165", "0.4888311", "0.48844033", "0.48682895", "0.48625898", "0.4862314", "0.48446304", "0.48439622", "0.48424858", "0.48391455", "0.48252967", "0.48233506", "0.48203212", "0.48189205", "0.481543", "0.48149565", "0.48121193", "0.48120052", "0.4805296", "0.48028442", "0.48027954", "0.47967604", "0.47940055", "0.4793758", "0.47884113", "0.47884017", "0.4786733", "0.47805446", "0.4779102", "0.47780895", "0.47779885", "0.47732309", "0.4772567", "0.47724608", "0.47717202", "0.47715497", "0.47714636", "0.47700638", "0.47690153", "0.476828", "0.47678015", "0.47666582", "0.47655657", "0.47651285", "0.47632867", "0.47547764", "0.47543335", "0.4754094", "0.47537258", "0.4753558", "0.47509584", "0.47501653", "0.47491226", "0.47479585", "0.47475246", "0.4746755", "0.4746455", "0.47462407", "0.4745887", "0.47436166", "0.47434625", "0.47428212", "0.47385782" ]
0.0
-1
//finds the value of the second varaible including x and exports as a string
public static String find_b(String question) { int first_par = 0; int second_par = 0; int third_par = 0; int fourth_par = 0; String b = ""; first_par = question.indexOf("("); second_par = question.indexOf(")"); third_par = question.indexOf("(", second_par+1); fourth_par = question.indexOf(")", second_par+1); b = question.substring(third_par + 1,fourth_par); return b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int find_value(String b)\n {\n int store = 0;\n List<String> name = new ArrayList<String>(library.return_name());\n //System.out.println(name);\n for(int x = 0; x < name.size(); x++)\n {\n if(name.get(x).charAt(0) == b.charAt(0))\n store = x;\n }\n List<Integer> value = new ArrayList<Integer>(library.return_value());\n return value.get(store);\n }", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "String getVariable();", "public static int getX(){\n return \"3.1415\";\n }", "public String resolveVariableName(int slot, int l) {\n \t\treturn null;\n \t}", "String getSourceVariablePart();", "public String getPertanyaan(int x){\n String soal = pertanyaan[x];\n return soal;\n }", "private String getSymbolString(String key, String numsys) {\n String value = null;\n try {\n value = cldrFile.getWinningValue(\"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n if (value == null || value.length() < 1) {\n throw new RuntimeException();\n }\n return value;\n } catch (RuntimeException e) {\n throw new IllegalArgumentException(\"Illegal value <\" + value + \"> at \"\n + \"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n }\n }", "public String getPilihanJawaban2(int x){\n String jawaban2 = pilihanJawaban[x][1];\n return jawaban2;\n }", "private String getVar(String s)\n {\n String var = null;\n Pattern pattern = Pattern.compile(\"[A-Z]+[a-z]*\");\n Matcher matcher = pattern.matcher(s);\n if(matcher.find())\n {\n var = matcher.group(0);\n }\n return var;\n }", "java.lang.String getX();", "private GradsVariable findVar(Variable v2) {\n List<GradsVariable> vars = gradsDDF.getVariables();\n String varName = v2.getFullName();\n for (GradsVariable var : vars) {\n if (var.getName().equals(varName)) {\n return var;\n }\n }\n\n return null; // can't happen?\n }", "public String getVariable();", "private String resolveVars(String s, Module m, Call c)\n {\n HashMap<String,String> vars = getVarValues(m,c);\n // System.out.println(vars);\n s = groundVars(s, vars, c);\n return s;\n }", "String getVarName();", "String getVarName();", "String getVarName();", "private int findPos(String x) {\n\t int offset = 1;\n\t int currentPosition = myhash(x);\n\t \n\t while (array[currentPosition] != null && !array[currentPosition].element.getContent().equals(x)) {\n\t currentPosition += offset; // Compute ith probe\n\t offset += 2;\n\t if(currentPosition >= array.length)\n\t currentPosition -= array.length;\n\t }\n\t \n\t return currentPosition;\n\t }", "public String getPilihanJawaban1(int x){\n String jawaban1 = pilihanJawaban[x][0];\n return jawaban1;\n }", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CS1010\").get());\n }", "String getVarDeclare();", "private static String findVariable(final String value) {\n int start = value.lastIndexOf(\"${\");\n if (start >= 0) {\n start += 2;\n final int end = value.indexOf(\"}\", start);\n if (end >= 0) {\n return value.substring(start, end);\n }\n }\n return null;\n }", "public String getJawabanBenar(int x){\n String jawaban = jawabanBenar[x];\n return jawaban;\n }", "private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}", "String getTargetVariablePart();", "private static String getVariableForComboxColumn(String windowName2) {\n\r\n\t\tString variableName = \"\";\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tif(mp.IsCombobox())\r\n\t\t\tvariableName = variableName +\"public String [] \"+mp.getStartUpdataName()+\"Data;\\n\";\r\n\t\t}\r\n\t\treturn variableName;\r\n\t}", "public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }", "java.lang.String getField1071();", "public String getSymbol(int symbol, boolean uppercase) {\n\n //System.err.println(\"symbol = \" + symbol);\n if (symbol == 0) {\n return \"\";\n }\n\n if (symbol < 0) {\n return slexicinv.get(-symbol - 1);\n }\n\n // re-use strings\n if (symbol < MAX_CHARCACHE) {\n return uppercase? UPCHARCACHE[symbol] : CHARCACHE[symbol];\n }\n\n\n if (!uppercase) {\n return String.valueOf((char)symbol);\n } else {\n return String.valueOf(Character.toUpperCase((char)symbol));\n }\n }", "private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }", "private String getVariable(IInstallableUnit iu) {\n \t\tString v = (String) variables.get(iu);\n \t\tif (v == null) {\n \t\t\t//\t\t\tv = new String(\"x\" + (variables.size() + shift) + iu.toString()); //$NON-NLS-1$\n \t\t\tv = new String(\"x\" + (variables.size() + shift)); //$NON-NLS-1$\n \t\t\tvariables.put(iu, v);\n \t\t}\n \t\treturn v;\n \t}", "public static void main(String[] args) {\nint i=10;\nint j=20;\n\nString x=\"lionel\";\nString y=\"messi\";\n\nSystem.out.println(i+j);\nSystem.out.println(x+y);\nSystem.out.println(x+y+i);\nSystem.out.println(x+i+j);\nSystem.out.println(\"helloworld\");\nSystem.out.println(\"the value of i is:\"+i);\n\t}", "static void print() {\n\t\tSystem.out.println(\"Value of x1 = \" +x1);\n\t}", "String getVarName(String name);", "public String getx()\n\t{\n\t\treturn x.getText();\n\t}", "public static void main(String[] args) {\n\tint arr[]={4, 6, 1, 5, 8};\r\n\tint n = arr.length;\r\n\tint x = 1;\r\n\tString str = search(arr, n, x);\r\n\tSystem.out.println(str);\r\n\t}", "protected String getMyVarPath(String path){\n\t\treturn \"getVariableData('\"+VARNAME+\"', 'part1', '/nswomoxsd:receive/nswomoxsd:evt/\"+path+\"') \";\n\t}", "public Character fragmentar(String expresion, int x) {\n Character caracter = expresion.charAt(x);\r\n return caracter;\r\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "private String reg(SSAStatement s) {\n return registers[freeRegisters[s.getRegister()]];\n }", "static int strStr(String s, String x){\n return s.indexOf(x);\n }", "private String name(String module)\n {\n return module.split(\"%%\")[1];\n }", "public String location(int locx, int locy) {\n if ((WASTELEFT <= locx && locx < WASTERIGHT)\n && (WASTETOP <= locy && locy < WASTEBOTTOM)) {\n return \"waste\";\n }\n if ((STOCKLEFT <= locx && locx < STOCKRIGHT)\n && (RESERVETOP <= locy && locy < RESERVEBOTTOM)) {\n return \"reserve\";\n }\n if (RESERVETOP <= locy && locy < RESERVEBOTTOM) {\n if (FIRSTLEFT <= locx && locx < FIRSTRIGHT) {\n return \"f1\";\n }\n if (SECONDLEFT <= locx && locx < SECONDRIGHT) {\n return \"f2\";\n }\n if (THIRDLEFT <= locx && locx < THIRDRIGHT) {\n return \"f3\";\n }\n if (FOURTHLEFT <= locx && locx < FOURTHRIGHT) {\n return \"f4\";\n }\n }\n if ((FIRSTLEFT <= locx && locx < FIRSTRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(FIRSTPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t1\";\n }\n if ((SECONDLEFT <= locx && locx < SECONDRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(SECONDPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t2\";\n }\n if ((THIRDLEFT <= locx && locx < THIRDRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(THIRDPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t3\";\n }\n if ((FOURTHLEFT <= locx && locx < FOURTHRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(FOURTHPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t4\";\n }\n return \"\";\n }", "String getVariableDefinition();", "public int getTheXPosition(int x){\n\t\t\tif(x==5 || x==13 || x==21 || x==29){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(x==1 || x==9 || x==17 || x==25){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(x==6 || x==14 || x==22 || x==30){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\telse if(x==2 || x==10 || x==18 || x==26){\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(x==7 || x==15 || x==23 || x==31){\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\telse if(x==3 || x==11 || x==19 || x==27){\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t\telse if(x==8 || x==16 || x==24 || x==32){\n\t\t\t\treturn 6;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 7;\n\t\t\t}\t\t\n\t}", "private static String distributiva(String expr) {\n\t\tString r=\"\";\r\n\t\tfor (String s: distribuir(expr)){\r\n\t\t\tr+=s;\r\n\t\t}\r\n\t\t//System.out.println(r);\r\n\t\treturn r;\r\n\t}", "public static int getBukkitPosition(int x,int y){\n return ((y-1)*9)+x-1;\n }", "private static int getVar(int initInd, String var)throws Exception{\n int num;\n int perInd;\n char addMode;\n String[] inst;\n\n try{//tries to retrieve relative field\n num = Integer.parseInt(var);\n }catch(Exception e){//if not relative then seperates the address mode\n addMode = var.charAt(0);\n num = Integer.parseInt(var.substring(1, var.length()));\n perInd = (initInd + num) % coreSize; //this makes sure that the index wraps around without being a negative number\n inst = sepInst(core[perInd]); //this is used if addMode is indirect\n\n switch(addMode){\n\n case '*':\n num = num + getVar(perInd, inst[1]);\n break;\n\n case '@':\n if(inst[2] == null){\n num = num + getVar(perInd, inst[1]);\n }else{\n num = num + getVar(perInd, inst[2]);\n }//end ifelse\n break;\n\n default:\n break;\n }//end switch\n }//end try\n\n return num;\n }", "public Tuple2<String, Integer> call(String x)\n\t\t\t\t\t\t\tthrows Exception {\n\t\t\t\t\t\treturn new Tuple2(x, 1);\n\t\t\t\t\t}", "private String coords(int x, int y) {\n return String.format(\"%d,%d\", x, y);\n }", "public String getParameterFromX();", "private String getExportPackage() {\n boolean hasSharedPackages = false;\n StringBuilder exportPackage = new StringBuilder();\n // XXX: Because of issue #1517, root package is returned more than once\n // I wrap packages in the LinkedHashSet, that elliminates duplicates \n // while retaining the insertion order. \n // (see https://github.com/ceylon/ceylon-compiler/issues/1517)\n for (Package pkg : new LinkedHashSet<>(module.getPackages())) {\n if (pkg.isShared()) {\n if (hasSharedPackages) {\n exportPackage.append(\";\");\n }\n exportPackage.append(pkg.getNameAsString());\n //TODO : should we analyze package uses as well?\n hasSharedPackages = true;\n }\n }\n if (hasSharedPackages) {\n // Ceylon has no separate versioning of packages, so all\n // packages implicitly inherit their respective module version\n exportPackage.append(\";version=\").append(module.getVersion());\n }\n return exportPackage.toString();\n }", "public static String findSum2(int[] a, int x){\n\t\tMap<Integer, Integer> cache = new HashMap<Integer, Integer>();\r\n\t\tint delta;\r\n\t\tfor(int i = 0; i < a.length; i++) {\r\n\t\t\tdelta = x - a[i];\r\n\t\t\tif(cache.get(delta) != null) {\r\n\t\t\t\treturn delta + \" \" + a[i];\r\n\t\t\t}else{\r\n\t\t\t\tcache.put(a[i], delta);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"Not Found\";\r\n\t}", "public String variable()\n\t{\n\t\treturn _var;\n\t}", "java.lang.String getSymbolTuple();", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CFG1010\").get());\n\n // Test module with preclusions\n System.out.println(ModuleInfo.getFromModuleCode(\"GER1000\").get());\n\n // Test module with prerequisites\n System.out.println(ModuleInfo.getFromModuleCode(\"CS2040\").get());\n }", "@Nullable\n PsiElement findExportedName(String name);", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "public static String extractVariable(String s) {\n Matcher matcher = VARS_RE.matcher(s);\n return matcher.find() ? matcher.group(1) : null;\n }", "public String toString() {\n return \"<VariablePoint2: (\"+getX()+\", \"+getY()+\")>\";\n }", "String getSFunc();", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "public int get(int symbol);", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }", "public int getx() {\n return x;\n }", "java.lang.String getField1186();", "public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }", "public static void main(String[] args) {\n int value = 5;\n int ab= 0;\n int ac=0;\n int ad=0;\n int ae=0;\n int af=0;\n int ag=0;\n int am=0;\n int az=0;\n int x = 0;\n int y = 0;\n int z = 0;\n int a = 0;\n int b = 0;\n int c = 0;\n int d = 0;\n int e = 0;\n x= value%2;\n ab=value/2;\n y= ab % 2;\n ac = ab/2;\n z = ac % 2;\n ad= ac/2;\n a = ad % 2;\n ae = ad/2;\n b = ae % 2;\n af= ae/2;\n c = af % 2;\n ag= af/2;\n d= ag % 2;\n am=ag/2;\n e = am %2;\n\n System.out.println(e+\"\"+d+\"\"+c+\"\"+b+\"\"+a+\"\"+z+\"\"+y+\"\"+x);\n\n\n\n\n\n\n\n }", "private static void getMember() {\n\t\toutput(\"\");\r\n\t\tfor (member member : library.getMember()) {// variable name LIB to library and MEMBER to getMember()\r\n\t\t\toutput(member + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "private Value findDefVariable(CallGraph cg, Value value) {\n\t\tValue defV=null;\n\t\tfor(Iterator it = cg.sourceMethods(); it.hasNext();){\n\t\t\tSootMethod method =(SootMethod)it.next();\n\t\t\tExceptionalUnitGraph ug = new ExceptionalUnitGraph(method.getActiveBody());\n\t\t\t\n\t\t\tfor(Iterator ugIt = ug.iterator(); ugIt.hasNext();){\n\n\t\t\t\tUnit u = (Unit)ugIt.next();\n\t\t\t\tList<ValueBox> defBoxes = u.getDefBoxes();\n\t\t\t\tfor(ValueBox v : defBoxes){\n\t\t\t\t\tif(!v.getValue().toString().equals(value.toString())){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tList<ValueBox> uses = u.getUseBoxes();\n\t\t\t\t\tfor(ValueBox use: uses){\n\t\t\t\t\t\tValue newV = use.getValue();\n\t\t\t\t\t\tif(newV instanceof Local){\n\t\t\t\t\t\t\tdefV = findLocalVDef(method, newV);\n\t\t\t\t\t\t}else if(newV instanceof FieldRef){\n\t\t\t\t\t\t\tdefV = findLocalVDef(method, newV);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tdefV = newV;\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\t\n\t\t\t\n\t\t}\n\t\treturn defV;\n\t}", "public static String constantX(String gx) {\n\t\tgx = gx.replaceAll(\"\\\\s+\", \"\"); // remove all whitespaces\n\t\tif (gx.contains(\"*\"))\n\t\t\tif (gx.indexOf(\"*x\") > 0)\n\t\t\t\treturn gx.substring(0, gx.toLowerCase().indexOf(\"*x\"));\n\t\telse if (gx.indexOf(\"x\") > 0)\n\t\t\treturn gx.substring(0, gx.toLowerCase().indexOf(\"x\"));\n\t\telse if (!gx.contains(\"x\"))\n\t\t\treturn \"0\";\n\t\treturn \"1\";\n\t}", "java.lang.String getField1129();", "private String getReg ( String reg ) throws EVASyntaxException\r\n\t{\r\n\t\tString actual = reg;\r\n\t\tif ( reg.charAt(0) != '$' )\r\n\t\t{\r\n\t\t\t\t\t\tthrow ( new EVASyntaxException (\r\n\t\t\t\"Register must start with dollar sign\" ) );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//quitar el dolar\r\n\t\t\tactual = actual.substring(1,actual.length());\r\n\t\t}\r\n\t\tif ( actual.substring(0,2).equalsIgnoreCase(\"ra\") )\r\n\t\t{\r\n\t\t\treturn ra;\r\n\t\t}\r\n\t\telse if ( actual.charAt(0) == 'r' )\r\n\t\t{\r\n\t\t\t//quitar la r\r\n\t\t\tactual = actual.substring(1,actual.length());\r\n\t\t\t//a ve si es numero\r\n\t\t\tint regnum;\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tregnum = Integer.valueOf(actual).intValue();\r\n\t\t\t\treturn r[regnum];\r\n\t\t\t}\r\n\t\t\tcatch ( NumberFormatException NumExc )\r\n\t\t\t{\r\n\t\t\t\tthrow( new EVASyntaxException(\"Wrong register format\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( actual.charAt(0) == 'v' )\r\n\t\t{\r\n\t\t\t//quitar la v\r\n\t\t\tactual = actual.substring(1,actual.length());\r\n\t\t\t//a ve si es numero\r\n\t\t\tint regnum;\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tregnum = Integer.valueOf(actual).intValue();\r\n\t\t\t\treturn v[regnum];\r\n\t\t\t}\r\n\t\t\tcatch ( NumberFormatException NumExc )\r\n\t\t\t{\r\n\t\t\t\tthrow( new EVASyntaxException(\"Wrong register format\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( actual.charAt(0) == 'a' )\r\n\t\t{\r\n\t\t\t//quitar la r\r\n\t\t\tactual = actual.substring(1,actual.length());\r\n\t\t\t//a ve si es numero\r\n\t\t\tint regnum;\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tregnum = Integer.valueOf(actual).intValue();\r\n\t\t\t\treturn a[regnum];\r\n\t\t\t}\r\n\t\t\tcatch ( NumberFormatException NumExc )\r\n\t\t\t{\r\n\t\t\t\tthrow( new EVASyntaxException(\"Wrong register format\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( actual.substring(0,3).equalsIgnoreCase(\"exc\") )\r\n\t\t{\r\n\t\t\treturn exc;\r\n\t\t}\r\n\t\telse if ( actual.substring(0,3).equalsIgnoreCase(\"obj\") )\r\n\t\t{\r\n\t\t\treturn obj;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow( new EVASyntaxException(\"Wrong register format\"));\r\n\t\t}\r\n\t}", "@Override\n public double value(double x) {\n myParser.addVariable(variable, x);\n double eval = myParser.getValue();\n return eval;\n }", "public static int mainQuery(String x) {\n\t\tif (x.equalsIgnoreCase(\"EXIT\") == true) return 1;\n\t\tif (x.equalsIgnoreCase(\"STU\") == true) return 2;\n\t\tif (x.equalsIgnoreCase(\"FAC\") == true) return 3;\n\t\treturn 0;\n\t}", "org.apache.xmlbeans.XmlString xgetSystem();", "java.lang.String getField1171();", "public String retU(int x)\n\t{\n\t\treturn answers[x];\t\n\t}", "java.lang.String getField1286();", "static String type(String sin){\n String s = new String();\n for(int c = 0; 0<sin.length();c++){\n if(sin.charAt(c)>='a'&&sin.charAt(c)<='z'){\n s+=\"variable\";\n }else if(sin.charAt(c)>='0'&&sin.charAt(c)<='0'){\n s+=\"Integer\";\n }\n }\n return s;\n }", "NobaseValue findRequiresValue(NobaseFile forfile,String nm)\n{\n NobaseFile result = forfile.getProject().findRequiresFile(forfile,nm);\n if (result == null) return null;\n NobaseValue nv = export_map.get(result);\n if (nv == null) {\n for_project.buildIfNeeded(result);\n nv = export_map.get(result);\n }\n return nv;\n}", "public String toString() {\r\n return this.variable;\r\n }", "String getOutputName();", "private void GetPByActionValue(HttpServletRequest request, HttpServletResponse response) throws IOException, NumberFormatException {\n String fullClassPath = request.getParameter(\"fullClassPath\");\n String indexStr = request.getParameter(\"index\");\n String type = request.getParameter(\"type\");\n int ElementIndex = Integer.parseInt(indexStr);\n\n String result = XMLTree.getInstance().getPValuesByActionValue(fullClassPath, ElementIndex, type);\n response.getWriter().write(result);\n }", "public String nombreReporte (String sidx, boolean dia_actual) {\n int idx = Integer.parseInt(sidx);\n switch (idx) {\n case 1: \n if (dia_actual) { return \"reporte_PuntosControl_GPS:REPORTE DE PUNTOS DE CONTROL\"; }\n else { return \"reporte_PuntosControl:REPORTE DE PUNTOS DE CONTROL\"; }\n case 2: return \"reporte_ProduccionXVehiculo:REPORTE DE PRODUCCIÓN POR VEHÍCULO\";\n case 3: return \"reporte_RutaXVehiculoDph:REPORTE DE RUTA POR VEHÍCULO\";\n case 4: return \"reporte_AlarmasXVehiculo:REPORTE DE ALARMAS POR VEHÍCULO\";\n case 5: return \"reporte_NivelOcupacion:REPORTE NIVEL OCUPACIÓN\";\n case 6: return \"reporte_Perimetro:REPORTE CONTEOS EN PERÍMETRO POR VEHÍCULO\";\n case 7: return \"reporte_ConsolidadoEmpresa:REPORTE CONSOLIDADO POR EMPRESA\";\n case 8: return \"reporte_ComparacionProduccionRuta: REPORTE COMPARATIVO DE PRODUCCIÓN POR RUTA\"; \n case 9: return \"reporte_ProduccionXRuta:REPORTE DE PRODUCCIÓN POR RUTA\";\n case 11: return \"reporte_VehiculosXRutaDph:REPORTE DE VEHÍCULOS POR RUTA\";\n case 12: return \"reporte_VehiculosXAlarma:REPORTE DE VEHÍCULOS POR ALARMA\";\n case 13: return \"reporte_Estadisticas:REPORTE ESTADÍSTICO\";\n case 14: return \"reporte_DescripcionRuta:REPORTE DESCRIPCIÓN RUTA\"; \n case 15: return \"reporte_Gerencia2:REPORTE GERENCIA\";\n case 16: return \"\";\n case 17: return \"reporte_Propietario:REPORTE PROPIETARIO\";\n case 18: return \"reporte_GerenciaXVehiculo:REPORTE GERENCIA POR VEHICULO\";\n case 19: return \"reporte_ConsolidadoLiquidacion:REPORTE CONSOLIDADO DE LIQUIDACIÓN\";\n case 20: return \"reporte_ConsolidadoVehiculosNoLiquidados:RESUMEN DE VEHÍCULOS NO LIQUIDADOS\"; \n case 21: return \"reporte_LiquidacionXLiquidador:REPORTE LIQUIDACIÓN POR LIQUIDADOR\";\n case 22: return \"reporte_IndicePasajerosXKilometro:REPORTE ÍNDICE PASAJEROS POR KILÓMETRO\";\n case 23: return \"reporte_ConsolidadoRutas:CONSOLIDADO DE RUTAS\";\n case 24: return \"reporte_CumplimientoRutaXVehiculo:CUMPLIMIENTO DE RUTA POR VEHÍCULO\";\n case 25: return \"reporte_CumplimientoRutaXConductor:CUMPLIMIENTO DE RUTA POR CONDUCTOR\";\n case 26: return \"reporte_ConsolidadoDespachoFmt:REPORTE CONSOLIDADO DESPACHO\";\n case 27: case 28: \n case 29: return \"reporte_IncumplimientoPuntoXRuta:REPORTE INCUMPLIMIENTO PUNTOS POR RUTA\";\n case 30: return \"reporte_calificacionConductor:REPORTE CALIFICACION DE CONDUCTOR\";\n case 35: return \"reporte_CategoriasDescuentaPasajeros:REPORTE CATEGORIAS POR PASAJEROS\";\n case 31: return \"reporte_ProductividadPorHora:REPORTE CONSOLIDADO PRODUCTIVIDAD POR HORA\";\n default: return null;\n }\n }", "java.lang.String getField1106();", "public int getX1(){return x1;}", "static int type_of_xra(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}", "java.lang.String getField1156();", "public int Getx(){\n\t\treturn x;\n\t}", "java.lang.String getField1112();", "Node getVariable();", "public void printInfo(){\n System.out.println(\" this is my y \"+(y+1)+\" this is my x \"+ X.valueOfInt(x));\n System.out.println(\"i am full: \"+ isFull);\n }", "java.lang.String getField1122();", "java.lang.String getVarValue();", "public Field findFieldByPosition(char x, int y) {\n int field_x = x - 'a' + 1;\n return fields[field_x][y];\n }", "java.lang.String getField1256();", "public static void main(String[] args) { \n\t\tString strOrig =\"Hello world,Hello Reader\";\n\t int lastIndex = strOrig.lastIndexOf(\"x\");\n\t \n\t if(lastIndex == - 1){\n\t System.out.println(\"Not found\");\n\t } else {\n\t System.out.println(\"Last occurrence of Hello is at index \"+ lastIndex);\n\t }\n\t\t\n\t}", "public String symbolAtPosition ( int position )\n {\n String s = null;\n for ( LeafNode current : this.regexNode.getTokenNodes () )\n {\n if ( current.getPosition () == position )\n {\n s = current.getNodeString ().toString ();\n }\n }\n return s;\n }", "java.lang.String getField1356();", "java.lang.String getField1109();" ]
[ "0.5840773", "0.5467582", "0.54464066", "0.5353931", "0.5295838", "0.5248858", "0.5212492", "0.52095336", "0.5200376", "0.5167568", "0.5153029", "0.51099896", "0.5101984", "0.50757104", "0.50394756", "0.50394756", "0.50394756", "0.5031007", "0.5030517", "0.500802", "0.5006647", "0.4997766", "0.49655315", "0.49546114", "0.4943171", "0.4942463", "0.4939141", "0.4936404", "0.49267456", "0.4924071", "0.4923497", "0.49193615", "0.48932633", "0.48835006", "0.4862551", "0.48415795", "0.48401433", "0.48400307", "0.4839295", "0.48341295", "0.48329216", "0.47944236", "0.4779886", "0.47752813", "0.4771052", "0.47669715", "0.47492325", "0.47483608", "0.47479814", "0.4741179", "0.47343668", "0.47309086", "0.4724237", "0.4712121", "0.47082695", "0.4704778", "0.46961012", "0.4681126", "0.46761823", "0.46627662", "0.46618143", "0.4656421", "0.46539184", "0.46298838", "0.4628625", "0.46270022", "0.46230608", "0.46214902", "0.46116534", "0.45993906", "0.45970753", "0.45958912", "0.4593689", "0.4590108", "0.45889258", "0.4577204", "0.45743892", "0.45734254", "0.4570215", "0.45665526", "0.4566376", "0.4566203", "0.45649934", "0.45626", "0.4556686", "0.4554706", "0.45480064", "0.45460102", "0.45454845", "0.45429453", "0.4538806", "0.45385686", "0.4534707", "0.45341754", "0.45336923", "0.45329118", "0.4526114", "0.4524175", "0.4523762", "0.4519445", "0.45189682" ]
0.0
-1
//finds the value of the first varaible not including x and exports as a string
public static int find_a_num(String question) { int first_par = 0; int second_par = 0; int a; first_par = question.indexOf("("); second_par = question.indexOf("x"); a = Integer.parseInt(question.substring(first_par+1,second_par)); return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getVar(String s)\n {\n String var = null;\n Pattern pattern = Pattern.compile(\"[A-Z]+[a-z]*\");\n Matcher matcher = pattern.matcher(s);\n if(matcher.find())\n {\n var = matcher.group(0);\n }\n return var;\n }", "String getSourceVariablePart();", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "public String resolveVariableName(int slot, int l) {\n \t\treturn null;\n \t}", "String getVariable();", "private static int find_value(String b)\n {\n int store = 0;\n List<String> name = new ArrayList<String>(library.return_name());\n //System.out.println(name);\n for(int x = 0; x < name.size(); x++)\n {\n if(name.get(x).charAt(0) == b.charAt(0))\n store = x;\n }\n List<Integer> value = new ArrayList<Integer>(library.return_value());\n return value.get(store);\n }", "private static String findVariable(final String value) {\n int start = value.lastIndexOf(\"${\");\n if (start >= 0) {\n start += 2;\n final int end = value.indexOf(\"}\", start);\n if (end >= 0) {\n return value.substring(start, end);\n }\n }\n return null;\n }", "java.lang.String getX();", "String getVarName();", "String getVarName();", "String getVarName();", "public static String extractVariable(String s) {\n Matcher matcher = VARS_RE.matcher(s);\n return matcher.find() ? matcher.group(1) : null;\n }", "String getVarName(String name);", "public String getPertanyaan(int x){\n String soal = pertanyaan[x];\n return soal;\n }", "private int findPos(String x) {\n\t int offset = 1;\n\t int currentPosition = myhash(x);\n\t \n\t while (array[currentPosition] != null && !array[currentPosition].element.getContent().equals(x)) {\n\t currentPosition += offset; // Compute ith probe\n\t offset += 2;\n\t if(currentPosition >= array.length)\n\t currentPosition -= array.length;\n\t }\n\t \n\t return currentPosition;\n\t }", "public String getVariable();", "private String name(String module)\n {\n return module.split(\"%%\")[1];\n }", "String getVarDeclare();", "private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}", "private String getTypeVariableNamePrefix(String string)\r\n {\r\n string = string.trim();\r\n for (String typeVariableName : typeVariableNames)\r\n {\r\n if (string.equals(typeVariableName))\r\n {\r\n return typeVariableName;\r\n }\r\n if (string.startsWith(typeVariableName+\" \"))\r\n {\r\n return typeVariableName;\r\n }\r\n }\r\n return null;\r\n }", "public static String constantX(String gx) {\n\t\tgx = gx.replaceAll(\"\\\\s+\", \"\"); // remove all whitespaces\n\t\tif (gx.contains(\"*\"))\n\t\t\tif (gx.indexOf(\"*x\") > 0)\n\t\t\t\treturn gx.substring(0, gx.toLowerCase().indexOf(\"*x\"));\n\t\telse if (gx.indexOf(\"x\") > 0)\n\t\t\treturn gx.substring(0, gx.toLowerCase().indexOf(\"x\"));\n\t\telse if (!gx.contains(\"x\"))\n\t\t\treturn \"0\";\n\t\treturn \"1\";\n\t}", "@Nullable\n PsiElement findExportedName(String name);", "public Character fragmentar(String expresion, int x) {\n Character caracter = expresion.charAt(x);\r\n return caracter;\r\n }", "private String getVariable(IInstallableUnit iu) {\n \t\tString v = (String) variables.get(iu);\n \t\tif (v == null) {\n \t\t\t//\t\t\tv = new String(\"x\" + (variables.size() + shift) + iu.toString()); //$NON-NLS-1$\n \t\t\tv = new String(\"x\" + (variables.size() + shift)); //$NON-NLS-1$\n \t\t\tvariables.put(iu, v);\n \t\t}\n \t\treturn v;\n \t}", "String getTargetVariablePart();", "protected String getRequiredVariable(Node node, int idx, String argumentName)\n {\n String var = getRequiredLiteral(node, idx, argumentName);\n return var == null ? null : var.substring(1);\n }", "public String getJawabanBenar(int x){\n String jawaban = jawabanBenar[x];\n return jawaban;\n }", "private String resolveVars(String s, Module m, Call c)\n {\n HashMap<String,String> vars = getVarValues(m,c);\n // System.out.println(vars);\n s = groundVars(s, vars, c);\n return s;\n }", "private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }", "public static int getX(){\n return \"3.1415\";\n }", "static int strStr(String s, String x){\n return s.indexOf(x);\n }", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }", "public Variable getPrefixed(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName, ssaNum);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName, ssaNum);\t\t\n\t\treturn v;\n\t}", "private String findXID(String s) {\n\t\tint firstP = s.indexOf(\"(\");\n\t\tint lastP = s.indexOf(\")\");\n\n\t\treturn s.substring(firstP + 1, lastP);\n\t}", "java.lang.String getField1071();", "public String getx()\n\t{\n\t\treturn x.getText();\n\t}", "void removeGssExportedName(int i);", "private String getSymbolString(String key, String numsys) {\n String value = null;\n try {\n value = cldrFile.getWinningValue(\"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n if (value == null || value.length() < 1) {\n throw new RuntimeException();\n }\n return value;\n } catch (RuntimeException e) {\n throw new IllegalArgumentException(\"Illegal value <\" + value + \"> at \"\n + \"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n }\n }", "java.lang.String getField1134();", "String getFirst(int n);", "public String getPilihanJawaban1(int x){\n String jawaban1 = pilihanJawaban[x][0];\n return jawaban1;\n }", "java.lang.String getField1186();", "public String withoutX(String str) {\r\n if (str.length() > 0 && str.charAt(0) == 'x') {\r\n str = str.substring(1);\r\n }\r\n\r\n if (str.length() > 0 && str.charAt(str.length() - 1) == 'x') {\r\n str = str.substring(0, str.length() - 1);\r\n }\r\n return str;\r\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "public String getParameterFromX();", "java.lang.String getField1256();", "void yylexdebug(int state,int ch)\n{\nString s=null;\n if (ch < 0) ch=0;\n if (ch <= YYMAXTOKEN) //check index bounds\n s = yyname[ch]; //now get it\n if (s==null)\n s = \"illegal-symbol\";\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\n}", "void yylexdebug(int state,int ch)\n{\nString s=null;\n if (ch < 0) ch=0;\n if (ch <= YYMAXTOKEN) //check index bounds\n s = yyname[ch]; //now get it\n if (s==null)\n s = \"illegal-symbol\";\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\n}", "java.lang.String getField1356();", "java.lang.String getField1286();", "String getFirstInt();", "public static String get_import(String s)\n {\n read_if_needed_();\n \n return (String) _map_imports.get(s);\n \n }", "private String reg(SSAStatement s) {\n return registers[freeRegisters[s.getRegister()]];\n }", "public int getTheXPosition(int x){\n\t\t\tif(x==5 || x==13 || x==21 || x==29){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(x==1 || x==9 || x==17 || x==25){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(x==6 || x==14 || x==22 || x==30){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\telse if(x==2 || x==10 || x==18 || x==26){\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(x==7 || x==15 || x==23 || x==31){\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\telse if(x==3 || x==11 || x==19 || x==27){\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t\telse if(x==8 || x==16 || x==24 || x==32){\n\t\t\t\treturn 6;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 7;\n\t\t\t}\t\t\n\t}", "java.lang.String getField1129();", "java.lang.String getField1156();", "private String[] parseVariableModName(String aName) {\n String[] lNameArray = new String[2];\n int lBeginIndex = aName.lastIndexOf('(');\n if (lBeginIndex > 0) {\n int lEndIndex = aName.lastIndexOf(')');\n lNameArray[0] = aName.substring(0, (lBeginIndex));\n lNameArray[1] = aName.substring(lBeginIndex + 1, lEndIndex);\n } else {\n lNameArray[0] = aName;\n lNameArray[1] = null;\n }\n return lNameArray;\n }", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CS1010\").get());\n }", "public static String valueOf(Object x) {\n return x == null ? \"null\" : x.toString();\n }", "public static void main(String[] args) { \n\t\tString strOrig =\"Hello world,Hello Reader\";\n\t int lastIndex = strOrig.lastIndexOf(\"x\");\n\t \n\t if(lastIndex == - 1){\n\t System.out.println(\"Not found\");\n\t } else {\n\t System.out.println(\"Last occurrence of Hello is at index \"+ lastIndex);\n\t }\n\t\t\n\t}", "java.lang.String getField1277();", "public static int mainQuery(String x) {\n\t\tif (x.equalsIgnoreCase(\"EXIT\") == true) return 1;\n\t\tif (x.equalsIgnoreCase(\"STU\") == true) return 2;\n\t\tif (x.equalsIgnoreCase(\"FAC\") == true) return 3;\n\t\treturn 0;\n\t}", "java.lang.String getField1177();", "java.lang.String getField1135();", "private static String findNumber() {\n\t\treturn null;\r\n\t}", "java.lang.String getField1189();", "private String getExportPackage() {\n boolean hasSharedPackages = false;\n StringBuilder exportPackage = new StringBuilder();\n // XXX: Because of issue #1517, root package is returned more than once\n // I wrap packages in the LinkedHashSet, that elliminates duplicates \n // while retaining the insertion order. \n // (see https://github.com/ceylon/ceylon-compiler/issues/1517)\n for (Package pkg : new LinkedHashSet<>(module.getPackages())) {\n if (pkg.isShared()) {\n if (hasSharedPackages) {\n exportPackage.append(\";\");\n }\n exportPackage.append(pkg.getNameAsString());\n //TODO : should we analyze package uses as well?\n hasSharedPackages = true;\n }\n }\n if (hasSharedPackages) {\n // Ceylon has no separate versioning of packages, so all\n // packages implicitly inherit their respective module version\n exportPackage.append(\";version=\").append(module.getVersion());\n }\n return exportPackage.toString();\n }", "java.lang.String getField1237();", "void yylexdebug(int state,int ch)\r\n{\r\nString s=null;\r\n if (ch < 0) ch=0;\r\n if (ch <= YYMAXTOKEN) //check index bounds\r\n s = yyname[ch]; //now get it\r\n if (s==null)\r\n s = \"illegal-symbol\";\r\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\r\n}", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "String getVariableDefinition();", "java.lang.String getField1143();", "java.lang.String getField1137();", "public String getParameterName(int index) {\n List<? extends VariableElement> parameters = executable.getParameters();\n String name = parameters.get(index).getSimpleName().toString();\n return name;\n }", "java.lang.String getField1034();", "public String variable()\n\t{\n\t\treturn _var;\n\t}", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "private static int getVar(int initInd, String var)throws Exception{\n int num;\n int perInd;\n char addMode;\n String[] inst;\n\n try{//tries to retrieve relative field\n num = Integer.parseInt(var);\n }catch(Exception e){//if not relative then seperates the address mode\n addMode = var.charAt(0);\n num = Integer.parseInt(var.substring(1, var.length()));\n perInd = (initInd + num) % coreSize; //this makes sure that the index wraps around without being a negative number\n inst = sepInst(core[perInd]); //this is used if addMode is indirect\n\n switch(addMode){\n\n case '*':\n num = num + getVar(perInd, inst[1]);\n break;\n\n case '@':\n if(inst[2] == null){\n num = num + getVar(perInd, inst[1]);\n }else{\n num = num + getVar(perInd, inst[2]);\n }//end ifelse\n break;\n\n default:\n break;\n }//end switch\n }//end try\n\n return num;\n }", "String getSFunc();", "private static String removeSharp(String x) {\n\t\treturn (x.indexOf(\"#\") != -1 && x.lastIndexOf(\"#\") < x.length()) ? x.substring(x.lastIndexOf(\"#\") + 1) : x;\n\t}", "java.lang.String getField1171();", "java.lang.String getField1157();", "public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }", "public final String toStringX() {\n return this.decompile(Descriptor.P_STMT, new StringBuilder(1024), Descriptor.DECO_STRX).toString();\n }", "java.lang.String getField1756();", "java.lang.String getField1243();", "java.lang.String getField1289();", "java.lang.String getField1235();", "java.lang.String getField1233();", "private char[] hideTheWord(int x){\r\n char[] c = new char[x];\r\n for (int i = 0; i < x; i++){\r\n c[i]= '_';\r\n }\r\n return c;\r\n }", "private static String distributiva(String expr) {\n\t\tString r=\"\";\r\n\t\tfor (String s: distribuir(expr)){\r\n\t\t\tr+=s;\r\n\t\t}\r\n\t\t//System.out.println(r);\r\n\t\treturn r;\r\n\t}", "java.lang.String getField1178();", "@Override\n public boolean visit(JsVar x, JsContext<JsVar> ctx) {\n return !(x.getName().getIdent().startsWith(PREFIX));\n }", "java.lang.String getField1153();", "java.lang.String getField1187();", "java.lang.String getField1176();", "java.lang.String getField1142();", "java.lang.String getField1173();", "java.lang.String getField1112();", "java.lang.String getField1278();", "java.lang.String getField1786();" ]
[ "0.55687076", "0.55011207", "0.5432444", "0.5406583", "0.5326074", "0.52694786", "0.52407926", "0.5224551", "0.51834553", "0.51834553", "0.51834553", "0.51755565", "0.5070601", "0.5055603", "0.50362986", "0.5019124", "0.4999355", "0.4999209", "0.4958965", "0.49399137", "0.49354646", "0.49351302", "0.49209088", "0.49158752", "0.4909845", "0.4896506", "0.48686847", "0.48580986", "0.48568803", "0.48337978", "0.4831809", "0.48317295", "0.48293003", "0.48170337", "0.48125136", "0.48122442", "0.4809517", "0.47985798", "0.47749263", "0.47527388", "0.4747515", "0.47465518", "0.47439322", "0.47419196", "0.47390285", "0.4732417", "0.47300637", "0.47300637", "0.47263348", "0.47151652", "0.4714526", "0.4712794", "0.47096694", "0.47090375", "0.4708367", "0.4703572", "0.4699992", "0.4699608", "0.46992135", "0.46986052", "0.4698068", "0.4693148", "0.46909124", "0.46789804", "0.46729487", "0.46723434", "0.46716806", "0.46715695", "0.46682316", "0.46678507", "0.4665913", "0.46649665", "0.46620145", "0.466034", "0.46578422", "0.46571723", "0.46538675", "0.4649073", "0.46450108", "0.4644922", "0.4642373", "0.4635118", "0.46347868", "0.4634132", "0.46337608", "0.4627998", "0.4627284", "0.46272242", "0.4621971", "0.4615336", "0.46105656", "0.46062005", "0.46056268", "0.4604983", "0.4602058", "0.45999682", "0.45978805", "0.4596877", "0.4596035", "0.45929608", "0.45927617" ]
0.0
-1
//finds the value of the second varaible not including x and exports as a string
public static int find_b_num(String question) { int first_par = 0; int second_par = 0; int third_par = 0; int fourth_par = 0; int b; first_par = question.indexOf("("); second_par = question.indexOf("x"); third_par = question.indexOf("(", second_par+1); fourth_par = question.indexOf("x", second_par+1); b = Integer.parseInt(question.substring(third_par + 1,fourth_par)); return b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int find_value(String b)\n {\n int store = 0;\n List<String> name = new ArrayList<String>(library.return_name());\n //System.out.println(name);\n for(int x = 0; x < name.size(); x++)\n {\n if(name.get(x).charAt(0) == b.charAt(0))\n store = x;\n }\n List<Integer> value = new ArrayList<Integer>(library.return_value());\n return value.get(store);\n }", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "String getSourceVariablePart();", "public static int getX(){\n return \"3.1415\";\n }", "public String getPertanyaan(int x){\n String soal = pertanyaan[x];\n return soal;\n }", "public String resolveVariableName(int slot, int l) {\n \t\treturn null;\n \t}", "String getVariable();", "java.lang.String getX();", "public String getJawabanBenar(int x){\n String jawaban = jawabanBenar[x];\n return jawaban;\n }", "private String getVar(String s)\n {\n String var = null;\n Pattern pattern = Pattern.compile(\"[A-Z]+[a-z]*\");\n Matcher matcher = pattern.matcher(s);\n if(matcher.find())\n {\n var = matcher.group(0);\n }\n return var;\n }", "public String getPilihanJawaban2(int x){\n String jawaban2 = pilihanJawaban[x][1];\n return jawaban2;\n }", "public Character fragmentar(String expresion, int x) {\n Character caracter = expresion.charAt(x);\r\n return caracter;\r\n }", "private String getSymbolString(String key, String numsys) {\n String value = null;\n try {\n value = cldrFile.getWinningValue(\"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n if (value == null || value.length() < 1) {\n throw new RuntimeException();\n }\n return value;\n } catch (RuntimeException e) {\n throw new IllegalArgumentException(\"Illegal value <\" + value + \"> at \"\n + \"//ldml/numbers/symbols[@numberSystem='\" + numsys + \"']/\" + key);\n }\n }", "static int strStr(String s, String x){\n return s.indexOf(x);\n }", "private int findPos(String x) {\n\t int offset = 1;\n\t int currentPosition = myhash(x);\n\t \n\t while (array[currentPosition] != null && !array[currentPosition].element.getContent().equals(x)) {\n\t currentPosition += offset; // Compute ith probe\n\t offset += 2;\n\t if(currentPosition >= array.length)\n\t currentPosition -= array.length;\n\t }\n\t \n\t return currentPosition;\n\t }", "public String withoutX2(String str) {\r\n if (str.length() == 1 && str.charAt(0) == 'x') {\r\n return \"\";\r\n }\r\n if (str.length() >= 2) {\r\n if (str.charAt(0) == 'x' && str.charAt(1) != 'x') {\r\n return str.substring(1);\r\n } else if (str.charAt(0) != 'x' && str.charAt(1) == 'x') {\r\n return str.charAt(0) + str.substring(2);\r\n } else if (str.charAt(0) == 'x') {\r\n return str.substring(2);\r\n }\r\n }\r\n return str;\r\n }", "public Tuple2<String, Integer> call(String x)\n\t\t\t\t\t\t\tthrows Exception {\n\t\t\t\t\t\treturn new Tuple2(x, 1);\n\t\t\t\t\t}", "public String getPilihanJawaban1(int x){\n String jawaban1 = pilihanJawaban[x][0];\n return jawaban1;\n }", "public static String constantX(String gx) {\n\t\tgx = gx.replaceAll(\"\\\\s+\", \"\"); // remove all whitespaces\n\t\tif (gx.contains(\"*\"))\n\t\t\tif (gx.indexOf(\"*x\") > 0)\n\t\t\t\treturn gx.substring(0, gx.toLowerCase().indexOf(\"*x\"));\n\t\telse if (gx.indexOf(\"x\") > 0)\n\t\t\treturn gx.substring(0, gx.toLowerCase().indexOf(\"x\"));\n\t\telse if (!gx.contains(\"x\"))\n\t\t\treturn \"0\";\n\t\treturn \"1\";\n\t}", "String getVarName();", "String getVarName();", "String getVarName();", "public String retU(int x)\n\t{\n\t\treturn answers[x];\t\n\t}", "public String getVariable();", "private static String findVariable(final String value) {\n int start = value.lastIndexOf(\"${\");\n if (start >= 0) {\n start += 2;\n final int end = value.indexOf(\"}\", start);\n if (end >= 0) {\n return value.substring(start, end);\n }\n }\n return null;\n }", "String getTargetVariablePart();", "public String getx()\n\t{\n\t\treturn x.getText();\n\t}", "public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }", "private static String distributiva(String expr) {\n\t\tString r=\"\";\r\n\t\tfor (String s: distribuir(expr)){\r\n\t\t\tr+=s;\r\n\t\t}\r\n\t\t//System.out.println(r);\r\n\t\treturn r;\r\n\t}", "private String resolveVars(String s, Module m, Call c)\n {\n HashMap<String,String> vars = getVarValues(m,c);\n // System.out.println(vars);\n s = groundVars(s, vars, c);\n return s;\n }", "private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}", "private String name(String module)\n {\n return module.split(\"%%\")[1];\n }", "public static void main(String[] args) {\n\tint arr[]={4, 6, 1, 5, 8};\r\n\tint n = arr.length;\r\n\tint x = 1;\r\n\tString str = search(arr, n, x);\r\n\tSystem.out.println(str);\r\n\t}", "private String getVariable(IInstallableUnit iu) {\n \t\tString v = (String) variables.get(iu);\n \t\tif (v == null) {\n \t\t\t//\t\t\tv = new String(\"x\" + (variables.size() + shift) + iu.toString()); //$NON-NLS-1$\n \t\t\tv = new String(\"x\" + (variables.size() + shift)); //$NON-NLS-1$\n \t\t\tvariables.put(iu, v);\n \t\t}\n \t\treturn v;\n \t}", "private char[] hideTheWord(int x){\r\n char[] c = new char[x];\r\n for (int i = 0; i < x; i++){\r\n c[i]= '_';\r\n }\r\n return c;\r\n }", "public String withoutX(String str) {\r\n if (str.length() > 0 && str.charAt(0) == 'x') {\r\n str = str.substring(1);\r\n }\r\n\r\n if (str.length() > 0 && str.charAt(str.length() - 1) == 'x') {\r\n str = str.substring(0, str.length() - 1);\r\n }\r\n return str;\r\n }", "String getVarName(String name);", "public static void main(String[] args) { \n\t\tString strOrig =\"Hello world,Hello Reader\";\n\t int lastIndex = strOrig.lastIndexOf(\"x\");\n\t \n\t if(lastIndex == - 1){\n\t System.out.println(\"Not found\");\n\t } else {\n\t System.out.println(\"Last occurrence of Hello is at index \"+ lastIndex);\n\t }\n\t\t\n\t}", "public String getSymbol(int symbol, boolean uppercase) {\n\n //System.err.println(\"symbol = \" + symbol);\n if (symbol == 0) {\n return \"\";\n }\n\n if (symbol < 0) {\n return slexicinv.get(-symbol - 1);\n }\n\n // re-use strings\n if (symbol < MAX_CHARCACHE) {\n return uppercase? UPCHARCACHE[symbol] : CHARCACHE[symbol];\n }\n\n\n if (!uppercase) {\n return String.valueOf((char)symbol);\n } else {\n return String.valueOf(Character.toUpperCase((char)symbol));\n }\n }", "private GradsVariable findVar(Variable v2) {\n List<GradsVariable> vars = gradsDDF.getVariables();\n String varName = v2.getFullName();\n for (GradsVariable var : vars) {\n if (var.getName().equals(varName)) {\n return var;\n }\n }\n\n return null; // can't happen?\n }", "public String getParameterFromX();", "@Nullable\n PsiElement findExportedName(String name);", "String getVarDeclare();", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }", "protected String getRequiredVariable(Node node, int idx, String argumentName)\n {\n String var = getRequiredLiteral(node, idx, argumentName);\n return var == null ? null : var.substring(1);\n }", "public int getx() {\n return x;\n }", "public int getTheXPosition(int x){\n\t\t\tif(x==5 || x==13 || x==21 || x==29){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(x==1 || x==9 || x==17 || x==25){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(x==6 || x==14 || x==22 || x==30){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\telse if(x==2 || x==10 || x==18 || x==26){\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(x==7 || x==15 || x==23 || x==31){\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\telse if(x==3 || x==11 || x==19 || x==27){\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t\telse if(x==8 || x==16 || x==24 || x==32){\n\t\t\t\treturn 6;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 7;\n\t\t\t}\t\t\n\t}", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "static void print() {\n\t\tSystem.out.println(\"Value of x1 = \" +x1);\n\t}", "public static void main(String[] args) {\nint i=10;\nint j=20;\n\nString x=\"lionel\";\nString y=\"messi\";\n\nSystem.out.println(i+j);\nSystem.out.println(x+y);\nSystem.out.println(x+y+i);\nSystem.out.println(x+i+j);\nSystem.out.println(\"helloworld\");\nSystem.out.println(\"the value of i is:\"+i);\n\t}", "String getSFunc();", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"axdxxxx\";\n\t\tSystem.out.println(removeX(str));\n\n\t}", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CS1010\").get());\n }", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "public static String extractVariable(String s) {\n Matcher matcher = VARS_RE.matcher(s);\n return matcher.find() ? matcher.group(1) : null;\n }", "public static int mainQuery(String x) {\n\t\tif (x.equalsIgnoreCase(\"EXIT\") == true) return 1;\n\t\tif (x.equalsIgnoreCase(\"STU\") == true) return 2;\n\t\tif (x.equalsIgnoreCase(\"FAC\") == true) return 3;\n\t\treturn 0;\n\t}", "public static int getBukkitPosition(int x,int y){\n return ((y-1)*9)+x-1;\n }", "java.lang.String getField1071();", "private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }", "java.lang.String getS9();", "private String hR(int x) {\n if (x < 10) {\n return \"0\" + x;\n }\n return \"\" + x;\n }", "public void printX()\r\n {\r\n System.out.println(_x);\r\n }", "@Override\n public double value(double x) {\n myParser.addVariable(variable, x);\n double eval = myParser.getValue();\n return eval;\n }", "private static String getVariableForComboxColumn(String windowName2) {\n\r\n\t\tString variableName = \"\";\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tif(mp.IsCombobox())\r\n\t\t\tvariableName = variableName +\"public String [] \"+mp.getStartUpdataName()+\"Data;\\n\";\r\n\t\t}\r\n\t\treturn variableName;\r\n\t}", "public int Getx(){\n\t\treturn x;\n\t}", "private static String findNumber() {\n\t\treturn null;\r\n\t}", "public static String findSum2(int[] a, int x){\n\t\tMap<Integer, Integer> cache = new HashMap<Integer, Integer>();\r\n\t\tint delta;\r\n\t\tfor(int i = 0; i < a.length; i++) {\r\n\t\t\tdelta = x - a[i];\r\n\t\t\tif(cache.get(delta) != null) {\r\n\t\t\t\treturn delta + \" \" + a[i];\r\n\t\t\t}else{\r\n\t\t\t\tcache.put(a[i], delta);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"Not Found\";\r\n\t}", "public static String valueOf(Object x) {\n return x == null ? \"null\" : x.toString();\n }", "public Variable getPrefixed(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName, ssaNum);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName, ssaNum);\t\t\n\t\treturn v;\n\t}", "static int type_of_xthl(String passed){\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n String given = \"xIxamxAwesomex\";\n System.out.println(xRemove(given));\n }", "private static String removeSharp(String x) {\n\t\treturn (x.indexOf(\"#\") != -1 && x.lastIndexOf(\"#\") < x.length()) ? x.substring(x.lastIndexOf(\"#\") + 1) : x;\n\t}", "protected String getMyVarPath(String path){\n\t\treturn \"getVariableData('\"+VARNAME+\"', 'part1', '/nswomoxsd:receive/nswomoxsd:evt/\"+path+\"') \";\n\t}", "private String getExportPackage() {\n boolean hasSharedPackages = false;\n StringBuilder exportPackage = new StringBuilder();\n // XXX: Because of issue #1517, root package is returned more than once\n // I wrap packages in the LinkedHashSet, that elliminates duplicates \n // while retaining the insertion order. \n // (see https://github.com/ceylon/ceylon-compiler/issues/1517)\n for (Package pkg : new LinkedHashSet<>(module.getPackages())) {\n if (pkg.isShared()) {\n if (hasSharedPackages) {\n exportPackage.append(\";\");\n }\n exportPackage.append(pkg.getNameAsString());\n //TODO : should we analyze package uses as well?\n hasSharedPackages = true;\n }\n }\n if (hasSharedPackages) {\n // Ceylon has no separate versioning of packages, so all\n // packages implicitly inherit their respective module version\n exportPackage.append(\";version=\").append(module.getVersion());\n }\n return exportPackage.toString();\n }", "void removeGssExportedName(int i);", "public int getX1(){return x1;}", "protected int getX() {\n\t\treturn x;\n\t}", "private String reg(SSAStatement s) {\n return registers[freeRegisters[s.getRegister()]];\n }", "java.lang.String getField1286();", "private static int getVar(int initInd, String var)throws Exception{\n int num;\n int perInd;\n char addMode;\n String[] inst;\n\n try{//tries to retrieve relative field\n num = Integer.parseInt(var);\n }catch(Exception e){//if not relative then seperates the address mode\n addMode = var.charAt(0);\n num = Integer.parseInt(var.substring(1, var.length()));\n perInd = (initInd + num) % coreSize; //this makes sure that the index wraps around without being a negative number\n inst = sepInst(core[perInd]); //this is used if addMode is indirect\n\n switch(addMode){\n\n case '*':\n num = num + getVar(perInd, inst[1]);\n break;\n\n case '@':\n if(inst[2] == null){\n num = num + getVar(perInd, inst[1]);\n }else{\n num = num + getVar(perInd, inst[2]);\n }//end ifelse\n break;\n\n default:\n break;\n }//end switch\n }//end try\n\n return num;\n }", "java.lang.String getField1256();", "String getFirst(int n);", "String constant();", "java.lang.String getField1186();", "private String findXID(String s) {\n\t\tint firstP = s.indexOf(\"(\");\n\t\tint lastP = s.indexOf(\")\");\n\n\t\treturn s.substring(firstP + 1, lastP);\n\t}", "public static int addTwo(int x) {\r\n return x + 2;\r\n }", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CFG1010\").get());\n\n // Test module with preclusions\n System.out.println(ModuleInfo.getFromModuleCode(\"GER1000\").get());\n\n // Test module with prerequisites\n System.out.println(ModuleInfo.getFromModuleCode(\"CS2040\").get());\n }", "public int nonStatic( int x ) {\n return x * 3;\n }", "java.lang.String getField1129();", "static int type_of_xra(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}", "private double f(double x) {\r\n if(x<0){\r\n double x1 = x*-1;\r\n return interpretador.getResultado(\"!\"+x1);\r\n }\r\n return interpretador.getResultado(x);\r\n }", "public int human(int x, int y)\n\t{\n\t\tSystem.out.println(\"type 1 method\");\n\t\t\n\t\treturn x;\n\t}", "public void debug(String x) {\n if (isDebugOn()) {\n String out = getClassName() + \"(\" + (new Date()) + \"): \" + x;\n getLogger().info(out);\n }\n }", "java.lang.String getField1134();", "java.lang.String getField1356();", "org.apache.xmlbeans.XmlString xgetValue();", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public static void main (String[] args)\r\n {\n \r\n System.out.println(withoutX(\"xHix\"));//Hi\r\n System.out.println(withoutX(\"xHi\"));//Hi\r\n System.out.println(withoutX(\"Hxix\"));//Hxi\r\n System.out.println(withoutX(\"xxHi\"));//xHi\r\n System.out.println(withoutX(\"Hix\"));//Hi\r\n System.out.println(withoutX(\"xaxbx\"));//axb\r\n System.out.println(withoutX(\"Hello\"));//Hello\r\n System.out.println(withoutX(\"Hexllo\"));//Hexllo\r\n \r\n \r\n ////****hasBad METHOD CALLS****/////\r\n /*\r\n System.out.println(hasBad(\"badxx\"));//true \r\n System.out.println(hasBad(\"xbadxx\"));//true \r\n System.out.println(hasBad(\"xxbadxx\"));//false\r\n System.out.println(hasBad(\"code\"));//false \r\n System.out.println(hasBad(\"bad\"));//true\r\n System.out.println(hasBad(\"ba\"));//false\r\n System.out.println(hasBad(\"xba\"));//false\r\n System.out.println(hasBad(\"xbad\"));//true\r\n System.out.println(hasBad(\"\"));//false\r\n System.out.println(hasBad(\"badyy\"));//true\r\n */\r\n \r\n ////****minCat METHOD CALLS****/////\r\n /*\r\n System.out.println(minCat(\"Hello\", \"Hi\"));//loHi\r\n System.out.println(minCat(\"Hello\", \"java\"));//ellojava\r\n System.out.println(minCat(\"java\", \"Hello\"));//javaello\r\n System.out.println(minCat(\"abc\", \"x\"));//cx\r\n System.out.println(minCat(\"abc\", \"\"));//*empty String*\r\n */\r\n \r\n ////****countHi METHOD CALLS****/////\r\n /*\r\n System.out.println(countHi(\"abc hi ho\"));//1\r\n System.out.println(countHi(\"ABChi hi\"));//2\r\n System.out.println(countHi(\"hihi\"));//2\r\n System.out.println(countHi(\"hiHIhi\"));//2\r\n System.out.println(countHi(\"hi\"));//1\r\n System.out.println(countHi(\"Hi si no HI on ahI\"));//0\r\n System.out.println(countHi(\"hiho not HOHIhi\"));//2\r\n */\r\n\r\n ////****repeatFront METHOD CALLS****/////\r\n /*\r\n System.out.println(repeatFront(\"Chocolate\", 4));//ChocChoChC\r\n System.out.println(repeatFront(\"Chocolate\", 3));//ChoChC\r\n System.out.println(repeatFront(\"Ice Cream\", 2));//IcI\r\n System.out.println(repeatFront(\"Ice Cream\", 1));//I\r\n System.out.println(repeatFront(\"Ice Cream\", 0));//*empty String*\r\n */ \r\n\r\n }", "String getFriendlyName(YAPIContext ctx) throws YAPI_Exception\n {\n if (_classname.equals(\"Module\")) {\n if (_logicalName.equals(\"\"))\n return _serial + \".module\";\n else\n return _logicalName + \".module\";\n } else {\n YPEntry moduleYP = ctx._yHash.resolveFunction(\"Module\", _serial);\n String module = moduleYP.getFriendlyName(ctx);\n int pos = module.indexOf(\".\");\n module = module.substring(0, pos);\n if (_logicalName.equals(\"\"))\n return module + \".\" + _funcId;\n else\n return module + \".\" + _logicalName;\n }\n }", "static int type_of_xri(String passed){\n\t\treturn 1;\n\t}" ]
[ "0.5544299", "0.5465531", "0.53103757", "0.52875865", "0.5279732", "0.5269048", "0.52373105", "0.5221231", "0.515297", "0.5128893", "0.5103788", "0.5069898", "0.50628155", "0.5051984", "0.5014448", "0.49845836", "0.49673253", "0.49497813", "0.49473923", "0.494196", "0.494196", "0.494196", "0.492387", "0.4917372", "0.49171117", "0.4887569", "0.48844948", "0.48832202", "0.487349", "0.4870869", "0.4864009", "0.48639882", "0.48515856", "0.48322454", "0.48253983", "0.48085046", "0.48081884", "0.479873", "0.47888976", "0.47773185", "0.47741428", "0.4765168", "0.47600806", "0.47571173", "0.47512388", "0.47270265", "0.47196695", "0.47104532", "0.4707491", "0.4701505", "0.47001767", "0.46948943", "0.46862558", "0.46852532", "0.4683499", "0.4682792", "0.46806493", "0.4678842", "0.46683452", "0.46591532", "0.46480033", "0.46457306", "0.46423763", "0.46401197", "0.46391153", "0.46379367", "0.46254334", "0.46212694", "0.46207848", "0.46183375", "0.4606734", "0.4606106", "0.4605862", "0.45975563", "0.45955494", "0.45952502", "0.45796162", "0.45745367", "0.4573298", "0.45678353", "0.45597526", "0.45582578", "0.45545748", "0.45435837", "0.45418084", "0.4531748", "0.4525842", "0.452105", "0.45187092", "0.4509499", "0.45092905", "0.45081574", "0.450809", "0.4507082", "0.4506937", "0.450559", "0.4501347", "0.4499585", "0.449802", "0.44979417", "0.4496143" ]
0.0
-1
/// returns the trig function of the equation purely for walk through
public static String function_1(String question) { int first_par = question.indexOf("("); String function_1 = question.substring(0, first_par); return function_1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double cosTheta();", "public double trigonometric(double value, Operator trigType) {\n switch (trigType) {\n case SIN -> { return Math.sin(StrictMath.toRadians(value)); }\n case COS -> { return Math.cos(StrictMath.toRadians(value)); }\n case TAN -> { return Math.tan(StrictMath.toRadians(value)); }\n default -> { return Double.NaN; }\n }\n }", "public double calculateHyperbolicSine(double angle);", "public double calculateSine(double angle);", "public double cos(double number);", "static double f(double x){\n \treturn Math.sin(x);\r\n }", "public double sin(double number);", "public double tan(double number);", "public double evaluate() throws Exception {\n if (super.getExpression().evaluate() % 180 == 90) {\n return 0;\n }\n if (super.getExpression().evaluate() % 360 == 180) {\n return -1;\n }\n if (super.getExpression().evaluate() % 360 == 0) {\n return 1;\n }\n return Math.cos(Math.toRadians(super.getExpression().evaluate()));\n }", "@Override\n\tpublic double f(double x) {\n\t\treturn Math.tanh(x);\n\t}", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "E cos(final E n);", "private double getSin(int rot) {\r\n\t\treturn Math.sin(Math.toRadians(rot));\r\n\t}", "public double calculate(double val) {\n double cosinus = Math.toRadians(val);\n return Math.cos(cosinus);\n }", "public double calculateArcSine(double angle);", "public static double function(double x) {\n double val = (Math.sin(x * 1) * 0.4 + (Math.sin(x * 2) * 0.4)) + (Math.sin(x * 5) * 0.2);\n //return (Math.cos(x)*0.5)+0.5;\n //return (Math.cos(x*5)*0.5)+0.5;\n //if (val<0) val=-0.5;\n //if (val>0) val=0.5;\n return val;\n }", "@Override\r\n\tpublic double f(double x) {\n\t\treturn FastMath.tanh(x); // RMSE: 1.2677143077504636, Took: 38.617s\r\n\t}", "final double ssfn(double phi, double sinphi) {\r\n sinphi *= excentricity;\r\n return tan(PI/4 + phi/2.0) * pow((1-sinphi) / (1+sinphi), excentricity/2.0);\r\n }", "public boolean addTerm(double c, String trigFunction, double p) {\r\n\t\t//the logic for this method is similar to the one above but I had to go through\r\n //sin, cos, and tan seperately sincethey have different arrays associated with them.\r\n if(trigFunction.toLowerCase().equals(\"sin\")){\r\n boolean found = false;\r\n for(int i = 0; i < sinindex; i++){\r\n if(p == sind[i]){\r\n sinc[i] += c;\r\n found = true;\r\n }\r\n }\r\n if(!found){\r\n sinc[sinindex] = c;\r\n sind[sinindex] = p;\r\n sinindex++;\r\n }\r\n return true;\r\n }else if(trigFunction.toLowerCase().equals(\"cos\")){\r\n //y += c * Math.cos(p*x);\r\n boolean found = false;\r\n for(int i = 0; i < cosindex; i++){\r\n if(p == 0){\r\n co[i] += c;\r\n found = true;\r\n }else if(p == cosd[i]){\r\n cosc[i] += c;\r\n found = true;\r\n }\r\n }\r\n if(!found){\r\n cosc[cosindex] = c;\r\n cosd[cosindex] = p;\r\n cosindex++;\r\n }\r\n return true;\r\n }else if(trigFunction.toLowerCase().equals(\"tan\")){\r\n //y += c * Math.tan(p*x);\r\n boolean found = false;\r\n for(int i = 0; i < tanindex; i++){\r\n if(p == tand[i]){\r\n tanc[i] += c;\r\n found = true;\r\n }\r\n }\r\n if(!found){\r\n tanc[tanindex] = c;\r\n tand[tanindex] = p;\r\n tanindex++;\r\n }\r\n return true;\r\n }else{\r\n return false; //if invalid string put into method, return false. \r\n } \r\n\t}", "public T cos(T value);", "public static float acos(float x) {\n \t\tfloat f=asin(x);\n \t\tif(f==Float.NaN)\n \t\t\treturn f;\n \t\treturn PiDiv2-f;\n \t}", "public double calculateSine(double angle, String angleType);", "private float angleFromSunToZenith(float solarTime, float solarDeclination, float latitude) {\r\n\t return (float)(\r\n \t\tMath.PI / 2 - \r\n \t\tMath.asin(\r\n\t\t\t\tMath.sin(latitude) * Math.sin(solarDeclination) - \r\n\t\t\t\tMath.cos(latitude) * Math.cos(solarDeclination) * Math.cos(Math.PI * solarTime / 12.0)\r\n \t\t)\r\n\t );\r\n\t}", "public Function(double coeff, String trigFunction, double p) {\r\n\t if(trigFunction.toLowerCase().equals(\"sin\")){\r\n //y = coeff * Math.sin(p*x);\r\n sinc[0] = coeff;\r\n sind[0] = p;\r\n sinindex = 1;\r\n }else if(trigFunction.toLowerCase().equals(\"cos\")){\r\n //y = coeff * Math.cos(p*x);\r\n if( p == 0){\r\n co[0]+= coeff;\r\n }else{\r\n cosc[0] = coeff;\r\n cosd[0] = p;\r\n cosindex = 1;\r\n } \r\n }else if(trigFunction.toLowerCase().equals(\"tan\")){\r\n //y = coeff * Math.tan(p*x);\r\n tanc[0] = coeff;\r\n tand[0] = p;\r\n tanindex = 1;\r\n }else{\r\n clear(); \r\n }\r\n\t}", "E sin(final E n);", "private double getCos(int rot) {\r\n\t\treturn Math.cos(Math.toRadians(rot));\r\n\t}", "public String getEquation() {\n this.tanSolve();\n return this.equation;\n }", "@Test\n\tvoid sinTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 90;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.sine(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}", "private static double ArcTan(double x) // Using a Chebyshev-Pade approximation\n {\n double x2=x*x;\n return (0.7162721433f+0.2996857769f*x2)*x/(0.7163164576f+(0.5377299313f+0.3951620469e-1f*x2)*x2);\n }", "private static double getSinSquare(Double value){\r\n\t\treturn Math.pow(Math.sin(value/2), 2);\r\n\r\n }", "private double function1(double x) {\n return Math.sin(x)*10;\n }", "private double f1(double x) {\n return Math.exp(-x) * Math.pow(Math.sin(x), 5);\n }", "public double tanIntEvalDeg(double x) {\n x = x * RADIAN;\n double temp;\n temp = (this.a * (Math.log(1.0 / Math.pow(Math.cos(this.b\n * x + this.c), 2))));\n return temp;\n }", "private static double calculateSin(double dy, double distance) {\n if (distance > 0)\n return (dy) / distance;\n else\n return 0.0;\n }", "private double calc_E(KeplerElements a) {\n\t\tdouble sqrome2 = Math.sqrt(1.0 - a.e * a.e);\r\n\t\tdouble cta = Math.cos(a.ta);\r\n\t\tdouble sta = Math.sin(a.ta);\r\n\t\tdouble sine0 = (sqrome2 * sta) / (1.0 + a.e * cta);\r\n\t\tdouble cose0 = (a.e + cta) / (1.0 + a.e * cta);\r\n\t\tdouble e0 = Math.atan2(sine0, cose0);\r\n\t\treturn e0;\r\n\r\n\t}", "public static double getFuncValue(double x){\n return Math.sin(x);\r\n }", "@Test\n\tvoid sinTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 1.5707963267948966;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}", "E atan(final E n);", "public static double sin(double a) {\r\n if (a == Double.NEGATIVE_INFINITY || !(a < Double.POSITIVE_INFINITY)) {\r\n return Double.NaN;\r\n }\r\n\r\n final double PI = (22/7);\r\n\r\n a %= 2 * PI;\r\n\r\n /* The following if statement checks whether a is a negative angle\r\n * Converts it to positive angle if true\r\n */\r\n if (a < 0) {\r\n a = 2 * PI - a;\r\n }\r\n\r\n /* The following if statement checks whether sine term is an odd function\r\n * Changes the sign to -ve if true\r\n */\r\n int sign = 1;\r\n if (a > PI) {\r\n a -= PI;\r\n sign = -1;\r\n }\r\n\r\n final int PRECISION = 50;\r\n double temp = 0;\r\n\r\n /* The following for statement calculates the sum of the terms\r\n * Until the set precision is reached\r\n */\r\n for (int i = 0; i <= PRECISION; i++) {\r\n temp += Math.pow(-1, i) * (Math.pow(a, 2 * i + 1) / factorial(2 * i + 1));\r\n }\r\n\r\n return sign * temp;\r\n\r\n }", "@Test\n\tvoid sinTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 90;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "public double speed() {\n /* dx = sin(angle) * speed\n dy = cos(angle-180) * speed = -cos(angle)\n sqrt((dx)^2 + (-dy)^2 = sin(angle)^2*speed^2 + cos(angle)^2*speed^2)=\n sqrt(speed^2 *(cos(angle)^2+sin(angle)^2) = sqrt(speed^2*1)=speed\n */\n //distance math functions\n //to calculate the square root of the sum of squares of numbers passed to it as arguments.\n return Math.hypot(this.dx, this.dy);\n }", "E acos(final E n);", "public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }", "public static void main(String[] args) {\n double x0=Math.PI/2;\n double dx=0.01;\n double f1;\n double f2;\n double m;\n\n double dr;\n f1=Math.cos(x0+dx);\n f2=Math.cos(x0-dx);\n m= Math.cos(x0)*2;\n dr=((f1)-(m)+(f2))/(dx*dx);\n\n System.out.println(dr);\n\n\n }", "@Test\n\tvoid tanTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 30;\n\t\tdouble actual = 0.5773502691896257;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.tan(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}", "public double calculateSine(double oppositeSide, double hypotenuseSide, String angleType);", "public static double function(double x, double y)\r\n\t{\r\n\t\treturn (1-cos(PI * x)) * pow((1.23456 + cos(1.06512 * y)), 2) * \r\n\t\t\t\texp(-(pow(x, 2)) - (pow(y, 2)));\r\n\t}", "public double tanEvalDeg(double x) {\n x = x * RADIAN;\n double temp;\n temp = this.a * Math.tan(this.b * x + this.c) + this.d;\n return temp;\n }", "@Test\n\tvoid tanTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 0.5235987755982988;\n\t\tdouble actual = 0.5773502691896257;\n\t\tdouble result = TrigLib.tan(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}", "public static final float sinh(float x) {\n \t\treturn (MoreMath.pow(MoreMath.E, x) - MoreMath.pow(MoreMath.E, -x)) / 2.0f;\n \t}", "public static Expression sin(final Expression value) {\n return new Expression(\"$sin\", value);\n }", "public static double cos(double x)\n {\n int n=(int)(x/PI2)+1;\n if(n<1)n=n-1;\n x=x-(n&0xFFFFFFFE)*PI2; // reduce to the 4th and 1st quadrants\n\n double x2=x*x;\n\n float si=1f;\n if ((n&2)!=0) si=-1f; // if it from the 2nd or the 3rd quadrants\n return si*(0.9457092528f+(-0.4305320537f+0.1914993010e-1f*x2)*x2)/(0.9457093212f+(0.4232119630e-1f+0.9106317690e-3f*x2)*x2);\n }", "public static double findCos(double radiun) {\r\n\t\treturn Math.cos(radiun);\r\n\t}", "@Test\n\tvoid cosTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 60;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result = TrigLib.cosine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "@Override\n\tpublic float calc(final float t, final float b, final float c, final float d) {\n\t\treturn (float) (c * FloatMath.sin(t / d * _HALF_PI) + b);\n\t}", "public double calculateArcSine(double angle, String angleType);", "public static Expression cos(final Expression value) {\n return new Expression(\"$cos\", value);\n }", "public final static float SINSafer(float deg) {\n\t\tdeg=deg%360;\n\t\tif(deg<0) deg+=360;\n\t\t\n\t\tdeg*=SINCOS_INVPREC;\n\t\treturn sinLUT[(int)deg];\n\t}", "public static double equation() {\n Scanner userInput = new Scanner(System.in);\n System.out.print(\"Please enter a value for x: \");\n double x = userInput.nextDouble();\n double output = (x * Math.pow(Math.exp(1), -x)) + Math.sqrt(1 - Math.pow(Math.exp(1), -x));\n System.out.print(\"The answer to the equation xe^-x + sqrt(1-(e^-x)) \");\n\tSystem.out.println(\" with that x is: \");\n return output;\n }", "@Test\n\tvoid cosTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 1.0471975511965976;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result = TrigLib.cosine(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}", "@Test\n\tvoid cosTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 60;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.cosine(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}", "@Test\n public void test19() throws Throwable {\n Complex complex0 = new Complex((-138.659), 0.0);\n Complex complex1 = complex0.exp();\n String string0 = complex0.toString();\n Complex complex2 = complex1.subtract(complex0);\n Complex complex3 = complex0.multiply(complex1);\n Complex complex4 = complex0.cos();\n double double0 = complex4.getImaginary();\n }", "E tan(final E n);", "private double eculidean(double x, double x1, double y, double y1) {\n\t\treturn Math.sqrt(Math.pow((x - x1), 2) + Math.pow((y - y1), 2));\n\t}", "private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }", "public double calculateArcSine(double oppositeSide, double hypotenuseSide, String angleType);", "private static double getSinOfDegrees(double d, int halfCirc) {\n\t\treturn Math.sin((d * Math.PI) / halfCirc);\n\t}", "public static double mySin(double x) {\n int n = 0;\n int N = 20;\n double y = 0;\n for (; n <= N; n++) {\n double p1 = 1;\n for (int i = 1; i <= n; i++) {\n p1 *= (-1);\n }\n double p2 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p2*=i;\n }\n double p3 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p3*=x;\n }\n y = y + (p1/p2)*p3;\n }\n return y;\n }", "public static double sin(double x) // Using a Chebyshev-Pade approximation\n {\n int n=(int)(x/PI2)+1; // reduce to the 4th and 1st quadrants\n if(n<1)n=n-1;\n if ((n&2)==0) x=x-(n&0xFFFFFFFE)*PI2; // if it from the 2nd or the 3rd quadrants\n else x=-(x-(n&0xFFFFFFFE)*PI2);\n\n double x2=x*x;\n return (0.9238318854f-0.9595498071e-1f*x2)*x/(0.9238400690f+(0.5797298195e-1f+0.2031791179e-2f*x2)*x2);\n }", "private double functionF(int x, int y) {\n if (type == SIMPLE_SIN2D_IN_X) { return Math.sin(2 * Math.PI * s * x / M); }\n if (type == SIMPLE_SIN2D_IN_Y) { return Math.sin(2 * Math.PI * s * y / M); }\n if (type == SIMPLE_PLUS2D) { return Math.sin(2 * Math.PI * s * x / M) + Math.sin(2 * Math.PI * s2 * y / M); }\n if (type == SIMPLE_MULT2D) { return Math.sin(2 * Math.PI * s * x / M) * Math.sin(2 * Math.PI * s2 * y / M); }\n if (type == FROM_IMG) { return in.getSample(x, y, 0); }\n else { return 0; }\n }", "public double evaluate(Map<String, Double> assignment) throws Exception {\n if (super.getExpression().evaluate(assignment) % 180 == 90) {\n return 0;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 180) {\n return -1;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 0) {\n return 1;\n }\n return Math.cos(Math.toRadians(super.getExpression().evaluate(assignment)));\n }", "public double translateAngle( Figure f, double angle, double dir);", "@Test\n public void test25() throws Throwable {\n Complex complex0 = new Complex((-4594.967), 2587.341);\n Complex complex1 = complex0.tan();\n Complex complex2 = complex0.pow(complex1);\n Complex complex3 = complex0.sqrt();\n Complex complex4 = complex3.atan();\n double double0 = complex3.abs();\n Complex complex5 = complex0.exp();\n Complex complex6 = complex4.sqrt();\n Complex complex7 = complex4.conjugate();\n Complex complex8 = complex0.sin();\n }", "private double f(double v, double s) {\n\t\treturn equation(v) - s;\r\n\t}", "public static double findSin(double radiun) {\r\n\t\treturn Math.sin(radiun);\r\n\t}", "private float calculateRadian(FPointType fptPos, FPointType fptCalculate) {\n // Need to get the radian of the triangle from fptCalculate to fptPos.\n float xDelta = fptPos.x - fptCalculate.x;\n float yDelta = fptPos.y - fptCalculate.y;\n \n float rad = 0.0f;\n if (xDelta == 0.0f) {\n if (yDelta > 0.0f)\n rad = (float)Math.PI / 2;\n else\n rad = ((float)Math.PI * 2) - ((float)Math.PI / 2);\n } else {\n rad = (float)Math.atan(yDelta / xDelta);\n if (xDelta < 0.0f)\n rad += (float)Math.PI;\n }\n \n return rad;\n }", "public double tanDefIntDeg(double a, double b) {\n a = a * RADIAN;\n b = b * RADIAN;\n double fa, fb;\n fb = (this.a * (Math.log(1.0 / Math.pow(Math.cos(this.b * b + this.c), 2)))\n + this.d * (2 * this.b * b - PI)) / (2 * this.b);\n fa = (this.a * (Math.log(1.0 / Math.pow(Math.cos(this.b * a + this.c), 2)))\n + this.d * (2 * this.b * a - PI)) / (2 * this.b);\n return fb - fa;\n }", "public static double \t\tsinh(double _x) {\n\t\treturn 0.5D * (Math.exp(_x) - Math.exp(- _x));\n\t}", "static double calculate(String func, double arg) {\n double result = 0.0;\n\n if (func.equals(\"sin\")) {\n result = Math.sin(arg);\n }\n if (func.equals(\"ln\")) {\n result = Math.log(arg);\n }\n if (func.equals(\"sqrt\")) {\n result = Math.sqrt(arg);\n }\n if (func.equals(\"abs\")) {\n result = Math.abs(arg);\n }\n return result;\n }", "public double getSolDeg() {\n this.tanSolve();\n return this.xdeg;\n }", "public MathObject evaluate(Function input);", "private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }", "static double sineWave(double timeInSeconds, double frequency) {\r\n\t\tdouble result= Math.sin(timeInSeconds);\r\n\t\t\t\r\n\t\treturn result; // hint: use Math.sin(...)\r\n\t}", "public Cos(Expression expression) {\n super(\"cos(%s)\", expression);\n }", "private static double calculateCos(double dx, double distance) {\n if (distance > 0)\n return (dx) / distance;\n else\n return 0.0;\n }", "public static float sin(float x) {\n float upper = (PI - x) * 16f * x;\n float lower = 5 * PI * PI - 4f * x * (PI - x);\n return upper / lower;\n\n }", "public static Expression radiansToDegrees(final Expression value) {\n return new Expression(\"$radiansToDegrees\", value);\n }", "@Test\n\tvoid toRadiansConversionTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 180;\n\t\tdouble actual = 3.141592653589793;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "@Test\n\tvoid tanTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 30;\n\t\tdouble actual = 0.5773502691896257;\n\t\tdouble result = TrigLib.tan(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "public static JSFunction equationToFunctionWithRootAsSolution(final String equation) {\n final String[] hands = equation.split(\"=\");\n final String f = \"(\" + hands[0] + \")-(\" + hands[1] + \")\";\n return new JSFunction(f);\n }", "public double getSol() {\n this.tanSolve();\n return this.x;\n }", "private float m87322b(float f) {\n return (float) Math.sin((double) ((float) (((double) (f - 0.5f)) * 0.4712389167638204d)));\n }", "public void doMath();", "public static double fren(double x) {\r\n double v = fapprox(Math.sqrt(x));\r\n return v * v;\r\n }", "public double eval(double x) {\n double temp;\n temp = this.a * Math.tan(this.b * x + this.c) + this.d;\n return temp;\n }", "@Test\n public void test16() throws Throwable {\n Complex complex0 = new Complex(0.0, 236.4);\n Complex complex1 = complex0.asin();\n Complex complex2 = complex1.atan();\n Complex complex3 = complex0.sin();\n Complex complex4 = (Complex)complex0.readResolve();\n double double0 = complex0.abs();\n Complex complex5 = complex0.log();\n Complex complex6 = complex1.sin();\n Complex complex7 = complex0.cos();\n String string0 = complex3.toString();\n Complex complex8 = complex1.multiply(complex2);\n try { \n complex3.nthRoot((-1));\n } catch(IllegalArgumentException e) {\n //\n // cannot compute nth root for null or negative n: -1\n //\n assertThrownBy(\"org.apache.commons.math.MathRuntimeException\", e);\n }\n }", "@Test\n public void test33() throws Throwable {\n Complex complex0 = new Complex((-0.49999999999999994), (-0.49999999999999994));\n Complex complex1 = complex0.acos();\n Complex complex2 = complex0.sin();\n ComplexField complexField0 = complex0.getField();\n Complex complex3 = complex0.tanh();\n Complex complex4 = complex2.log();\n Complex complex5 = complex0.divide(complex2);\n Complex complex6 = complex2.sqrt();\n Complex complex7 = complex6.divide(complex4);\n Complex complex8 = complex4.pow(complex0);\n double double0 = complex6.getArgument();\n Complex complex9 = complex0.sinh();\n Complex complex10 = complex6.tanh();\n Complex complex11 = complex2.sqrt();\n Complex complex12 = complex0.negate();\n Complex complex13 = complex2.negate();\n Complex complex14 = complex3.conjugate();\n boolean boolean0 = complex2.isInfinite();\n boolean boolean1 = complex3.isInfinite();\n Complex complex15 = complex4.sinh();\n Complex complex16 = complex2.atan();\n boolean boolean2 = complex0.equals(\"}0\");\n Complex complex17 = complex2.subtract(complex3);\n ComplexField complexField1 = complex11.getField();\n boolean boolean3 = complex2.isNaN();\n Complex complex18 = complex11.pow(complex4);\n Complex complex19 = complex16.conjugate();\n Complex complex20 = complex16.cos();\n Complex complex21 = complex19.cosh();\n Complex complex22 = complex1.pow(complex6);\n Complex complex23 = (Complex)complex20.readResolve();\n }", "public static float sin(float degrees) {\r\n return sinLookup((int) (degrees * precision + 0.5f));\r\n }", "public static Expression degreesToRadians(final Expression value) {\n return new Expression(\"$degreesToRadians\", value);\n }", "public static Expression tan(final Expression value) {\n return new Expression(\"$tan\", value);\n }", "public static void main(String[] args) {\r\n\tSlingFunction f = new Sin(\r\n\t\tnew Arithmetic('*', new Point(0, 10), new T()));\r\n\tSystem.out.println(f);\r\n}" ]
[ "0.6596989", "0.6471253", "0.64023376", "0.6313095", "0.61471575", "0.6123229", "0.60355777", "0.5861918", "0.5860006", "0.5844154", "0.5834549", "0.5829669", "0.5824296", "0.582201", "0.57936734", "0.57715803", "0.5726146", "0.57234865", "0.571444", "0.57084435", "0.56639105", "0.56556344", "0.56553495", "0.5654254", "0.5646679", "0.5633917", "0.5623064", "0.5598259", "0.55917597", "0.558515", "0.55661273", "0.5564365", "0.55612797", "0.555879", "0.5546945", "0.5544715", "0.55431354", "0.5535741", "0.5529988", "0.5513237", "0.5491928", "0.5486564", "0.54813", "0.54689085", "0.54675615", "0.5448685", "0.5429729", "0.54195285", "0.53941435", "0.5392454", "0.53444594", "0.53426623", "0.5342408", "0.5341352", "0.5327323", "0.5325452", "0.5317333", "0.531151", "0.53046626", "0.5283468", "0.5275996", "0.5213802", "0.52123433", "0.5203412", "0.51813453", "0.5175248", "0.51741046", "0.5173909", "0.5172231", "0.5169315", "0.51638585", "0.5150287", "0.5149376", "0.513811", "0.5136279", "0.5128678", "0.51263446", "0.51263416", "0.5122129", "0.51157445", "0.51137084", "0.51054984", "0.50962603", "0.50936574", "0.5089978", "0.50865036", "0.50814945", "0.5077904", "0.5072115", "0.5071605", "0.50631267", "0.50626886", "0.50588524", "0.5058415", "0.5054531", "0.50487375", "0.5044536", "0.5041922", "0.5039645", "0.5031702", "0.5026285" ]
0.0
-1
/// returns the trig function of the equation purely for walk through
public static String function_2(String question) { //int first_par = 0; //int second_par = question.indexOf(")"); //int third_par = question.indexOf("(", second_par); String function_2 = question.substring(find_par(2,question)+1,find_par(3,question)); return function_2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double cosTheta();", "public double trigonometric(double value, Operator trigType) {\n switch (trigType) {\n case SIN -> { return Math.sin(StrictMath.toRadians(value)); }\n case COS -> { return Math.cos(StrictMath.toRadians(value)); }\n case TAN -> { return Math.tan(StrictMath.toRadians(value)); }\n default -> { return Double.NaN; }\n }\n }", "public double calculateHyperbolicSine(double angle);", "public double calculateSine(double angle);", "public double cos(double number);", "static double f(double x){\n \treturn Math.sin(x);\r\n }", "public double sin(double number);", "public double tan(double number);", "public double evaluate() throws Exception {\n if (super.getExpression().evaluate() % 180 == 90) {\n return 0;\n }\n if (super.getExpression().evaluate() % 360 == 180) {\n return -1;\n }\n if (super.getExpression().evaluate() % 360 == 0) {\n return 1;\n }\n return Math.cos(Math.toRadians(super.getExpression().evaluate()));\n }", "@Override\n\tpublic double f(double x) {\n\t\treturn Math.tanh(x);\n\t}", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "E cos(final E n);", "private double getSin(int rot) {\r\n\t\treturn Math.sin(Math.toRadians(rot));\r\n\t}", "public double calculate(double val) {\n double cosinus = Math.toRadians(val);\n return Math.cos(cosinus);\n }", "public double calculateArcSine(double angle);", "public static double function(double x) {\n double val = (Math.sin(x * 1) * 0.4 + (Math.sin(x * 2) * 0.4)) + (Math.sin(x * 5) * 0.2);\n //return (Math.cos(x)*0.5)+0.5;\n //return (Math.cos(x*5)*0.5)+0.5;\n //if (val<0) val=-0.5;\n //if (val>0) val=0.5;\n return val;\n }", "@Override\r\n\tpublic double f(double x) {\n\t\treturn FastMath.tanh(x); // RMSE: 1.2677143077504636, Took: 38.617s\r\n\t}", "final double ssfn(double phi, double sinphi) {\r\n sinphi *= excentricity;\r\n return tan(PI/4 + phi/2.0) * pow((1-sinphi) / (1+sinphi), excentricity/2.0);\r\n }", "public boolean addTerm(double c, String trigFunction, double p) {\r\n\t\t//the logic for this method is similar to the one above but I had to go through\r\n //sin, cos, and tan seperately sincethey have different arrays associated with them.\r\n if(trigFunction.toLowerCase().equals(\"sin\")){\r\n boolean found = false;\r\n for(int i = 0; i < sinindex; i++){\r\n if(p == sind[i]){\r\n sinc[i] += c;\r\n found = true;\r\n }\r\n }\r\n if(!found){\r\n sinc[sinindex] = c;\r\n sind[sinindex] = p;\r\n sinindex++;\r\n }\r\n return true;\r\n }else if(trigFunction.toLowerCase().equals(\"cos\")){\r\n //y += c * Math.cos(p*x);\r\n boolean found = false;\r\n for(int i = 0; i < cosindex; i++){\r\n if(p == 0){\r\n co[i] += c;\r\n found = true;\r\n }else if(p == cosd[i]){\r\n cosc[i] += c;\r\n found = true;\r\n }\r\n }\r\n if(!found){\r\n cosc[cosindex] = c;\r\n cosd[cosindex] = p;\r\n cosindex++;\r\n }\r\n return true;\r\n }else if(trigFunction.toLowerCase().equals(\"tan\")){\r\n //y += c * Math.tan(p*x);\r\n boolean found = false;\r\n for(int i = 0; i < tanindex; i++){\r\n if(p == tand[i]){\r\n tanc[i] += c;\r\n found = true;\r\n }\r\n }\r\n if(!found){\r\n tanc[tanindex] = c;\r\n tand[tanindex] = p;\r\n tanindex++;\r\n }\r\n return true;\r\n }else{\r\n return false; //if invalid string put into method, return false. \r\n } \r\n\t}", "public T cos(T value);", "public static float acos(float x) {\n \t\tfloat f=asin(x);\n \t\tif(f==Float.NaN)\n \t\t\treturn f;\n \t\treturn PiDiv2-f;\n \t}", "public double calculateSine(double angle, String angleType);", "private float angleFromSunToZenith(float solarTime, float solarDeclination, float latitude) {\r\n\t return (float)(\r\n \t\tMath.PI / 2 - \r\n \t\tMath.asin(\r\n\t\t\t\tMath.sin(latitude) * Math.sin(solarDeclination) - \r\n\t\t\t\tMath.cos(latitude) * Math.cos(solarDeclination) * Math.cos(Math.PI * solarTime / 12.0)\r\n \t\t)\r\n\t );\r\n\t}", "public Function(double coeff, String trigFunction, double p) {\r\n\t if(trigFunction.toLowerCase().equals(\"sin\")){\r\n //y = coeff * Math.sin(p*x);\r\n sinc[0] = coeff;\r\n sind[0] = p;\r\n sinindex = 1;\r\n }else if(trigFunction.toLowerCase().equals(\"cos\")){\r\n //y = coeff * Math.cos(p*x);\r\n if( p == 0){\r\n co[0]+= coeff;\r\n }else{\r\n cosc[0] = coeff;\r\n cosd[0] = p;\r\n cosindex = 1;\r\n } \r\n }else if(trigFunction.toLowerCase().equals(\"tan\")){\r\n //y = coeff * Math.tan(p*x);\r\n tanc[0] = coeff;\r\n tand[0] = p;\r\n tanindex = 1;\r\n }else{\r\n clear(); \r\n }\r\n\t}", "E sin(final E n);", "private double getCos(int rot) {\r\n\t\treturn Math.cos(Math.toRadians(rot));\r\n\t}", "public String getEquation() {\n this.tanSolve();\n return this.equation;\n }", "@Test\n\tvoid sinTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 90;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.sine(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}", "private static double ArcTan(double x) // Using a Chebyshev-Pade approximation\n {\n double x2=x*x;\n return (0.7162721433f+0.2996857769f*x2)*x/(0.7163164576f+(0.5377299313f+0.3951620469e-1f*x2)*x2);\n }", "private static double getSinSquare(Double value){\r\n\t\treturn Math.pow(Math.sin(value/2), 2);\r\n\r\n }", "private double function1(double x) {\n return Math.sin(x)*10;\n }", "private double f1(double x) {\n return Math.exp(-x) * Math.pow(Math.sin(x), 5);\n }", "public double tanIntEvalDeg(double x) {\n x = x * RADIAN;\n double temp;\n temp = (this.a * (Math.log(1.0 / Math.pow(Math.cos(this.b\n * x + this.c), 2))));\n return temp;\n }", "private static double calculateSin(double dy, double distance) {\n if (distance > 0)\n return (dy) / distance;\n else\n return 0.0;\n }", "private double calc_E(KeplerElements a) {\n\t\tdouble sqrome2 = Math.sqrt(1.0 - a.e * a.e);\r\n\t\tdouble cta = Math.cos(a.ta);\r\n\t\tdouble sta = Math.sin(a.ta);\r\n\t\tdouble sine0 = (sqrome2 * sta) / (1.0 + a.e * cta);\r\n\t\tdouble cose0 = (a.e + cta) / (1.0 + a.e * cta);\r\n\t\tdouble e0 = Math.atan2(sine0, cose0);\r\n\t\treturn e0;\r\n\r\n\t}", "public static double getFuncValue(double x){\n return Math.sin(x);\r\n }", "@Test\n\tvoid sinTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 1.5707963267948966;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}", "E atan(final E n);", "public static double sin(double a) {\r\n if (a == Double.NEGATIVE_INFINITY || !(a < Double.POSITIVE_INFINITY)) {\r\n return Double.NaN;\r\n }\r\n\r\n final double PI = (22/7);\r\n\r\n a %= 2 * PI;\r\n\r\n /* The following if statement checks whether a is a negative angle\r\n * Converts it to positive angle if true\r\n */\r\n if (a < 0) {\r\n a = 2 * PI - a;\r\n }\r\n\r\n /* The following if statement checks whether sine term is an odd function\r\n * Changes the sign to -ve if true\r\n */\r\n int sign = 1;\r\n if (a > PI) {\r\n a -= PI;\r\n sign = -1;\r\n }\r\n\r\n final int PRECISION = 50;\r\n double temp = 0;\r\n\r\n /* The following for statement calculates the sum of the terms\r\n * Until the set precision is reached\r\n */\r\n for (int i = 0; i <= PRECISION; i++) {\r\n temp += Math.pow(-1, i) * (Math.pow(a, 2 * i + 1) / factorial(2 * i + 1));\r\n }\r\n\r\n return sign * temp;\r\n\r\n }", "@Test\n\tvoid sinTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 90;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "public double speed() {\n /* dx = sin(angle) * speed\n dy = cos(angle-180) * speed = -cos(angle)\n sqrt((dx)^2 + (-dy)^2 = sin(angle)^2*speed^2 + cos(angle)^2*speed^2)=\n sqrt(speed^2 *(cos(angle)^2+sin(angle)^2) = sqrt(speed^2*1)=speed\n */\n //distance math functions\n //to calculate the square root of the sum of squares of numbers passed to it as arguments.\n return Math.hypot(this.dx, this.dy);\n }", "E acos(final E n);", "public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }", "public static void main(String[] args) {\n double x0=Math.PI/2;\n double dx=0.01;\n double f1;\n double f2;\n double m;\n\n double dr;\n f1=Math.cos(x0+dx);\n f2=Math.cos(x0-dx);\n m= Math.cos(x0)*2;\n dr=((f1)-(m)+(f2))/(dx*dx);\n\n System.out.println(dr);\n\n\n }", "@Test\n\tvoid tanTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 30;\n\t\tdouble actual = 0.5773502691896257;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.tan(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}", "public double calculateSine(double oppositeSide, double hypotenuseSide, String angleType);", "public static double function(double x, double y)\r\n\t{\r\n\t\treturn (1-cos(PI * x)) * pow((1.23456 + cos(1.06512 * y)), 2) * \r\n\t\t\t\texp(-(pow(x, 2)) - (pow(y, 2)));\r\n\t}", "public double tanEvalDeg(double x) {\n x = x * RADIAN;\n double temp;\n temp = this.a * Math.tan(this.b * x + this.c) + this.d;\n return temp;\n }", "@Test\n\tvoid tanTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 0.5235987755982988;\n\t\tdouble actual = 0.5773502691896257;\n\t\tdouble result = TrigLib.tan(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}", "public static final float sinh(float x) {\n \t\treturn (MoreMath.pow(MoreMath.E, x) - MoreMath.pow(MoreMath.E, -x)) / 2.0f;\n \t}", "public static Expression sin(final Expression value) {\n return new Expression(\"$sin\", value);\n }", "public static double findCos(double radiun) {\r\n\t\treturn Math.cos(radiun);\r\n\t}", "@Test\n\tvoid cosTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 60;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result = TrigLib.cosine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "public static double cos(double x)\n {\n int n=(int)(x/PI2)+1;\n if(n<1)n=n-1;\n x=x-(n&0xFFFFFFFE)*PI2; // reduce to the 4th and 1st quadrants\n\n double x2=x*x;\n\n float si=1f;\n if ((n&2)!=0) si=-1f; // if it from the 2nd or the 3rd quadrants\n return si*(0.9457092528f+(-0.4305320537f+0.1914993010e-1f*x2)*x2)/(0.9457093212f+(0.4232119630e-1f+0.9106317690e-3f*x2)*x2);\n }", "@Override\n\tpublic float calc(final float t, final float b, final float c, final float d) {\n\t\treturn (float) (c * FloatMath.sin(t / d * _HALF_PI) + b);\n\t}", "public double calculateArcSine(double angle, String angleType);", "public static Expression cos(final Expression value) {\n return new Expression(\"$cos\", value);\n }", "public final static float SINSafer(float deg) {\n\t\tdeg=deg%360;\n\t\tif(deg<0) deg+=360;\n\t\t\n\t\tdeg*=SINCOS_INVPREC;\n\t\treturn sinLUT[(int)deg];\n\t}", "public static double equation() {\n Scanner userInput = new Scanner(System.in);\n System.out.print(\"Please enter a value for x: \");\n double x = userInput.nextDouble();\n double output = (x * Math.pow(Math.exp(1), -x)) + Math.sqrt(1 - Math.pow(Math.exp(1), -x));\n System.out.print(\"The answer to the equation xe^-x + sqrt(1-(e^-x)) \");\n\tSystem.out.println(\" with that x is: \");\n return output;\n }", "@Test\n\tvoid cosTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 1.0471975511965976;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result = TrigLib.cosine(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}", "@Test\n\tvoid cosTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 60;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.cosine(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}", "@Test\n public void test19() throws Throwable {\n Complex complex0 = new Complex((-138.659), 0.0);\n Complex complex1 = complex0.exp();\n String string0 = complex0.toString();\n Complex complex2 = complex1.subtract(complex0);\n Complex complex3 = complex0.multiply(complex1);\n Complex complex4 = complex0.cos();\n double double0 = complex4.getImaginary();\n }", "E tan(final E n);", "private double eculidean(double x, double x1, double y, double y1) {\n\t\treturn Math.sqrt(Math.pow((x - x1), 2) + Math.pow((y - y1), 2));\n\t}", "private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }", "public double calculateArcSine(double oppositeSide, double hypotenuseSide, String angleType);", "private static double getSinOfDegrees(double d, int halfCirc) {\n\t\treturn Math.sin((d * Math.PI) / halfCirc);\n\t}", "public static double mySin(double x) {\n int n = 0;\n int N = 20;\n double y = 0;\n for (; n <= N; n++) {\n double p1 = 1;\n for (int i = 1; i <= n; i++) {\n p1 *= (-1);\n }\n double p2 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p2*=i;\n }\n double p3 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p3*=x;\n }\n y = y + (p1/p2)*p3;\n }\n return y;\n }", "public static double sin(double x) // Using a Chebyshev-Pade approximation\n {\n int n=(int)(x/PI2)+1; // reduce to the 4th and 1st quadrants\n if(n<1)n=n-1;\n if ((n&2)==0) x=x-(n&0xFFFFFFFE)*PI2; // if it from the 2nd or the 3rd quadrants\n else x=-(x-(n&0xFFFFFFFE)*PI2);\n\n double x2=x*x;\n return (0.9238318854f-0.9595498071e-1f*x2)*x/(0.9238400690f+(0.5797298195e-1f+0.2031791179e-2f*x2)*x2);\n }", "private double functionF(int x, int y) {\n if (type == SIMPLE_SIN2D_IN_X) { return Math.sin(2 * Math.PI * s * x / M); }\n if (type == SIMPLE_SIN2D_IN_Y) { return Math.sin(2 * Math.PI * s * y / M); }\n if (type == SIMPLE_PLUS2D) { return Math.sin(2 * Math.PI * s * x / M) + Math.sin(2 * Math.PI * s2 * y / M); }\n if (type == SIMPLE_MULT2D) { return Math.sin(2 * Math.PI * s * x / M) * Math.sin(2 * Math.PI * s2 * y / M); }\n if (type == FROM_IMG) { return in.getSample(x, y, 0); }\n else { return 0; }\n }", "public double evaluate(Map<String, Double> assignment) throws Exception {\n if (super.getExpression().evaluate(assignment) % 180 == 90) {\n return 0;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 180) {\n return -1;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 0) {\n return 1;\n }\n return Math.cos(Math.toRadians(super.getExpression().evaluate(assignment)));\n }", "public double translateAngle( Figure f, double angle, double dir);", "@Test\n public void test25() throws Throwable {\n Complex complex0 = new Complex((-4594.967), 2587.341);\n Complex complex1 = complex0.tan();\n Complex complex2 = complex0.pow(complex1);\n Complex complex3 = complex0.sqrt();\n Complex complex4 = complex3.atan();\n double double0 = complex3.abs();\n Complex complex5 = complex0.exp();\n Complex complex6 = complex4.sqrt();\n Complex complex7 = complex4.conjugate();\n Complex complex8 = complex0.sin();\n }", "private double f(double v, double s) {\n\t\treturn equation(v) - s;\r\n\t}", "public static double findSin(double radiun) {\r\n\t\treturn Math.sin(radiun);\r\n\t}", "private float calculateRadian(FPointType fptPos, FPointType fptCalculate) {\n // Need to get the radian of the triangle from fptCalculate to fptPos.\n float xDelta = fptPos.x - fptCalculate.x;\n float yDelta = fptPos.y - fptCalculate.y;\n \n float rad = 0.0f;\n if (xDelta == 0.0f) {\n if (yDelta > 0.0f)\n rad = (float)Math.PI / 2;\n else\n rad = ((float)Math.PI * 2) - ((float)Math.PI / 2);\n } else {\n rad = (float)Math.atan(yDelta / xDelta);\n if (xDelta < 0.0f)\n rad += (float)Math.PI;\n }\n \n return rad;\n }", "public double tanDefIntDeg(double a, double b) {\n a = a * RADIAN;\n b = b * RADIAN;\n double fa, fb;\n fb = (this.a * (Math.log(1.0 / Math.pow(Math.cos(this.b * b + this.c), 2)))\n + this.d * (2 * this.b * b - PI)) / (2 * this.b);\n fa = (this.a * (Math.log(1.0 / Math.pow(Math.cos(this.b * a + this.c), 2)))\n + this.d * (2 * this.b * a - PI)) / (2 * this.b);\n return fb - fa;\n }", "public static double \t\tsinh(double _x) {\n\t\treturn 0.5D * (Math.exp(_x) - Math.exp(- _x));\n\t}", "static double calculate(String func, double arg) {\n double result = 0.0;\n\n if (func.equals(\"sin\")) {\n result = Math.sin(arg);\n }\n if (func.equals(\"ln\")) {\n result = Math.log(arg);\n }\n if (func.equals(\"sqrt\")) {\n result = Math.sqrt(arg);\n }\n if (func.equals(\"abs\")) {\n result = Math.abs(arg);\n }\n return result;\n }", "public double getSolDeg() {\n this.tanSolve();\n return this.xdeg;\n }", "public MathObject evaluate(Function input);", "private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }", "static double sineWave(double timeInSeconds, double frequency) {\r\n\t\tdouble result= Math.sin(timeInSeconds);\r\n\t\t\t\r\n\t\treturn result; // hint: use Math.sin(...)\r\n\t}", "public Cos(Expression expression) {\n super(\"cos(%s)\", expression);\n }", "private static double calculateCos(double dx, double distance) {\n if (distance > 0)\n return (dx) / distance;\n else\n return 0.0;\n }", "public static float sin(float x) {\n float upper = (PI - x) * 16f * x;\n float lower = 5 * PI * PI - 4f * x * (PI - x);\n return upper / lower;\n\n }", "public static Expression radiansToDegrees(final Expression value) {\n return new Expression(\"$radiansToDegrees\", value);\n }", "@Test\n\tvoid toRadiansConversionTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 180;\n\t\tdouble actual = 3.141592653589793;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "@Test\n\tvoid tanTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 30;\n\t\tdouble actual = 0.5773502691896257;\n\t\tdouble result = TrigLib.tan(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "public static JSFunction equationToFunctionWithRootAsSolution(final String equation) {\n final String[] hands = equation.split(\"=\");\n final String f = \"(\" + hands[0] + \")-(\" + hands[1] + \")\";\n return new JSFunction(f);\n }", "private float m87322b(float f) {\n return (float) Math.sin((double) ((float) (((double) (f - 0.5f)) * 0.4712389167638204d)));\n }", "public double getSol() {\n this.tanSolve();\n return this.x;\n }", "public static double fren(double x) {\r\n double v = fapprox(Math.sqrt(x));\r\n return v * v;\r\n }", "public void doMath();", "public double eval(double x) {\n double temp;\n temp = this.a * Math.tan(this.b * x + this.c) + this.d;\n return temp;\n }", "@Test\n public void test16() throws Throwable {\n Complex complex0 = new Complex(0.0, 236.4);\n Complex complex1 = complex0.asin();\n Complex complex2 = complex1.atan();\n Complex complex3 = complex0.sin();\n Complex complex4 = (Complex)complex0.readResolve();\n double double0 = complex0.abs();\n Complex complex5 = complex0.log();\n Complex complex6 = complex1.sin();\n Complex complex7 = complex0.cos();\n String string0 = complex3.toString();\n Complex complex8 = complex1.multiply(complex2);\n try { \n complex3.nthRoot((-1));\n } catch(IllegalArgumentException e) {\n //\n // cannot compute nth root for null or negative n: -1\n //\n assertThrownBy(\"org.apache.commons.math.MathRuntimeException\", e);\n }\n }", "@Test\n public void test33() throws Throwable {\n Complex complex0 = new Complex((-0.49999999999999994), (-0.49999999999999994));\n Complex complex1 = complex0.acos();\n Complex complex2 = complex0.sin();\n ComplexField complexField0 = complex0.getField();\n Complex complex3 = complex0.tanh();\n Complex complex4 = complex2.log();\n Complex complex5 = complex0.divide(complex2);\n Complex complex6 = complex2.sqrt();\n Complex complex7 = complex6.divide(complex4);\n Complex complex8 = complex4.pow(complex0);\n double double0 = complex6.getArgument();\n Complex complex9 = complex0.sinh();\n Complex complex10 = complex6.tanh();\n Complex complex11 = complex2.sqrt();\n Complex complex12 = complex0.negate();\n Complex complex13 = complex2.negate();\n Complex complex14 = complex3.conjugate();\n boolean boolean0 = complex2.isInfinite();\n boolean boolean1 = complex3.isInfinite();\n Complex complex15 = complex4.sinh();\n Complex complex16 = complex2.atan();\n boolean boolean2 = complex0.equals(\"}0\");\n Complex complex17 = complex2.subtract(complex3);\n ComplexField complexField1 = complex11.getField();\n boolean boolean3 = complex2.isNaN();\n Complex complex18 = complex11.pow(complex4);\n Complex complex19 = complex16.conjugate();\n Complex complex20 = complex16.cos();\n Complex complex21 = complex19.cosh();\n Complex complex22 = complex1.pow(complex6);\n Complex complex23 = (Complex)complex20.readResolve();\n }", "public static float sin(float degrees) {\r\n return sinLookup((int) (degrees * precision + 0.5f));\r\n }", "public static Expression degreesToRadians(final Expression value) {\n return new Expression(\"$degreesToRadians\", value);\n }", "public static Expression tan(final Expression value) {\n return new Expression(\"$tan\", value);\n }", "public static void main(String[] args) {\r\n\tSlingFunction f = new Sin(\r\n\t\tnew Arithmetic('*', new Point(0, 10), new T()));\r\n\tSystem.out.println(f);\r\n}" ]
[ "0.659713", "0.6470827", "0.6402582", "0.6313157", "0.61461335", "0.61226094", "0.603533", "0.5862672", "0.5860246", "0.5844054", "0.58351386", "0.582866", "0.58235836", "0.5821619", "0.5793814", "0.57712203", "0.57261103", "0.5723308", "0.5715734", "0.5707428", "0.56627584", "0.5655922", "0.56553143", "0.5654677", "0.5646579", "0.5632573", "0.5622398", "0.55983037", "0.55914783", "0.5585057", "0.5565523", "0.55640554", "0.5562088", "0.5558467", "0.5548152", "0.5543855", "0.5543226", "0.55363107", "0.5530135", "0.5513768", "0.5491581", "0.54856443", "0.5481976", "0.54684967", "0.54680556", "0.5448889", "0.5429566", "0.5420338", "0.5394669", "0.53913766", "0.53432506", "0.5341297", "0.5341094", "0.53409266", "0.5326933", "0.53257453", "0.53155684", "0.5312248", "0.53036135", "0.5282826", "0.52753526", "0.5213461", "0.52129835", "0.5204106", "0.5182927", "0.5175503", "0.51739126", "0.51738", "0.51718205", "0.51703906", "0.51647115", "0.5151571", "0.514927", "0.5138391", "0.51359075", "0.5129301", "0.5127905", "0.5124962", "0.5122266", "0.5116206", "0.5113993", "0.510711", "0.5096126", "0.50922275", "0.5088654", "0.5085592", "0.50815296", "0.5078373", "0.5072902", "0.5071205", "0.5062793", "0.50623024", "0.5059275", "0.50588435", "0.5053617", "0.5049307", "0.5044608", "0.50423354", "0.5039673", "0.5031241", "0.50262976" ]
0.0
-1
Class constructor; opens a window.
public GUI(Graph G, List<double[]> V, List<Integer> P, double[] mapBounds) { this.P = P; initialize(G, V, mapBounds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void open() {\n\t\tthis.createContents();\n\n\t\tWindowBuilder delegate = this.getDelegate();\n\t\tdelegate.setTitle(this.title);\n\t\tdelegate.setContents(this);\n\t\tdelegate.setIcon(this.iconImage);\n\t\tdelegate.setMinHeight(this.minHeight);\n\t\tdelegate.setMinWidth(this.minWidth);\n\t\tdelegate.open();\n\t}", "public void openWindow()\r\n {\r\n myWindow = new TraderWindow(this);\r\n while(!mailbox.isEmpty())\r\n {\r\n myWindow.showMessage( mailbox.remove() );\r\n }\r\n }", "public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }", "private NKE_BrowserWindow() {}", "public ICurrentPage openNewWindow(String url);", "void createWindow();", "public void newWindow() {\n\t\tJMenuTest frame1 = new JMenuTest();\n\t\tframe1.setBounds(100, 100, 400, 400);\n\t\tframe1.setVisible(true);\n\t}", "private void openClientManagementWindow() {\r\n\t\tnew JFrameClient();\r\n\t}", "public Window(){\n\n screen = new Screen();\n add(screen);\n\n setSize(800,800);\n\n setTitle(\"Java Worm v0.1\");\n System.out.println(\"Java Worm v0.1\");\n\n setVisible(true);\n }", "public void open() {\n display = Display.getDefault();\n createContents();\n shell.open();\n shell.layout();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch()) {\n display.sleep();\n }\n }\n\n // programme stop with exit 0\n System.exit(0);\n\n }", "public OpenMonitorInstanceDialog() {\n super();\n setTitle(\"Open Monitor Instance\");\n initComponents();\n setLocationRelativeTo(getOwner());\n getRootPane().setDefaultButton(btnOpen);\n }", "public Window(String title) {\n this.title = title;\n }", "public void createPopupWindow() {\r\n \t//\r\n }", "public JFrame openInWindow(String title)\n {\n JFrame frame = new JFrame(title);\n frame.setContentPane(this);\n frame.pack();\n frame.setResizable(false);\n frame.setLocationRelativeTo(null);\n\n return frame;\n }", "public abstract void start(String[] args, Window window);", "public GameWindow() {\n\t\tthis.initWindow();\n\t}", "public void open() {\r\n\t\tthis.setVisible(true);\r\n\t}", "public static void main(String[] args) {\n\t\tnew Window(); //creates a new window\n\t}", "public NewJFrame1(NewJFrame n) {\n main = n;\n initComponents();\n winOpen();\n setLocationFrame();\n this.setVisible(true);\n }", "public SettingsWindow()\n {\n House.seed = System.currentTimeMillis();\n initWindow();\n showWindows();\n }", "public BaciWindow() {\r\n}", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "private void createWindow() throws Exception {\r\n Display.setFullscreen(false);\r\n Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));\r\n Display.setTitle(\"Program 2\");\r\n Display.create();\r\n }", "private void openManagementWindow() {\n\n\t\tWindowManager.getInstance().openManagementWindow();\n\t\t// Close the current window\n\t\tthis.close();\n\t}", "public void open();", "public void open();", "public NewSessionGui() {\n initComponents();\n client = new HttpBraimClient();\n setLocationRelativeTo(null);\n }", "public void Open() {\r\n\t click();\r\n\t }", "private void openUserManagementWindow() {\r\n\t\tnew JFrameUser();\r\n\t}", "public void open() {\n\t\ttry {\n\t\t\tdisplay = Display.getDefault();\n\t\t\tcreateContents();\n\t\t\tcreateTray(display);\t//system tray\n\t\t\tshell.open();\n\t\t\tshell.layout();\n\t\t\twhile (!shell.isDisposed()) {\n\t\t\t\tthis.setAppEnd(true);\n\t\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t}\n\t\t\t}\n\t\t\tterminarPWs(); //cerrar todos los trabajos de impresion que hay dando vueltas por ahi.\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.print(e.getMessage());\n\t\t}\n\t}", "public void openOptionsWindow() {\n\t\tthis.dispose();\t//built-in method to destroy this GUI.\n\t\tnew SARMain().setVisible(true);\n\t}", "public void init() {\n this.window = new PWWindow(this.project);\n }", "private static void createWindow(){\n try{\n\n displayMode = new DisplayMode(1600 ,900);\n Display.setDisplayMode(displayMode);\n\n /*\n Display.setDisplayMode(getDisplayMode(1920 ,1080,false));\n if(displayMode.isFullscreenCapable()){\n Display.setFullscreen(true);\n }else{\n Display.setFullscreen(false);\n }\n */\n Display.setTitle(\"CubeKraft\");\n Display.create();\n }catch (Exception e){\n for(StackTraceElement s: e.getStackTrace()){\n System.out.println(s.toString());\n }\n }\n }", "public static void main(String[] args) throws Exception{\n Window window = new Window();\n window.createWindow();\n }", "public TutorialWindow() {\n initComponents();\n }", "public Window() {\n initComponents();\n SetIcon();\n \n }", "public void open() {\n\n\t\tresize();\n\t\tgenerateLinks();\n\t\tshowing = true;\n\n\t}", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "void init(Window window) throws Exception;", "private void openUserReporttWindow() {\r\n\t\tnew JFrameReport();\r\n\t}", "public FinancialTrackerHelpWindow() {\n this(new Stage());\n }", "public HelpWindow(URL url) \n {\n setFrameIcon(); //set the icon shown on the top left side of the frame\n\n this.initComponents(); //initialises various components\n\n /*\n * Set the page to the JEditorPane\n */\n try \n {\n currentPage = url;\n this.mainEditorPane.setContentType(\"txt/html\");\n this.mainEditorPane.setPage(currentPage);\n } \n catch (IOException ex) \n {\n ex.printStackTrace();\n }\n }", "public abstract void init(Window window);", "public WindowLoader(Node window) {\n w = (Stage) window.getScene().getWindow();\n }", "public void open(){\n }", "public Shell open(Display iDisplay, Shell iShell)\r\n {\r\n //this.iDisplay = iDisplay;\r\n this.iShell = (iShell != null) ? iShell : new Shell();\r\n createShellContents();\r\n this.iShell.open();\r\n return this.iShell;\r\n }", "public static void goToPlaylistChooserWindow()\n {\n PlaylistChooser playlistChooser = new PlaylistChooser();\n playlistChooser.setVisible(true);\n playlistChooser.setFatherWindow(actualWindow, false);\n }", "public void mainWindow() {\n new MainWindow(this);\n }", "public GameWindow() {\n\t\tif (!ENABLED) {\n\t\t\t// Don't touch anything that could cause an X11 call, since this\n\t\t\t// might mess up a test being run over SSH.\n\t\t\tframe = null;\n\t\t\twhoseTurnLabel = null;\n\t\t\tboardPanel = null;\n\t\t} else {\n\t\t\tframe = new JFrame();\n\t\t\tframe.setTitle(\"Fox and Geese\");\n\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\n\t\t\tJPanel content = new JPanel();\n\t\t\tcontent.setLayout(new BorderLayout());\n\t\t\tframe.setContentPane(content);\n\t\n\t\t\tboardPanel = new BoardPanel();\n\t\t\tcontent.add(boardPanel, BorderLayout.CENTER);\n\t\n\t\t\t// Make a row of status labels along the bottom of the window.\n\t\t\tBox status = new Box(BoxLayout.X_AXIS);\n\t\t\tcontent.add(status, BorderLayout.SOUTH);\n\t\n\t\t\twhoseTurnLabel = new JLabel();\n\t\t\twhoseTurnLabel.setBorder(\n\t\t\t\t\tBorderFactory.createEmptyBorder(2, 2, 2, 2));\n\t\t\tstatus.add(whoseTurnLabel);\n\t\n\t\t\t// Determine frame size based on subcomponents.\n\t\t\tframe.pack();\n\t\t}\n\t\t\n\t\tsynchronized (INSTANCES) {\n\t\t\tINSTANCES.add(this);\n\t\t}\n\t}", "@FXML\n private void openForwardWindow() {\n try {\n ComposeEmailWindow cew = new ComposeEmailWindow(\"FWD: \", \"\",\n this.subjectContent.getText(), this.msgContent.getText());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public GameWindow() {\r\n\r\n\t\tsuper(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.DOUBLE_BUFFERED);\r\n\r\n\t\tshell.setText(WINDOW_TITLE);\r\n\t\tshell.setBackground(display.getSystemColor(SWT.COLOR_BLACK));\r\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent event) {\r\n\t\t\t\tclose();\r\n\t\t\t\tevent.doit = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Set up the OpenGL canvas\r\n\t\tGLData gldata = new GLData();\r\n\t\tgldata.doubleBuffer = true;\r\n\t\tgldata.sampleBuffers = 1;\r\n\t\tgldata.samples = 4;\r\n\t\tcanvas = new GLCanvas(shell, SWT.NONE, gldata);\r\n\t}", "public REGISTER_WINDOW() {\n initComponents();\n }", "private static void createWindow(final Serializable object) {\n\t\tDIALOG.setVisible(false);\n\t\tFrameFactory.createFrame(object);\n\t}", "public void open() {\r\n\t}", "@FXML\n private void openComposeWindow() {\n try {\n ComposeEmailWindow cew = new ComposeEmailWindow(\"\", \"\", \"\", \"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void open()\n {\n }", "public static void anchorNewWindow(StringBuffer aBuf, String aCaption,\n String aUrl, String aWindowName,\n int aWidth, int aHeight,\n boolean aMenuBar, boolean aToolBar,\n boolean aLocation, boolean aStatus,\n boolean aScrollBars, boolean aResizable) {\n aBuf.append(\"<a target='\").append(aWindowName);\n aBuf.append(\"' href='\").append(aUrl);\n aBuf.append(\"' OnClick=\\\"window.open('\");\n aBuf.append(aUrl);\n aBuf.append(\"', '\").append(aWindowName);\n aBuf.append(\"', '\");\n appendFeature(aBuf, \"menubar\", aMenuBar);\n appendFeature(aBuf, \"toolbar\", aToolBar);\n appendFeature(aBuf, \"location\", aLocation);\n appendFeature(aBuf, \"status\", aStatus);\n appendFeature(aBuf, \"scrollbars\", aScrollBars);\n appendFeature(aBuf, \"resizable\", aResizable);\n if (aWidth >0)\n appendFeature(aBuf, \"width\", aWidth);\n if (aHeight >0) {\n aBuf.append(',');\n appendFeature(aBuf, \"height\", aHeight);\n }\n aBuf.append(\"')\\\">\").append(aCaption);\n aBuf.append(\"</A>\").append(NEW_LINE);\n}", "public void open() {\n\t}", "public NewJFrame() {\n Connect();\n initComponents();\n }", "public static void goToAboutWindow()\n {\n AboutWindow aboutWindow = new AboutWindow();\n aboutWindow.setVisible(true);\n aboutWindow.setFatherWindow(actualWindow, false);\n }", "private void openHistoryManagementWindow() {\r\n\t\tnew JFrameHistory(this.jFrameMainWindow.getUser());\r\n\t}", "@Override\n public void windowOpened(WindowEvent e) {\n this.mostrar();\n }", "public Window()\n\t{\n\t\t//Appel du constructeur de jFrame\n\t\tsuper();\n\n\t\tsetTitle(\"Administration des livres\");\n\t\tsetSize(nWindowWidth, nWindowHeight);\n\t\tsetLocationRelativeTo(null);// Centré\n\t\tsetResizable(false); // non redimentionnable\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// Action du bouton close\n\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tsetContentPane(panel);\n\t\t\n\n\t\t//Mise en place des onglets\n\t\tpConfig = new PageConfig();\n\t\tpBookPage = new PageBook();\n\t\t\n\t\tptTabs = new JTabbedPane();\n\t\tptTabs.setBounds(0, 0, nWindowWidth, nWindowHeight - 29);\n\t\tptTabs.add(\"Configuration\", pConfig);\n\t\tptTabs.add(\"Livres\", pBookPage);\n\t\tptTabs.addChangeListener(this);\n\t\tpanel.add(ptTabs);\n\t\t//\n\n\t\t// Actualisation de la page de configuration\n\t\tpConfig.update();\n\t}", "public WindowGame() {\n\n\t\t// Frame Settings\n\t\twindow = new JFrame(\"Tetris\");\n\t\twindow.setSize(WIDTH, HEIGHT);\n//\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.setLocationRelativeTo(null); // puts the window in the center of the screen\n\t\twindow.setResizable(false);\n\n\t\tboard = new Board();\n\t\twindow.add(board);\n\t\twindow.addKeyListener(board);\n\t\twindow.setVisible(true);\n\t}", "public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "static public void make() {\n\t\tif (window != null)\n\t\t\treturn;\n\n\t\twindow = new JFrame();\n\t\twindow.setTitle(\"Finecraft\");\n\t\twindow.setMinimumSize(new Dimension(500, 300));\n\t\twindow.setSize(asInteger(WINDOW_WIDTH), asInteger(WINDOW_HEIGHT));\n\t\twindow.setResizable(asBoolean(WINDOW_RESIZE));\n\t\twindow.setLocationRelativeTo(null);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "public HelpWindow(File file) \n {\n setFrameIcon(); //set the icon shown on the top left side of the frame\n \n this.initComponents(); //initialises various components\n\n /*\n * Set the page to the JEditorPane\n */\n try \n {\n currentPage = file.toURI().toURL(); //URL of the html to be displayed\n \n this.mainEditorPane.setContentType(\"txt/html\");\n //this.mainEditorPane.setText(defaultURL);\n \n this.mainEditorPane.setPage(currentPage);\n } \n catch (IOException ex) \n {\n ex.printStackTrace();\n }\n }", "public void startWindow() {\r\n \r\n \tfirstBorderWindow = new BorderPane();\r\n \tScene scene = new Scene(firstBorderWindow,600,600);\r\n\t\tstage.setScene(scene);\r\n\t\t\r\n\t\t//MenuBar\r\n\t\tMenuBar mb = new MenuBar();\r\n\t\tMenu topMenu = new Menu(\"Impostazioni\");\r\n\t\t\r\n\t\tMenuItem regole = new MenuItem(\"Regole\");\r\n\t\tMenuItem esci = new MenuItem(\"Esci\");\r\n\t\ttopMenu.getItems().addAll(esci, regole);\r\n\t\tmb.getMenus().add(topMenu);\r\n\t\t\r\n\t\tEventHandler<ActionEvent> MEHandler = new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tString nome = ((MenuItem)event.getTarget()).getText();\r\n\t\t\t\tif (nome.equals(\"Esci\")) Platform.exit();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tesci.setOnAction(MEHandler);\r\n\t\t\r\n\t\tfirstBorderWindow.setTop(mb);\r\n\t\t// Show the scene\r\n\t\tstage.show();\r\n }", "mainWindow(String title, String location) {\n\t\tsuper(title); //sets the title of the window\n\t\tthis.location = location; //the location of all images and resources\n\t\t\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE); //allows the window to be closed\n\t\tthis.setVisible(true); //shows the window\n\t\tthis.setSize(900, 650); //sets the preferred size\n\t\tthis.setResizable(false); //size cannot be changed\n\t\tdrawWindow(); //makes the window\n\t\tthis.pack();\n\t}", "@Override\n public void projectOpened() {\n ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);\n JPanel myContentPanel = new JPanel(new BorderLayout());\n ShareToolWin toolWin = new ShareToolWin();\n myContentPanel.add(toolWin.getRootPanel(), BorderLayout.CENTER);\n ToolWindow toolWindow = toolWindowManager.registerToolWindow(TOOL_WINDOW_ID, false, ToolWindowAnchor.LEFT);\n toolWindow.getComponent().add(myContentPanel);\n }", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "public WindowDecorator(Window window) {// creates a window\n this.window = window;\n }", "public Object open() {\n // Create a new shell object and set the text for the dialog.\n Shell parent = getParent();\n shell = new Shell(parent, SWT.DIALOG_TRIM);\n shell.setText(\"Edit Colormaps\");\n\n // Setup all of the layouts and the controls.\n setup();\n\n // Open the shell to display the dialog.\n shell.open();\n\n // Wait until the shell is disposed.\n Display display = parent.getDisplay();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n\n return null;\n }", "@Override\n public void start( Stage window ) throws Exception\n {\n FXMLLoader loader = new FXMLLoader( Scrabble.class.getResource( \"/openingWindow.fxml\" ) );\n // Creating an instance of the controller of openingWindow.fxml to pass the object references\n OpeningWindowController OWController = new OpeningWindowController( Board, Pool, PlayerOne, PlayerTwo );\n loader.setController( OWController ); // setting the controller for openingWindow.fxml\n Parent root = (Parent) loader.load();\n window.setTitle( \"Scrabble\" );\n window.setScene( new Scene( root, 1028, 500 ) );\n window.setResizable( false ); // making the window fixed in size and not-resizable\n window.show();\n }", "public static void launchingBrowser() throws Exception {\n\n\t\tString applicationURL = merchEnv.getProtocol() + \"://\"\n\t\t\t\t+ merchEnv.getHost() + \":\" + merchEnv.getPort() + \"/\";\n\t\tselectedBrowser = merchEnv.getBrowser();\n\t\ttry {\n\t\t\tbaseScreen = new BaseScreen(selectedBrowser, applicationURL,\n\t\t\t\t\tmerchEnv.getContext(), merchEnv, merchUserInfo, merchUI);\n\t\t} catch (ScreenException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }", "public MainWindow() {\r\n\t\tsuper(null);\r\n try {\r\n FileVersionUtil.initializeVersionMap();\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(null, \"读取年度生产二维码数目错误\", \"启动出错\", JOptionPane.WARNING_MESSAGE);\r\n System.exit(0);\r\n return;\r\n }\r\n\t\tsetShellStyle(SWT.CLOSE | SWT.TITLE | SWT.MIN);\r\n\t\tcreateActions();\r\n\t\taddToolBar(SWT.FLAT | SWT.WRAP);\r\n\t\taddMenuBar();\r\n\t\taddStatusLine();\r\n\t}", "protected Popup() {}", "public void windowOpened (WindowEvent we) { }", "void loadwindow(String loc, String title){\n\t \ttry{\n\t \t\tParent parent = FXMLLoader.load(getClass().getClassLoader().getResource(loc));\n\t \t\tStage stage = new Stage(StageStyle.DECORATED);\n\t \t\tstage.setTitle(title);\n\t \t\tstage.setScene(new Scene(parent));\n\t \t\tstage.show();\n\t \t\t \t}catch (IOException e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t \t\t \t\tLogger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, e);\n\t\t\t\t\t}\n\t }", "public static void main(String[] args) {\n showWindow();\r\n\t}", "public CalculatorWindow ( )\n\t{\n\t\t/* Name of the window set using the super constructor. Size of the window initialized to \n\t\t * default values of WINDOW_WIDTH and WINDOW_HEIGHT. Default layout set to the value of\n\t\t * faceGrid which is defined as a GridLayout with 2 rows and 1 column. Vertical gap between\n\t\t * components set to a default of 3 using the vGap variable. */\n\t\tsuper(\"Calculator\");\n\t\tthis.setSize (WINDOW_WIDTH, WINDOW_HEIGHT);\n\t\tthis.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\n\t\tthis.setLayout(faceGrid);\t\t\n\t\tvGap = 3;\n\t\tfaceGrid.setVgap(vGap);\n\t\t\n\t\t/* Icon loaded and set, components added, menu bar, menus, and menu items created, all \n\t\t * panels created. \t*/\n\t\tloadAndSetIcon();\n\t\taddComponents();\n\t\tcreateMenu();\n\t\tthis.setJMenuBar(menuBar);\n\t\tcreateTextPanel();\n\t\tcreateFunctionPanel();\n\t\tcreateHeaderPanel();\n\t\tcreateFooterPanel();\n\t\t\n\t\t/* Main panels added to the window\t*/\n\t\tadd(headerPanel);\n\t\tadd(footerPanel);\t\t\n\t\t\n\t\t/* All listeners created here */ \n\t\taddMenuListeners();\n\t\taddNumberListeners();\n\t\taddFunctionListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t/* Visible option initialized to true, resizable option initialized to false, location set\n\t\t * relative to null so that the window is centered on the screen, default action when enter\n\t\t * pressed is set to equals */\n\t\tthis.setVisible (true);\t\t\n\t\tthis.setResizable(false);\n\t\tthis.setLocationRelativeTo (null);\n\t\tgetRootPane().setDefaultButton(equals);\t\t\n\t\tbase = 10;\t\t\n\t}", "public interface Window {\n\t\n\t/**\n\t * Provides all available display modes that this window\n\t * can be set to.\n\t * \n\t * @return All available displays modes.\n\t */\n\tDisplayMode[] getAvailableDisplayModes();\n\t\n\t/**\n\t * @return current window title.\n\t */\n\tString getTitle();\n\t\n\t/**\n\t * Sets the display mode for this window.\n\t * The safest way to change the display mode is\n\t * to do this before the window is actually visible\n\t * on screen. Some implementations may fail when\n\t * change will be done on fly.\n\t * \n\t * @param mode Display mode to set.\n\t */\n\tvoid setDisplayMode(DisplayMode mode);\n\t\n\t/**\n\t * Sets the window title.\n\t * \n\t * @param title The window title to set.\n\t */\n\tvoid setTitle(String title);\n\t\n\t/**\n\t * Shows the actual application window. It cannot be\n\t * hidden until application stops.\n\t */\n\tvoid show();\n}", "public Window(String title, int width, int height){\n this(title, width, height, Type.WINDOWED, -1, false);\n }", "public Main_Window() {\n initComponents();\n getConnection();\n //Show_database();\n }", "public static void createAndShowStartWindow() {\n\n\t\t// Create and set up the window.\n\n\t\tstartMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// panel will hold the buttons and text\n\t\tJPanel panel = new JPanel() {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t// Fills the panel with a red/black gradient\n\t\t\tprotected void paintComponent(Graphics grphcs) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) grphcs;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\t\t\tColor color1 = new Color(119, 29, 29);\n\t\t\t\tColor color2 = Color.BLACK;\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, color1, 0, getHeight() - 100, color2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(grphcs);\n\t\t\t}\n\t\t};\n\n\t\tpanel.setOpaque(false);\n\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n\n\t Font customFont = null;\n\t \n\n\t\ttry {\n\t\t customFont = Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")).deriveFont(32f);\n\n\t\t GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\t ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")));\n\t\t\n\n\t\t} catch (IOException|FontFormatException e) {\n\t\t //Handle exception\n\t\t}\n\t\t\n\n\t\t\n\t\t// Some info text at the top of the window\n\t\tJLabel welcome = new JLabel(\"<html><center><font color='white'> Welcome to <br> Ultimate Checkers! </font></html>\",\n\t\t\t\tSwingConstants.CENTER);\n\t\twelcome.setFont(customFont);\n\t\n\n\t\twelcome.setPreferredSize(new Dimension(200, 25));\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\n\t\t// \"Rigid Area\" is used to align everything\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 40)));\n\t\tpanel.add(welcome);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 50)));\n\t\t//panel.add(choose);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\n\t\t// The start Window will have four buttons\n\t\t// Button1 will open a new window with a standard checkers board\n\t\tJButton button1 = new JButton(\"New Game (Standard Setup)\");\n\n\t\tbutton1.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\tNewGameSettings.createAndShowGameSettings();\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\t\t// Setting up button1\n\t\tbutton1.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton1.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button2 will open a new window where a custom setup can be created\n\t\tJButton button2 = new JButton(\"New Game (Custom Setup)\");\n\t\tbutton2.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Begin creating custom game board setup for checkers\n\t\t\t\t\t\tNewCustomWindow.createAndShowCustomGame();\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button2\n\t\tbutton2.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton2.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button3 is not implemented yet, it will be used to load a saved game\n\t\tJButton button3 = new JButton(\"Load A Saved Game\");\n\t\tbutton3.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton3.setMaximumSize(new Dimension(250, 40));\n\t\tbutton3.addActionListener(new ActionListener() {\n\n\t\t\tfinal JFrame popupWrongFormat = new PopupFrame(\n\t\t\t\t\t\"Wrong Format!\",\n\t\t\t\t\t\"<html><center>\"\n\t\t\t\t\t\t\t+ \"The save file is in the wrong format! <br><br>\"\n\t\t\t\t\t\t\t+ \"Please make sure the load file is in csv format with an 8x8 table, \"\n\t\t\t\t\t\t\t+ \"followed by whose turn it is, \"\n\t\t\t\t\t\t\t+ \"the white player type and the black player type.\"\n\t\t\t\t\t\t\t+ \"</center></html>\");\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// This will create the file chooser\n\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\n\n\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"CSV Files\", \"csv\");\n\t\t\t\t\t\tchooser.setFileFilter(filter);\n\n\t\t\t\t\t\tint returnVal = chooser.showOpenDialog(startMenu);\n\t\t\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\t\tFile file = chooser.getSelectedFile();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcheckAndPlay(file);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tpopupWrongFormat.setVisible(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Do nothing. Load cancelled by user.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Button4 closes the game\n\t\tJButton button4 = new JButton(\"Exit Ultimate Checkers\");\n\t\tbutton4.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button4\n\t\tbutton4.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton4.setMaximumSize(new Dimension(250, 40));\n\n\t\t// The four buttons are added to the panel and aligned\n\t\tpanel.add(button1);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button2);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button3);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 80)));\n\t\tpanel.add(button4);\n\n\t\t// Setting up the start Menu\n\t\tstartMenu.setSize(400, 600);\n\t\tstartMenu.setResizable(false);\n\n\t\t// Centers the window with respect to the user's screen resolution\n\t\tDimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint x = (int) ((dimension.getWidth() - startMenu.getWidth()) / 2);\n\t\tint y = (int) ((dimension.getHeight() - startMenu.getHeight()) / 2);\n\t\tstartMenu.setLocation(x, y);\n\n\t\tstartMenu.add(panel, BorderLayout.CENTER);\n\t\tstartMenu.setVisible(true);\n\n\t}", "public Window()\n {\n // sets title\n super(\"Awesome Calculator\");\n\n // generated design code\n initComponents();\n\n conversions.addListSelectionListener(this);\n\n // sets up the map\n buttons = new JButton[]{\n zero, one, two, three, four,\n five, six, seven, eight, nine\n };\n\n // stores the initial button color\n init = zero.getBackground();\n\n // center frame on screen\n setLocationRelativeTo(null);\n\n // don't have to worry about component focus\n KeyboardFocusManager.getCurrentKeyboardFocusManager()\n .addKeyEventDispatcher(new KeyEventDispatcher()\n {\n @Override\n public boolean dispatchKeyEvent(KeyEvent event)\n {\n if (event.getID() == KeyEvent.KEY_PRESSED)\n {\n keyPressed(event);\n }\n\n return false;\n }\n }\n );\n }", "public GuiController()\n {\n\n DefaultTerminalFactory terminalFactory = new DefaultTerminalFactory();\n PageStack = new ArrayDeque<>(); // Gives us a screen stack\n window = new BasicWindow(\"Just put anything, I don't even care\");\n try\n {\n screen = terminalFactory.createScreen(); //Populates screen\n screen.startScreen(); //Runs screen\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n textGUI = new MultiWindowTextGUI(screen);\n\n }", "protected void open()\n {\n }", "public void createWindow() throws IOException {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"adminEditorWindow.fxml\"));\n AnchorPane root = (AnchorPane) loader.load();\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.setResizable(false);\n stage.setScene(scene);\n stage.setTitle(\"Administrative Password Editor\");\n stage.getIcons().add(new Image(\"resources/usm seal icon.png\"));\n stage.show();\n\t}", "public abstract void newWindow(ReFrame newFrame);", "public NinjaFrame() {\r\n\r\n\t\tprofile = new ProfileFrame();\r\n\t\tbotP = new BotInfoPanel();\r\n\t\tsCenterP = new SearchResultPage();\r\n\t\ttopP = new TopInfoPanel(this, sCenterP);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\r\n\t\tiniciateFrame();\r\n\t}", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "private JFrame buildWindow() {\n frame = WindowFactory.mainFrame()\n .title(\"VISNode\")\n .menu(VISNode.get().getActions().buildMenuBar())\n .size(1024, 768)\n .maximized()\n .interceptClose(() -> {\n new UserPreferencesPersistor().persist(model.getUserPreferences());\n int result = JOptionPane.showConfirmDialog(panel, Messages.get().singleMessage(\"app.closing\"), null, JOptionPane.YES_NO_OPTION);\n return result == JOptionPane.YES_OPTION;\n })\n .create((container) -> {\n panel = new MainPanel(model);\n container.add(panel);\n });\n return frame;\n }", "public Game() {\n\t\toptions = Options.load();\n\t\tmenu = new Menu(this);\n\t\twindow = new JFrame(Game.TITLE);\n\t\twindow.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\t\twindow.setMinimumSize(new Dimension(window.getWidth(), window.getHeight()));\n\t\twindow.setLocationRelativeTo(null);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.setVisible(true);\n\t\tloadMenu();\n\t}", "public LoginWindow()\n {\n super(\"Login\");\n\n myLoginPanel = new LoginPanel(this);\n this.setResizable(false);\n this.setContentPane(makePanel());\n this.pack();\n this.setVisible(true);\n }", "@Override\r\n\tprotected final void createAppWindows() {\r\n \t//Instantiate only DD-specific windows. SFDC-scope windows (such as mainWindow) are static\r\n \t// objects in the EISTestBase class\r\n \tmyDocumentsPopUp = createWindow(\"WINDOW_MY_DOCUMENTS_POPUP_PROPERTIES_FILE\");\r\n }", "public void start() {\r\n\t\tif (FormsContext.isFormsServicesApp()) {\r\n\t\t\tinitialOpenLWWindows = new LWWindowOperator().getWindowTitles();\r\n\t\t} else {\r\n\r\n\t\t}\r\n\t}", "public Window(Frame parent) {\n this(parent, (GraphicsConfiguration) null); \n }", "public MainWindow()\n\t{\n\t\tsettingsWindow = new SettingsWindow(this);\n\t\t\n\t\tplayingField = null;\n\t\t\n\t\tthis.setTitle(\"Minesweeper\");\n\t\tthis.setResizable(false);\n\t\tthis.setJMenuBar(createMenuBar());\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tthis.newGame();\n\t\t\n\t\tthis.setVisible(true);\n\t}", "public Open() {\n //creates a new open instance\n }" ]
[ "0.7322804", "0.7154923", "0.7103525", "0.68865854", "0.68834007", "0.6878085", "0.6711289", "0.6672427", "0.6621666", "0.6588469", "0.65777767", "0.6529149", "0.6497642", "0.64867157", "0.6479744", "0.64660984", "0.64313686", "0.6430655", "0.6429152", "0.64254034", "0.64100397", "0.6391577", "0.63747966", "0.63719875", "0.637096", "0.637096", "0.63408613", "0.6328436", "0.630569", "0.625675", "0.6255718", "0.62520677", "0.6237107", "0.62302727", "0.6221342", "0.62175214", "0.6216992", "0.62150973", "0.6206374", "0.62036246", "0.61720353", "0.61528265", "0.6112865", "0.6111521", "0.61114156", "0.61103386", "0.61053723", "0.61021507", "0.60881436", "0.60820645", "0.60787535", "0.60775065", "0.6069702", "0.6058839", "0.6045286", "0.60364854", "0.60357934", "0.60315543", "0.6031185", "0.6030819", "0.60288674", "0.59993666", "0.5998922", "0.59941435", "0.5992651", "0.5989684", "0.59780365", "0.597458", "0.59734476", "0.59730655", "0.5970912", "0.5964315", "0.5954466", "0.595277", "0.59480387", "0.59466773", "0.5945519", "0.5938785", "0.59347105", "0.5932234", "0.59277636", "0.59115005", "0.5910222", "0.59091085", "0.5899498", "0.58980775", "0.5893791", "0.589098", "0.5865991", "0.58624816", "0.586133", "0.5859648", "0.5856237", "0.58560866", "0.5850992", "0.58490527", "0.5829673", "0.5828293", "0.5827542", "0.58267844", "0.5825035" ]
0.0
-1
Initializes JFrame and other necessary variables.
private void initialize(Graph G, List<double[]> V, double[] mapBounds) { mapContainer = new JLabel(); this.G = G; this.V = V; this.mapBounds = mapBounds; Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setBounds(0, 0, screenSize.width, screenSize.height); setTitle("Street Map"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); addImage(); setVisible(true); addMouseListener(new MouseInput()); title = "Title"; titleFont = new Font("Monospace", Font.BOLD, 13); subtitle = "Subtitle"; subtitleFont = new Font("Monospace", Font.BOLD, 10); roadWidth = 1; roadColor = Color.black; pathWidth = 3; pathColor = Color.red; zoom = 1.0; xF = yF = 0.5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1100, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tsetUIComponents();\n\t\tsetControllers();\n\n\t}", "private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"Media Inventory\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}", "private void initialize() {\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n\t\tthis.setTitle(\"Extremum Values\");\r\n\t\tthis.setSize(300,180);\r\n\t\tthis.setLocation(300, 100);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.getRootPane().setDefaultButton(getOkButton());\r\n\t\tthis.setVisible(true);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t}", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "private void initialize() {\r\n\t\t//setFrame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(125,175, 720, 512);\r\n\t\tframe.setTitle(\"Periodic Table\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"DB Filler\");\n\t\tframe.setBounds(100, 100, 700, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdbc = new DataBaseConnector();\n\t\tcreateFileChooser();\n\n\t\taddTabbedPane();\n\t\tsl_panel = new SpringLayout();\n\t\taddAddFilePanel();\n\t}", "private void initializeFrame()\r\n\t{\r\n\t\tthis.setResizable(false);\r\n\r\n\t\tsetSize(DIMENSIONS); // set the correct dimensions\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetLayout( new GridLayout(1,1) );\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"BirdSong\");\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\tframe.setBounds(100, 100, 400, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tabc = new BirdPanel();\n\t\ttime = new TimePanel();\n\t\tgetContentPane().setLayout(new BoxLayout(frame, BoxLayout.Y_AXIS));\n\n\t\tframe.getContentPane().add(abc, BorderLayout.NORTH);\n\t\tframe.getContentPane().add(time, BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }", "private void initFrame() {\n setLayout(new BorderLayout());\n }", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "public JFrame() {\n initComponents();\n }", "private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialize() {\n\t\tthis.setResizable(true);\n\t\tthis.setJMenuBar(getMbMain());\n\t\tthis.setSize(547, 453);\n\t\tthis.setContentPane(getCpMainFrame());\n\t\tthis.getGlassPane().setVisible(true);\n\t\tthis.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\tthis.setTitle(\"Mernis KPS �rnek Uygulamasi\");\n\t\tthis.addWindowListener(new java.awt.event.WindowAdapter() { \n\t\t\tpublic void windowClosing(java.awt.event.WindowEvent e) { \n\t\t\t\tclose(true);\n\t\t\t}\n\t\t});\n\t}", "public void init() {\n try {\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n public void run() {\n initComponents();\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "public MainFrame() {\n try {\n initComponents();\n initElements();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage());\n }\n }", "private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }", "private void initFrame() {\r\n\tframe = new JFrame( \"Dammen\" );\r\n\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\tframe.setSize(ScreenSize.WIDTH + 25, ScreenSize.HEIGHT + 50);\r\n\r\n\tframe.setVisible(true);\r\n\t\r\n\tframe.setLocationRelativeTo(null);\r\n }", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(Color.BLUE);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Reiner Hotel Kiosk\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\r\n\t\tlblNewLabel.setBounds(81, 11, 305, 89);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"Notify Managers\");\r\n\t\tbtnNewButton.setBounds(63, 137, 137, 23);\r\n\t\tframe.getContentPane().add(btnNewButton);\r\n\t\t\r\n\t\tJButton btnNewButton_1 = new JButton(\"Track Room Availability\");\r\n\t\tbtnNewButton_1.setBounds(231, 137, 166, 23);\r\n\t\tframe.getContentPane().add(btnNewButton_1);\r\n\t}", "private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}", "private void initialize1() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 630, 550);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(650,400);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(0, 0, 614, 512);\n\t\tframe.getContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJButton buttonTreinos = new JButton(\"Visualizar treinos\");\n\t\tbuttonTreinos.setBounds(224, 136, 186, 23);\n\t\tpanel.add(buttonTreinos);\n\t\t\n\t\tJButton btnAlunos = new JButton(\"Lista de Alunos\");\n\t\tbtnAlunos.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew ListaDeAlunos().frame.setVisible(true);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnAlunos.setBounds(224, 163, 186, 23);\n\t\tpanel.add(btnAlunos);\n\t\t\n\t\tJLabel lblGymManager = new JLabel(\"Gym Manager\");\n\t\tlblGymManager.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\tlblGymManager.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblGymManager.setBounds(220, 46, 165, 27);\n\t\tpanel.add(lblGymManager);\n\t\t\n\t\tJButton btnMatricularAluno = new JButton(\"Matricular Aluno\");\n\t\tbtnMatricularAluno.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew TelaAlunoCadastro().setVisible(true);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnMatricularAluno.setBounds(224, 192, 186, 23);\n\t\tpanel.add(btnMatricularAluno);\n\t}", "private void initialize()\n\t{\n\t\tthis.setModal(true);\t\t\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(450,400);\n\t\tScreenResolution.centerComponent(this);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblCoisa = new JLabel(\"Coisa\");\n\t\tlblCoisa.setBounds(10, 11, 46, 14);\n\t\tframe.getContentPane().add(lblCoisa);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(39, 8, 86, 20);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }", "public JGSFrame() {\n\tsuper();\n\tinitialize();\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\t\t\n\t\tJLabel lblDesignCopyrights = new JLabel(\"design copyrights \\u00A9 chinmaya\");\n\t\tlblDesignCopyrights.setFont(new Font(\"Times New Roman\", Font.PLAIN, 14));\n\t\tlblDesignCopyrights.setForeground(new Color(255, 255, 224));\n\t\tlblDesignCopyrights.setBounds(1711, 1018, 183, 23);\n\t\tframe.getContentPane().add(lblDesignCopyrights);\n\t\t\n\t\tJPanel background = new JPanel();\n\t\tbackground.setLayout(null);\n\t\tbackground.setBackground(Color.DARK_GRAY);\n\t\tbackground.setBounds(14, 200, 1880, 809);\n\t\tframe.getContentPane().add(background);\n\t\t\n\t\t\n\t\tJLabel lblTypesOfMachine = new JLabel(\"MACHINE NAME\");\n\t\tlblTypesOfMachine.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblTypesOfMachine.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblTypesOfMachine.setForeground(Color.WHITE);\n\t\tlblTypesOfMachine.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblTypesOfMachine.setBounds(69, 378, 178, 30);\n\t\tbackground.add(lblTypesOfMachine);\n\t\t\n\t\t\n\t\tJLabel lblAppointment = new JLabel(\"LIST TO DO\");\n\t\tlblAppointment.setForeground(Color.WHITE);\n\t\tlblAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblAppointment.setBounds(69, 117, 319, 48);\n\t\tbackground.add(lblAppointment);\n\t\t\n\t\tJLabel lblQuantity = new JLabel(\"QUANTITY\");\n\t\tlblQuantity.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblQuantity.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblQuantity.setForeground(Color.WHITE);\n\t\tlblQuantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblQuantity.setBounds(69, 428, 178, 30);\n\t\tbackground.add(lblQuantity);\n\t\t\n\t\tPanel panel = new Panel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setBounds(0, 30, 1880, 67);\n\t\tbackground.add(panel);\n\t\t\n\t\tJButton cusbtn = new JButton(\"CUSTOMER\");\n\t\tcusbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t customer cr = new customer();\n\t\t cr.csStart();\n\t\t frame.dispose();\n\t\t\t}\n\t\t});\n\t\tcusbtn.setForeground(Color.WHITE);\n\t\tcusbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcusbtn.setBackground(Color.BLACK);\n\t\tcusbtn.setBounds(1257, 11, 613, 44);\n\t\tpanel.add(cusbtn);\n\t\t\n\t\tJButton bilbtn = new JButton(\"INVOICE\");\n\t\tbilbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tadminInvoice inv= new adminInvoice();\n\t\t\t\tinv. adminInvoiceStart();\n\t\t\t\tframe.dispose();\n\n\t\t\t}\n\t\t});\n\t\tbilbtn.setForeground(Color.WHITE);\n\t\tbilbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbilbtn.setBackground(Color.BLACK);\n\t\tbilbtn.setBounds(633, 11, 613, 44);\n\t\tpanel.add(bilbtn);\n\t\t\n\t\tJButton prdbtn = new JButton(\"PRODUCTS\");\n\t\tprdbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tadminproducts prd = new adminproducts();\n\t\t\t\tprd.adminPrd();\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tprdbtn.setForeground(Color.WHITE);\n\t\tprdbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tprdbtn.setBackground(Color.BLACK);\n\t\tprdbtn.setBounds(10, 11, 613, 44);\n\t\tpanel.add(prdbtn);\n\t\t\n\t\tJLabel lblCustomerName = new JLabel(\"CUSTOMER NAME\");\n\t\tlblCustomerName.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblCustomerName.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblCustomerName.setForeground(Color.WHITE);\n\t\tlblCustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblCustomerName.setBounds(69, 278, 178, 30);\n\t\tbackground.add(lblCustomerName);\n\t\t\n\t\tJLabel lblMachineType = new JLabel(\"MACHINE TYPE\");\n\t\tlblMachineType.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblMachineType.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblMachineType.setForeground(Color.WHITE);\n\t\tlblMachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblMachineType.setBounds(69, 328, 178, 30);\n\t\tbackground.add(lblMachineType);\n\t\t\n\t\t\n\t\tJButton btnStore = new JButton(\"STORE\");\n\t\tbtnStore.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tString dateEntry=date.getText();\n\t\t\t\tString cusname= customerName.getText();\t\n\t\t\t\tString machType=machineType.getText();\n\t\t\t\tString machName=machineName.getText();\n\t\t\t\tString quan=quantity.getText();\n\t\t\t\tString dl= deadline.getText();\n\t\t\t\tConnection con;\n\t\t\t\tPreparedStatement insert;\n\t\t\t\t\n\t\t\t\tif(dateEntry.isEmpty()||cusname.isEmpty()||machName.isEmpty()||machType.isEmpty()||quan.isEmpty()||dl.isEmpty()) \n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"no field must be left empty\",\"registration error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\t\n\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \" Appointment added!!\");\n\t\t\t\t}\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t\t\t\tinsert = con.prepareStatement(\"insert into appointment (date,cusname,machType,machName,quan,deadline) values (?,?,?,?,?,?)\");\n\t\t insert.setString(1, dateEntry);\n\t\t insert.setString(2, cusname);\n\t\t insert.setString(3, machType);\n\t\t insert.setString(4, machName);\n\t\t insert.setString(5, quan);\n\t\t insert.setString(6, dl);\n\t\t insert.executeUpdate();\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnStore.setForeground(Color.WHITE);\n\t\tbtnStore.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnStore.setBackground(Color.BLACK);\n\t\tbtnStore.setBounds(580, 578, 116, 44);\n\t\tbackground.add(btnStore);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setBounds(1000, 230, 613, 267);\n\t\tbackground.add(scrollPane);\n\t\t\n\t\tinvoice = new JTable();\n\t\tscrollPane.setViewportView(invoice);\n\t\t\n\t\tJLabel lblInvoice = new JLabel(\"VIEW TO-DO LIST\");\n\t\tlblInvoice.setForeground(Color.WHITE);\n\t\tlblInvoice.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblInvoice.setBounds(1010, 117, 387, 48);\n\t\tbackground.add(lblInvoice);\n\t\t\n\t\tquantity = new JTextField();\n\t\tquantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tquantity.setColumns(10);\n\t\tquantity.setBounds(279, 428, 289, 30);\n\t\tbackground.add(quantity);\n\t\t\n\t\tmachineName = new JTextField();\n\t\tmachineName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineName.setColumns(10);\n\t\tmachineName.setBounds(279, 328, 289, 30);\n\t\tbackground.add(machineName);\n\t\t\n\t\tmachineType = new JTextField();\n\t\tmachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineType.setColumns(10);\n\t\tmachineType.setBounds(279, 378, 289, 30);\n\t\tbackground.add(machineType);\n\t\t\n\t\tcustomerName = new JTextField();\n\t\tcustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcustomerName.setColumns(10);\n\t\tcustomerName.setBounds(279, 278, 289, 30);\n\t\tbackground.add(customerName);\n\t\t\n\t\tJLabel deadlineLbl = new JLabel(\"DEADLINE\");\n\t\tdeadlineLbl.setVerticalAlignment(SwingConstants.TOP);\n\t\tdeadlineLbl.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tdeadlineLbl.setForeground(Color.WHITE);\n\t\tdeadlineLbl.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tdeadlineLbl.setBounds(69, 481, 178, 30);\n\t\tbackground.add(deadlineLbl);\n\t\t\n\t\tJLabel lblDate = new JLabel(\"DATE\");\n\t\tlblDate.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblDate.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblDate.setForeground(Color.WHITE);\n\t\tlblDate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblDate.setBounds(69, 228, 178, 30);\n\t\tbackground.add(lblDate);\n\t\t\n\t\tdate = new JTextField();\n\t\tdate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdate.setColumns(10);\n\t\tdate.setBounds(279, 228, 289, 30);\n\t\tbackground.add(date);\n\t\t\n\t\tJButton btnView = new JButton(\"VIEW\");\n\t\tbtnView.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tConnection con = null;\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t String query=\"select * from appointment \";\n\t\t\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnView.setForeground(Color.WHITE);\n\t\tbtnView.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnView.setBackground(Color.BLACK);\n\t\tbtnView.setBounds(1584, 578, 116, 44);\n\t\tbackground.add(btnView);\n\t\t\n\t\tdeadline = new JTextField();\n\t\tdeadline.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdeadline.setColumns(10);\n\t\tdeadline.setBounds(279, 481, 289, 30);\n\t\tbackground.add(deadline);\n\t\t\n\t\tJPanel header = new JPanel();\n\t\theader.setLayout(null);\n\t\theader.setBackground(Color.DARK_GRAY);\n\t\theader.setBounds(14, 23, 1880, 163);\n\t\tframe.getContentPane().add(header);\n\t\t\n\t\tJPanel mwtitle = new JPanel();\n\t\tmwtitle.setLayout(null);\n\t\tmwtitle.setForeground(Color.WHITE);\n\t\tmwtitle.setBackground(Color.BLACK);\n\t\tmwtitle.setBounds(209, 7, 649, 151);\n\t\theader.add(mwtitle);\n\t\t\n\t\tJLabel label = new JLabel(\"MACHINE WORKS\");\n\t\tlabel.setForeground(Color.WHITE);\n\t\tlabel.setFont(new Font(\"Times New Roman\", Font.PLAIN, 69));\n\t\tlabel.setBounds(20, 11, 605, 72);\n\t\tmwtitle.add(label);\n\t\t\n\t\tJLabel lblWhereAllThe = new JLabel(\"Where all the WORK is done by MACHINE\");\n\t\tlblWhereAllThe.setForeground(Color.ORANGE);\n\t\tlblWhereAllThe.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblWhereAllThe.setBounds(38, 94, 581, 48);\n\t\tmwtitle.add(lblWhereAllThe);\n\t\t\n\t\tJLabel logolbl = new JLabel(\"\");\n\t\tlogolbl.setIcon(new ImageIcon(\"C:\\\\Users\\\\CHINMAYA SH\\\\Pictures\\\\download.png\"));\n\t\tlogolbl.setBounds(58, 7, 151, 151);\n\t\theader.add(logolbl);\n\t\t\n\t\tJButton lgbtn = new JButton(\"LOGOUT\");\n\t\tlgbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Logged out Successfull !!\");\n\t\t\t\tindex ind = new index();\n\t\t\t\tind.indexStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tlgbtn.setForeground(Color.WHITE);\n\t\tlgbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tlgbtn.setBackground(Color.BLACK);\n\t\tlgbtn.setBounds(1674, 60, 116, 44);\n\t\theader.add(lgbtn);\n\t\t\n\t\tJButton button_1 = new JButton(\"SIGN UP\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tsignup sg = new signup();\n\t\t\t\tsg.signupStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbutton_1.setForeground(Color.WHITE);\n\t\tbutton_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbutton_1.setBackground(Color.BLACK);\n\t\tbutton_1.setBounds(1488, 60, 116, 44);\n\t\theader.add(button_1);\n\t\t\n\t\tJButton btnAppointment = new JButton(\"TO-DO\");\n\t\tbtnAppointment.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tappointments ap = new appointments();\n\t\t\t\tap.appointmentList();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnAppointment.setForeground(Color.WHITE);\n\t\tbtnAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnAppointment.setBackground(Color.BLACK);\n\t\tbtnAppointment.setBounds(1309, 60, 125, 44);\n\t\theader.add(btnAppointment);\n\t\tframe.setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 1920\t, 1080);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\n\t}", "private void initFrame() {\r\n\t\tsetResizable(false);\r\n\t\tpack();\r\n\t\tcenter();\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetVisible(true);\r\n\t}", "private void initComponents() {\n\t\tthis.setTitle(\"Boggle\");\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setMinimumSize(new Dimension(600, 575));\n\t\t\n\t\tinitMenuBar();\n\t\tinitDiceGridPanel();\n\t\tinitInputPanel();\n\t\tinitInfoPanel();\n\t\taddPanels();\n\t\t\n\t\tthis.setVisible(true);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"\\u67E5\\u8BE2\\u6570\\u636E\");\n\t\tframe.setBounds(100, 100, 800, 520);\n\n\t\tint windowWidth = frame.getWidth(); //获得窗口宽\n\t\tint windowHeight = frame.getHeight(); //获得窗口高\n\t\tToolkit kit = Toolkit.getDefaultToolkit(); //定义工具包\n\t\tDimension screenSize = kit.getScreenSize(); //获取屏幕的尺寸\n\t\tint screenWidth = screenSize.width; //获取屏幕的宽\n\t\tint screenHeight = screenSize.height; //获取屏幕的高\n\t\tframe.setLocation(screenWidth/2-windowWidth/2, screenHeight/2-windowHeight/2);\n\t\t\n\t\tJLabel label = new JLabel(\"\\u4F60\\u60F3\\u67E5\\u8BE2\\uFF1A\");\n\t\tlabel.setBounds(38, 26, 152, 47);\n\t\tlabel.setFont(new Font(\"宋体\", Font.PLAIN, 22));\n\t\t\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\n\t\tcomboBox.setBounds(288, 40, 59, 24);\n\t\tcomboBox.addItem(\"学号\");\n\t\tcomboBox.addItem(\"姓名\");\n\t\tcomboBox.addItem(\"年龄\");\n\t\tcomboBox.addItem(\"性别\");\n\t\tcomboBox.addItem(\"院系\");\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().add(label);\n\t\tframe.getContentPane().add(comboBox);\n\t\t\n\t\t\n\t\tJButton button = new JButton(\"\\u786E\\u5B9A\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"查询成功!\");\n\t\t\t}\n\t\t});\n\t\tbutton.setBounds(522, 39, 82, 27);\n\t\tframe.getContentPane().add(button);\n\t\t\n\t\tJButton button_1 = new JButton(\"\\u91CD\\u7F6E\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextField_1.setText(\"\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tbutton_1.setBounds(634, 39, 82, 27);\n\t\tframe.getContentPane().add(button_1);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setBounds(147, 40, 140, 24);\n\t\tframe.getContentPane().add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(0, 83, 782, 390);\n\t\tframe.getContentPane().add(scrollPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tbutton.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tString content = textField_1.getText();\n\t\t\t\tString[] dataTitle =Select.getHead();\n\t\t\t\tif(comboBox.getSelectedIndex() == 0)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(content);\n\t\t\t\t\tString[][] data=Select.getnumber(content);\n\t\t\t\t\ttable = new JTable(data,dataTitle);\n\t\t\t\t\ttable.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\t\t\ttable.setRowHeight(25);\n\t\t\t\t\tscrollPane.setViewportView(table);\n\t\t\t\t\ttable.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse if(comboBox.getSelectedIndex() == 1)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(content);\n\t\t\t\t\tString[][] data=Select.getname(content);\n\t\t\t\t\ttable = new JTable(data,dataTitle);\n\t\t\t\t\ttable.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\t\t\ttable.setRowHeight(25);\n\t\t\t\t\tscrollPane.setViewportView(table);\n\t\t\t\t\ttable.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse if(comboBox.getSelectedIndex() == 2)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(content);\n\t\t\t\t\tString[][] data=Select.getage(content);\n\t\t\t\t\ttable = new JTable(data,dataTitle);\n\t\t\t\t\ttable.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\t\t\ttable.setRowHeight(25);\n\t\t\t\t\tscrollPane.setViewportView(table);\n\t\t\t\t\ttable.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse if(comboBox.getSelectedIndex() == 3)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(content);\n\t\t\t\t\tString[][] data=Select.getsex(content);\n\t\t\t\t\ttable = new JTable(data,dataTitle);\n\t\t\t\t\ttable.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\t\t\ttable.setRowHeight(25);\n\t\t\t\t\tscrollPane.setViewportView(table);\n\t\t\t\t\ttable.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse if(comboBox.getSelectedIndex() == 4)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(content);\n\t\t\t\t\tString[][] data=Select.getdepartments(content);\n\t\t\t\t\ttable = new JTable(data,dataTitle);\n\t\t\t\t\ttable.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\t\t\ttable.setRowHeight(25);\n\t\t\t\t\tscrollPane.setViewportView(table);\n\t\t\t\t\ttable.setEnabled(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "public void initializeFrame() {\n frame.getContentPane().removeAll();\n createComponents(frame.getContentPane());\n// frame.setSize(new Dimension(1000, 600));\n }", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(new Color(244, 164, 96));\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJButton btnNewButton = new JButton(\"Choose file \");\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tchooseFile();\n\t\t\t}\n\n\t\t});\n\t\tbtnNewButton.setBackground(new Color(245, 222, 179));\n\t\tbtnNewButton.setForeground(new Color(0, 0, 0));\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 28));\n\t\tbtnNewButton.setBounds(73, 100, 280, 56);\n\t\tframe.getContentPane().add(btnNewButton);\n\t}", "protected void initialize() {\n setSize(600, 420);\n setContentPane(getJContentPane());\n setTitle(\"Edit Play List\");\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"framePlayList\");\n\t\tsetModal(false);\n\t\t//this.setResizable(false);\n\t\tsetComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);\n\t\t\n\t\t//fire this off once this dialog is displaying\n\t\taddWindowListener( new WindowAdapter() {\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tgetJButtonCancel().requestFocusInWindow();\n\t\t\t}\n\t\t});\n\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setBounds(100, 100, 410, 288);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(new FormLayout(new ColumnSpec[] {\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),},\n\t\t\tnew RowSpec[] {\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,}));\n\t\t\n\t\tlblLogin = new JLabel(\"Login\");\n\t\tframe.getContentPane().add(lblLogin, \"12, 6\");\n\t\t\n\t\tJLabel lblUsername = new JLabel(\"Username:\");\n\t\tframe.getContentPane().add(lblUsername, \"10, 10\");\n\t\t\n\t\tusernameField = new JTextField();\n\t\tframe.getContentPane().add(usernameField, \"12, 10, fill, default\");\n\t\tusernameField.setColumns(10);\n\t\t\n\t\tlblPassword = new JLabel(\"Password:\");\n\t\tframe.getContentPane().add(lblPassword, \"10, 14\");\n\t\t\n\t\tpasswordField = new JPasswordField();\n\t\tframe.getContentPane().add(passwordField, \"12, 14\");\n\t\t\n\t\tbtnLogin = new JButton(\"Login\");\n\t\tbtnLogin.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tcontroller.login(usernameField.getText(), passwordField.getText());\n\t\t\t\t\tparent.setVisible(true);\n\t\t\t\t\tframe.dispose();\t\t\t\t\t\n\t\t\t\t\tparentProjWindow.displayProjects();\n\t\t\t\t\t\n\t\t\t\t} catch (RemoteAccessException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Server unreacheable!\", \"Network Error!\", 0, null);\n\t\t\t\t}\t\n\t\t\t\tcatch(IllegalArgumentException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Wrong credentials!\", \"Access denied!\", 0, null);\n\t\t\t\t} catch (RemoteException 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\t\tframe.getContentPane().add(btnLogin, \"12, 18\");\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(374, 288));\r\n this.setContentPane(getJPanel());\r\n this.setResizable(false);\r\n this.setModal(true);\r\n this.setTitle(\"颜色选择面板\");\r\n addJPanel();\r\n\t}", "private void initialize(){\n\t\timgurURL = new JTextField(\"\", 20);\n\t\tJLabel label = new JLabel(\"Imgur URL\");\n\t\tdownload = new JButton(\"Download\");\n\t\tsavePath = new JButton(\"Set Download Path\");\n\t\t//Done creating components\n\t\t\n\t\t//Set component attributes\n\t\tsetLayout(new FlowLayout());\n\t\tsetSize(575, 65);\n\t\tsetResizable(false);\n\t\tadd(label);\n\t\tadd(imgurURL);\n\t\tadd(download);\n\t\tadd(savePath);\n\t\t//Done setting component attributes\n\t\t\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\t\tsetVisible(true);\n\t}", "public mainframe() {\n initComponents();\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setTitle(\"Gesti\\u00F3n de personal y suministros para la estaci\\u00F3n VDNKH\");\r\n\t\tframe.setBounds(300, 100, 700, 550);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\r\n\t\tJMenu mitNew = new JMenu(\"Nuevo\");\r\n\t\tmenuBar.add(mitNew);\r\n\r\n\t\tJMenuItem mitNewSoldier = new JMenuItem(\"Soldado\");\r\n\t\tmitNewSoldier.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tIfrSoldier ifrSoldier = new IfrSoldier();\r\n\t\t\t\tifrSoldier.setBounds(300, 100, 700, 550);\r\n\t\t\t\tframe.getContentPane().add(ifrSoldier);\r\n\t\t\t\tifrSoldier.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tmitNew.add(mitNewSoldier);\r\n\r\n\t\tJMenu mitSearch = new JMenu(\"Buscar\");\r\n\t\tmenuBar.add(mitSearch);\r\n\r\n\t\tJMenuItem mitSearchSoldier = new JMenuItem(\"Soldado\");\r\n\t\tmitSearch.add(mitSearchSoldier);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t}", "public QLHocSinhJFrame() {\n initComponents();\n }", "protected void initialize() {\r\n\t\tthis.frame.setBounds(0, -30, 325, 275);\r\n\t\tthis.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tthis.frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tthis.sendAlertButton.setForeground(Color.BLACK);\r\n\t\tthis.sendAlertButton.setBackground(Color.RED);\r\n\t\tthis.sendAlertButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 50));\r\n\t\tthis.sendAlertButton.setBounds(0,0, 325, 125);\r\n\t\tthis.frame.getContentPane().add(sendAlertButton);\r\n\t\t\r\n\t\tthis.backButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 50));\r\n\t\tthis.backButton.setBounds(0, 125, 325, 110);\r\n\t\tthis.frame.getContentPane().add(backButton);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 321, 383);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton botoUnir = new JButton(\"Unir Arxius\");\n\t\tbotoUnir.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tFinestraUnir a = new FinestraUnir();\n\t\t\t\ta.frmUnir.setVisible(true);\n\t\t\t\tframe.setVisible(false);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbotoUnir.setBounds(10, 196, 279, 65);\n\t\tframe.getContentPane().add(botoUnir);\n\t\t\n\t\tJButton botDividir = new JButton(\"Dividir Arxiu\");\n\t\tbotDividir.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tFinestraDividir a = new FinestraDividir();\n\t\t\t\ta.frmFinestraDividir.setVisible(true);\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tbotDividir.setBounds(10, 87, 279, 65);\n\t\tframe.getContentPane().add(botDividir);\n\t}", "public void init() {\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setSize(new Dimension(windowWidth, windowHeight));\n setTitle(\"Weather - \" \n + webAddress.getCapitalizedCity() + \", \" \n + webAddress.getCapitalizedCountry());\n setVisible(true);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(50, 50, 1050, 650);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tmtopJPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t\tframe.getContentPane().add(mtopJPanel, BorderLayout.NORTH);\n\t\ttopPanel();\n\t\t\n\t\tmleftJPanel = new JPanel();\n\t\tframe.getContentPane().add(mleftJPanel, BorderLayout.WEST);\n\t\twestPanel();\n\t\t\n\t\tmcenterJPanel = new JPanel();\n\t\tframe.getContentPane().add(mcenterJPanel, BorderLayout.CENTER);\n\t\tcenterPanel();\n\t\t\n\t\tmbottomJPanel = new JPanel();\n\t\tframe.getContentPane().add(mbottomJPanel, BorderLayout.SOUTH);\n\t\tbottomPanel();\n\t\t\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 228, 162);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBounds(10, 11, 187, 105);\r\n\t\tframe.getContentPane().add(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel lblOdaberiteNainPrijave = new JLabel(\"Odaberite na\\u010Din prijave na sistem:\");\r\n\t\tlblOdaberiteNainPrijave.setBounds(11, 5, 164, 14);\r\n\t\tpanel.add(lblOdaberiteNainPrijave);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"promijenio\");\r\n\t\tbtnNewButton.setBounds(49, 30, 81, 23);\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tbtnNewButton.setText(\"pritisnuo\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tpanel.add(btnNewButton);\r\n\r\n\t\tJButton btnNewButton_1 = new JButton(\"Korisnik\");\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tbtnNewButton_1.setText(\"pritisnuo\");\r\n\t\t\t\tbibliotekar_main_window window = new bibliotekar_main_window();\r\n\t\t\t\twindow.GetFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setBounds(49, 64, 81, 23);\r\n\t\tpanel.add(btnNewButton_1);\r\n\t}", "private void initialize() {\n\t\tthis.setSize(500, 400);\n\t\tthis.setContentPane(getJContentPane());\n\t\t\n\t\tthis.setTitle(\"Login\");\n\t}", "private void initialize() {\r\n\t\tthis.setSize(new java.awt.Dimension(611,413));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"Afiliados\");\r\n\t\tthis.setIconImage(Toolkit.getDefaultToolkit().getImage(\"./fondos/miniLogo.gif\"));\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.addWindowListener(new java.awt.event.WindowAdapter() {\r\n\t\t\tpublic void windowClosing(java.awt.event.WindowEvent e) {\r\n\t\t\t\tcdor.actionCerrar();\r\n\t\t\t\tdispose();\t\t\t}\r\n\t\t});\r\n\t}", "public JFrameMain() {\n initComponents();\n \n }", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public xinxiNewJFrame() {\n initComponents();\n }", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "public ExampleJFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "public MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Play\");\n\t\tbtnNewButton.setFont(new Font(\"Bodoni 72\", Font.BOLD, 13));\n\t\tbtnNewButton.setBounds(frame.getWidth() / 2 - 60, 195, 120, 30);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Space Escape\");\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\tlblNewLabel.setFont(new Font(\"Bodoni 72\", Font.BOLD, 24));\n\t\tlblNewLabel.setBounds(frame.getWidth() / 2 - 60, 30, 135, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\n\t\tlblNewLabel_1.setBounds(0, 0, frame.getWidth(), frame.getHeight());\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(X_FRAME, Y_FRAME, WIDTH_FRAME, HEIGHT_FRAME);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnAddSong = new JButton(\"Add song\");\r\n\t\tbtnAddSong.setBounds(X_BTN, Y_ADDSONG, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddSong);\r\n\t\t\r\n\t\tJTextPane txtpnBlancoYNegro = new JTextPane();\r\n\t\ttxtpnBlancoYNegro.setText(\"Blanco y negro\\r\\nThe Spectre\\r\\nGirasoles\\r\\nFaded\\r\\nTu Foto\\r\\nEsencial\");\r\n\t\ttxtpnBlancoYNegro.setBounds(X_TXT, Y_TXT, WIDTH_TXT, HEIGHT_TXT);\r\n\t\tframe.getContentPane().add(txtpnBlancoYNegro);\r\n\t\t\r\n\t\tJLabel lblSongs = new JLabel(\"Songs\");\r\n\t\tlblSongs.setBounds(X_LBL, Y_LBL, WIDTH_LBL, HEIGHT_LBL);\r\n\t\tframe.getContentPane().add(lblSongs);\r\n\t\t\r\n\t\tJButton btnAddAlbum = new JButton(\"Add album\");\r\n\t\tbtnAddAlbum.setBounds(X_BTN, Y_ADDALBUM, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddAlbum);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnAdministrador = new JButton(\"Administrador\");\n\t\tbtnAdministrador.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tJFrame loginAdmin = new ventanaLoginAdmin();\n\t\t\t\tloginAdmin.setVisible(true);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnAdministrador.setBounds(10, 25, 144, 43);\n\t\tframe.getContentPane().add(btnAdministrador);\n\t\t\n\t\tJButton btnEmpleado = new JButton(\"Empleado\");\n\t\tbtnEmpleado.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFrame loginEmpleado = new ventanaLoginEmpleado();\n\t\t\t\tloginEmpleado.setVisible(true);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnEmpleado.setBounds(10, 83, 144, 43);\n\t\tframe.getContentPane().add(btnEmpleado);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tGraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\n\t\tint width = gd.getDisplayMode().getWidth();\n\t\tint height = gd.getDisplayMode().getHeight();\n\t\tframe.setBounds(width / 3, height / 3, 461, 321);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\ttextField = new JTextField();\n\t\ttextField.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString text = textField.getText();\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tif (text.trim().equalsIgnoreCase(\"devwindow\")) {\n\n\t\t\t\t\tDevWindow window = new DevWindow();\n\t\t\t\t\twindow.frame.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttextField.setBounds(10, 240, 430, 31);\n\t\tframe.getContentPane().add(textField);\n\n\t\tJLabel label = new JLabel();\n\t\tlabel.setText(\"Command Line (Dev Use Only)\");\n\t\tlabel.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 17));\n\t\tlabel.setBounds(10, 220, 204, 17);\n\t\tframe.getContentPane().add(label);\n\n\t\tOptionsController oc = new OptionsController();\n\n\t\tJSlider slider = new JSlider();\n\t\tslider.setBounds(10, 113, 430, 31);\n\t\tslider.setPaintTicks(true);\n\t\tslider.setMaximum(600);\n\t\tslider.setMinimum(1);\n\t\tslider.setValue(Integer.parseInt(oc.getProp().getProperty(\"refreshRate\")));\n\t\tframe.getContentPane().add(slider);\n\n\t\tJLabel lblBackgroundRefreshRate = new JLabel();\n\t\tlblBackgroundRefreshRate.setText(\"Background Refresh Rate\");\n\t\tlblBackgroundRefreshRate.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 17));\n\t\tlblBackgroundRefreshRate.setBounds(10, 91, 158, 17);\n\t\tframe.getContentPane().add(lblBackgroundRefreshRate);\n\n\t\tJSlider slider_1 = new JSlider();\n\t\tslider_1.setToolTipText(\"\");\n\t\tslider_1.setBounds(10, 30, 430, 33);\n\t\tslider_1.setMaximum(300);\n\t\tslider_1.setMinimum(1);\n\t\tslider_1.setValue(Integer.parseInt(oc.getProp().getProperty(\"messageFrequency\")));\n\t\tframe.getContentPane().add(slider_1);\n\n\t\tJLabel label_2 = new JLabel();\n\t\tlabel_2.setText(\"New Message Frequency\");\n\t\tlabel_2.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 17));\n\t\tlabel_2.setBounds(10, 11, 158, 17);\n\t\tframe.getContentPane().add(label_2);\n\n\t\tJLabel lblNewLabel = new JLabel(\"New label\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblNewLabel.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 17));\n\t\tlblNewLabel.setBounds(317, 54, 123, 25);\n\t\tlblNewLabel.setText(oc.getProp().getProperty(\"messageFrequency\") + \" minute(s)\");\n\n\t\tlblNewLabel.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\n\t\t\t\toc.getProp().setProperty(\"messageFrequency\", lblNewLabel.getText().substring(0, 3).trim());\n\t\t\t\toc.saveProperties();\n\t\t\t}\n\t\t});\n\n\t\tframe.getContentPane().add(lblNewLabel);\n\n\t\tJLabel label_3 = new JLabel(\"115 second(s) or 1.92 minute(s)\");\n\t\tlabel_3.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlabel_3.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 17));\n\t\tlabel_3.setBounds(291, 155, 149, 25);\n\t\tframe.getContentPane().add(label_3);\n\n\t\tJLabel label_1 = new JLabel(oc.getProp().getProperty(\"refreshRate\"));\n\t\tlabel_1.setHorizontalAlignment(SwingConstants.RIGHT);\n\n\t\tlabel_1.setFont(new Font(\"Microsoft Yi Baiti\", Font.BOLD, 17));\n\t\tlabel_1.setBounds(291, 135, 149, 25);\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\tlabel_1.setText(oc.getProp().getProperty(\"refreshRate\") + \" second(s)\");\n\t\tlabel_3.setText(\n\t\t\t\tdf.format(Long.parseLong(oc.getProp().getProperty(\"refreshRate\").trim()) / 60.0) + \" minute(s)\");\n\n\t\tlabel_1.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\n\t\t\t\toc.getProp().setProperty(\"refreshRate\", label_1.getText().substring(0, 4).trim());\n\t\t\t\toc.saveProperties();\n\t\t\t}\n\t\t});\n\n\t\tframe.getContentPane().add(label_1);\n\n\t\tJCheckBox chckbxNewCheckBox = new JCheckBox(\"Start On Start Up\");\n\t\tchckbxNewCheckBox.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tboolean selected = chckbxNewCheckBox.isSelected();\n\n\t\t\t\toc.getProp().setProperty(\"startOnStartUp\", Boolean.toString(selected));\n\t\t\t\toc.saveProperties();\n\n\t\t\t\tif (selected) {\n\n\t\t\t\t\tif (!StartUp.exists()) {\n\n\t\t\t\t\t\tStartUp.create();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\n\t\t\t\t\tStartUp.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tchckbxNewCheckBox.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 15));\n\t\tchckbxNewCheckBox.setBounds(317, 186, 123, 23);\n\t\tchckbxNewCheckBox.setSelected(Boolean.valueOf(oc.getProp().getProperty(\"startOnStartUp\")));\n\t\tframe.getContentPane().add(chckbxNewCheckBox);\n\n\t\tJButton btnNewButton = new JButton(\"Exit Without Refresh\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 15));\n\t\tbtnNewButton.setBounds(10, 156, 143, 23);\n\t\tframe.getContentPane().add(btnNewButton);\n\n\t\tJButton btnNewButton_1 = new JButton(\"Help\");\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t\tInstructionWindow iWindow = new InstructionWindow();\n\t\t\t\tiWindow.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(201, 186, 65, 23);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\n\t\tJButton button = new JButton(\"Refresh Offline MBank\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\tConnection conn = null;\n\t\t\t\tDatabaseController dbc = DatabaseController.getDBController();\n\t\t\t\tString connectString = dbc.buildConnectionString();\n\n\t\t\t\ttry {\n\t\t\t\t\tconn = DriverManager.getConnection(connectString);\n\t\t\t\t\toc.getProp().setProperty(\"offlineMode\", \"false\");\n\t\t\t\t\toc.saveProperties();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tStringBuffer buf = new StringBuffer();\n\t\t\t\t\tbuf.append(\"There was a problem with the following connection string: \");\n\t\t\t\t\tbuf.append(connectString);\n\t\t\t\t\tbuf.append(\"\\n\\nHere is the exceptio:\\n\");\n\t\t\t\t\tbuf.append(e.toString());\n\t\t\t\t\tSystem.out.println(buf.toString());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime()\n\t\t\t\t\t\t\t\t.exec(\"javaw -jar \\\"\" + System.getProperty(\"user.home\") + File.separator + \"Documents\"\n\t\t\t\t\t\t\t\t\t\t+ File.separator + \"SevMessageConfig\" + File.separator\n\t\t\t\t\t\t\t\t\t\t+ \"NowOfflineWindow.jar\\\"\");\n\t\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep((long) 3000.0);\n\t\t\t\t\t} catch (InterruptedException e2) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tFile file = new File(System.getProperty(\"user.home\") + File.separator + \"Documents\" + File.separator\n\t\t\t\t\t\t+ \"SevMessageConfig\" + File.separator + \"offlineMessageBank.txt\");\n\t\t\t\tfile.delete();\n\n\t\t\t\tif (!StartUp.exists()) {\n\n\t\t\t\t\tStartUp.create();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tbutton.setFont(new Font(\"Microsoft Yi Baiti\", Font.PLAIN, 15));\n\t\tbutton.setBounds(10, 186, 165, 23);\n\t\tframe.getContentPane().add(button);\n\n\t\tslider_1.addChangeListener(new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\n\n\t\t\t\tlblNewLabel.setText(Integer.toString(slider_1.getValue()) + \" minute(s)\");\n\t\t\t}\n\t\t});\n\n\t\tslider.addChangeListener(new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\t\t\tlabel_1.setText(Integer.toString(slider.getValue()) + \" second(s)\");\n\t\t\t\tlabel_3.setText(df.format(Long.parseLong(oc.getProp().getProperty(\"refreshRate\").trim()) / 60.0)\n\t\t\t\t\t\t+ \" minute(s)\");\n\t\t\t}\n\t\t});\n\t}", "private void initialize() {\n m_frame = new JFrame(\"Video Recorder\");\n m_frame.setResizable(false);\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n m_frame.setLayout(new BorderLayout());\n m_frame.add(buildContentPanel(), BorderLayout.CENTER);\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));\n JButton startButton = new JButton(\"Start\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n listen();\n }\n });\n buttonPanel.add(startButton);\n\n m_connectionLabel = new JLabel(\"Disconnected\");\n m_connectionLabel.setOpaque(true);\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));\n m_connectionLabel.setPreferredSize(new Dimension(100, 26));\n m_connectionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n buttonPanel.add(m_connectionLabel);\n\n m_frame.add(buttonPanel, BorderLayout.PAGE_END);\n }", "private void initialize() {\r\n\t\tframe = new JFrame(\"CarParkingManagementSystem\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblSetTime = new JLabel(\"Set Time\");\r\n\t\tlblSetTime.setBounds(59, 114, 88, 26);\r\n\t\tframe.getContentPane().add(lblSetTime);\r\n\t\t\r\n\t\tJTextField settime = new JTextField();\r\n\t\tsettime.setBounds(171, 116, 148, 23);\r\n\t\tframe.getContentPane().add(settime);\r\n\t\tsettime.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblMin = new JLabel(\"min\");\r\n\t\tlblMin.setBounds(329, 120, 46, 14);\r\n\t\tframe.getContentPane().add(lblMin);\r\n\t\t\r\n\t\tJButton ok = new JButton(\"ok\");\r\n\t\tok.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tok.setBounds(169, 202, 89, 23);\r\n\t\tframe.getContentPane().add(ok);\r\n\t}", "public MainFrame() {\n initComponents();\n \n }", "private void initialize() {\n\t\tfrmSsss = new JFrame();\n\t\tfrmSsss.setTitle(\"Farma Innova\");\n\t\tfrmSsss.setBounds(100, 100, 800, 600);\n\t\tfrmSsss.setResizable(true);\n\t\tfrmSsss.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\t\t\n\t\tfrmSsss.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tImage imgPrincipal = new ImageIcon(this.getClass().getResource(\"/main_icon.png\")).getImage();\n\t\tfrmSsss.setIconImage(imgPrincipal);\n\t\t\n\t JTreeEventsPanel Arbol = new JTreeEventsPanel();\n\t frmSsss.getContentPane().add(Arbol);\n\t}", "public JFrameMain() {\n initComponents();\n }", "public JFrame_05_Mayor_De_10() {\n initComponents();\n \n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 640, 480);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJDesktopPane desktopPane = new JDesktopPane();\t\t//Creates desktop pane\n\t\tdesktopPane.setBounds(-7, -30, 640, 480);\t\t\t// Sets location to be outside of window\n\t\tframe.getContentPane().add(desktopPane);\t\t\t// adds desktop pane to frame\n\t\t\n//\t\tMainMenu MainMenu = new MainMenu();\t\t// Creates new MainMenu\n//\t\tMainMenu.setVisible(true);\t\t\t\t// Sets MainMenu Visible\n//\t\tdesktopPane.add(MainMenu);\t\t\t\t// Adds MainMenu to DesktopPane\n\t\t\n\t\t\n\t\t MainMenu nw = MainMenu.getInstance();\n\t\t nw.pack();\n//\t\t if (nw.isVisible()) {\n//\t\t } else {\n\t\t\tnw.setBounds(100, 100, 400, 200);\n\t\t desktopPane.add(nw);\n\t\t nw.setVisible(true);\n\t\t \n//\t\t }\n\t\t try {\n\t\t nw.setMaximum(true);\n\t\t } catch (Exception e1) {\n\t\t \tSystem.out.println(e1);\n\t\t }\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "private void initialize() {\n\t\tfrmLogisticsNegotium = new JFrame();\n\t\tfrmLogisticsNegotium.setTitle(\"Logistics Negotium\");\n\t\tfrmLogisticsNegotium.setBounds(100, 100, 450, 300);\n\t\tfrmLogisticsNegotium.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmLogisticsNegotium.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnAddVehicle = new JButton(\"Add Vehicle\");\n\t\tbtnAddVehicle.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJAddVehicleFrame.main();\n\t\t\t}\n\t\t});\n\t\tbtnAddVehicle.setBounds(44, 198, 134, 23);\n\t\tfrmLogisticsNegotium.getContentPane().add(btnAddVehicle);\n\t\t\n\t\tJButton btnRequestDelivery = new JButton(\"Request Delivery\");\n\t\tbtnRequestDelivery.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJRequestDeliveryFrame.main();\n\t\t\t}\n\t\t});\n\t\tbtnRequestDelivery.setBounds(258, 198, 134, 23);\n\t\tfrmLogisticsNegotium.getContentPane().add(btnRequestDelivery);\n\t\t\n\t\tJLabel lblChooseBetweenThe = new JLabel(\"Choose between the options\");\n\t\tlblChooseBetweenThe.setBounds(143, 100, 181, 14);\n\t\tfrmLogisticsNegotium.getContentPane().add(lblChooseBetweenThe);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblSubmission = new JLabel(\"Submission\");\n\t\tlblSubmission.setForeground(Color.WHITE);\n\t\tlblSubmission.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 16));\n\t\tlblSubmission.setBounds(164, 40, 83, 14);\n\t\tframe.getContentPane().add(lblSubmission);\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title:\");\n\t\tlblTitle.setForeground(Color.WHITE);\n\t\tlblTitle.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblTitle.setBounds(77, 117, 41, 14);\n\t\tframe.getContentPane().add(lblTitle);\n\t\t\n\t\tJLabel lblPath = new JLabel(\"Path:\");\n\t\tlblPath.setForeground(Color.WHITE);\n\t\tlblPath.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblPath.setBounds(85, 155, 33, 14);\n\t\tframe.getContentPane().add(lblPath);\n\t\t\n\t\ttitle = new JTextField();\n\t\ttitle.setBounds(128, 116, 197, 20);\n\t\tframe.getContentPane().add(title);\n\t\ttitle.setColumns(10);\n\t\t\n\t\tpath = new JTextField();\n\t\tpath.setBounds(128, 154, 197, 20);\n\t\tframe.getContentPane().add(path);\n\t\tpath.setColumns(10);\n\t\t\n\t\tbtnSubmit = new JButton(\"Submit\");\n\t\tbtnSubmit.setBackground(Color.BLACK);\n\t\tbtnSubmit.setForeground(Color.WHITE);\n\t\tbtnSubmit.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tbtnSubmit.setBounds(158, 210, 89, 23);\n\t\tframe.getContentPane().add(btnSubmit);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 653, 435);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"Welcome \");\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 36));\r\n\t\tlblNewLabel.setBounds(168, 34, 307, 105);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"You are now Logged in\");\r\n\t\tlblNewLabel_1.setForeground(Color.BLUE);\r\n\t\tlblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel_1.setFont(new Font(\"Times New Roman\", Font.BOLD, 24));\r\n\t\tlblNewLabel_1.setBounds(135, 148, 363, 85);\r\n\t\tframe.getContentPane().add(lblNewLabel_1);\r\n\r\n\t\tJButton back = new JButton(\"Log out\");\r\n\t\tback.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tString x[] = {};\r\n\t\t\t\tLoginSystem.main(x);\r\n\t\t\t}\r\n\t\t});\r\n\t\tback.setFont(new Font(\"Times New Roman\", Font.PLAIN, 24));\r\n\t\tback.setBounds(251, 276, 147, 43);\r\n\t\tframe.getContentPane().add(back);\r\n\t}", "public Mainframe() {\n initComponents();\n }", "public void init() {\n\t\tframe = new JFrame(\"Find the Capital City\");\n\t\tcountryLabel = new JLabel(\"Country:\");\n\t\tcapitalLabel = new JLabel(\"Capital City:\");\n\t\tcountryBox = new JComboBox<>(CountryUtil.COUNTRY_LIST);\n\t\tcapitalBox = new JTextField();\n\t\t\n\t\tcountryBox.addActionListener(new MyActionListener());\n\t\tcapitalBox.setEditable(false);\n\t\tcountryLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\tcapitalLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t\n\t\tframe.setLayout(new GridLayout(2, 2));\n\t\tframe.add(countryLabel);\n\t\tframe.add(countryBox);\n\t\tframe.add(capitalLabel);\n\t\tframe.add(capitalBox);\n\t\t\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(350, 100);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 703, 720);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tc1 = new JComboBox();\r\n\t\tc1.setModel(new DefaultComboBoxModel(Month.values()));\r\n\t\tc1.setBounds(330, 211, 215, 32);\r\n\t\tframe.getContentPane().add(c1);\r\n\t\tc1.addItemListener(this);\r\n\t\t\r\n\t\tl1 = new JLabel(\"ans\");\r\n\t\tl1.setBounds(353, 289, 162, 46);\r\n\t\tframe.getContentPane().add(l1);\r\n\t}", "private void init() {\n\t\tsetModal(true);\n\t\t\n\t\tsetResizable(false);\n\t\tgetContentPane().setLayout(new GridBagLayout());\n\t\tc = new GridBagConstraints();\n\t\tc.insets = new Insets(10, 10, 10, 10);\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t}", "private void initializeComponent(){\r\n\r\n //Creating a new JFrame\r\n frame = new JFrame(\"Rental System\");\r\n //The program dismisses when the window is closed\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n //Fixes the size of the window (dialogue box)\r\n frame.setResizable(false);\r\n \r\n frame.setLayout(null);\r\n //Components that are added to the frame\r\n addComponents(frame.getContentPane());\r\n \r\n frame.pack();\r\n // Sets the size of the window to 1000px width and 460px height\r\n frame.setSize(1000, 460);\r\n // Shows the window at the center of the screen\r\n frame.setLocationRelativeTo(null);\r\n // Makes the window visible\r\n frame.setVisible(true);\r\n\r\n\r\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0,0,400,100);\n\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJButton Boton1 = new JButton(\"Boton1\");\n\t\tframe.getContentPane().add(Boton1, BorderLayout.NORTH);\n\t\t\n\t\tJLabel etiqueta = new JLabel();\n\t\tetiqueta.setText(\"Etiqueta\");\n\t\tframe.add(etiqueta);\n\t\t\n\t\tframe.setLayout(new FlowLayout());\n\t\t\n\t\t//frame.pack();\n\t\t\n\t\t/*class BotonListener implements ActionListener{\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tetiqueta.setText(\"Lo que sea\");\n\t\t\t\tframe.pack();\n\t\t\t}\n\t\t\t\n\t\t}*/\n\t\t/*Boton1.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tetiqueta.setText(\"Lo que sea\");\n\t\t\t\tframe.pack();\n\t\t\t}\n\t\t});*/\n\t\tBoton1.addActionListener(e -> {System.exit(0);});\n\t}", "public Hwk2JFrame() {\n initComponents();\n }", "public void initialize() {\n\t\tstartPane = new JPanel();\n\t\tframeStart = new JFrame();\n\t\tframeStart.getContentPane();\n\t\tframeStart.setBounds(100, 100, 659, 482);\n frameStart.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frameStart.setContentPane(startPane);\n startPane.setLayout(null);\n JLabel lblNewLabel = new JLabel(\"New label\");\n\t\tlblNewLabel.setIcon(new ImageIcon(\"/images/start.png\"));\n\t\tlblNewLabel.setBounds(10, 11, 623, 360);\n\t\tstartPane.add(lblNewLabel);\n\t}", "@Override\r\n\tpublic void init() {\n\t\tsetSize(new Dimension(450,250));\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tinitPanel();\r\n\t\t\r\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 621, 453);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblBlackjackVersion = new JLabel(\"BlackJack Version .01\");\r\n\t\tlblBlackjackVersion.setFont(new Font(\"Tahoma\", Font.PLAIN, 29));\r\n\t\tlblBlackjackVersion.setBounds(155, 55, 305, 59);\r\n\t\tframe.getContentPane().add(lblBlackjackVersion);\r\n\t\t\r\n\t\tJButton btnStart = new JButton(\"Start\");\r\n\t\tbtnStart.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tkontroll1.start();\r\n\t\t\t\t\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnStart.setBackground(Color.WHITE);\r\n\t\tbtnStart.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\r\n\t\tbtnStart.setToolTipText(\"Start Blackjack\");\r\n\t\tbtnStart.setBounds(201, 185, 163, 47);\r\n\t\tframe.getContentPane().add(btnStart);\r\n\t}", "private void initialize() {\r\n\t\tframeWelcome = new JFrame();\r\n\t\tframeWelcome.setTitle(\"Wilkommen\");\r\n\t\tframeWelcome.setBounds(650, 100, 600, 600);\r\n\t\tframeWelcome.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframeWelcome.setResizable(false);\r\n\t\tframeWelcome.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tchckbxTestModus = new Checkbox(\"Test Modus\");\r\n\t\tchckbxTestModus.setBounds(468, 391, 97, 23);\r\n\t\tframeWelcome.getContentPane().add(chckbxTestModus);\r\n\t\t\r\n\t\tTextArea welcomeTextArea = new TextArea();\r\n\t\twelcomeTextArea.setEditable(false);\r\n\t\twelcomeTextArea.setBounds(0, 0, 584, 435);\r\n\t\twelcomeTextArea.setText(text);\r\n\t\tframeWelcome.getContentPane().add(welcomeTextArea);\r\n\t\t\r\n\t\tButton buttonPlaceShips = new Button(\"Schiffe Setzen\");\r\n\t\tbuttonPlaceShips.setBounds(0, 430, 594, 141);\r\n\t\tListenerWelcome.placeShipListener(buttonPlaceShips);\r\n\t\tframeWelcome.getContentPane().add(buttonPlaceShips);\r\n\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t}", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }" ]
[ "0.8614073", "0.8589405", "0.8551635", "0.85244876", "0.8467194", "0.8466659", "0.84551644", "0.8313188", "0.8310872", "0.8224493", "0.82021844", "0.8165529", "0.81113034", "0.8109699", "0.8079177", "0.8073954", "0.8023344", "0.8012799", "0.8003333", "0.79982126", "0.79786", "0.7978189", "0.7948208", "0.7941792", "0.792467", "0.79182553", "0.78895223", "0.7888425", "0.7886272", "0.78794974", "0.7874017", "0.78735715", "0.786364", "0.7863002", "0.7854349", "0.78525466", "0.7833236", "0.7829812", "0.78002006", "0.7793072", "0.77683073", "0.77625364", "0.7759597", "0.7755464", "0.77550477", "0.7750505", "0.77412903", "0.77266055", "0.7707366", "0.77009577", "0.76986414", "0.7692749", "0.76906604", "0.7687774", "0.7687627", "0.76763487", "0.7666451", "0.76647884", "0.7664335", "0.7661864", "0.7653989", "0.76531845", "0.7648374", "0.76422995", "0.7631784", "0.763134", "0.7630225", "0.7625474", "0.76244223", "0.76228493", "0.76145077", "0.7611237", "0.7607522", "0.7607328", "0.75989586", "0.75989085", "0.75949687", "0.7590929", "0.758834", "0.75813526", "0.75795615", "0.75782245", "0.7577598", "0.7575598", "0.75666034", "0.756453", "0.755999", "0.7555774", "0.7554422", "0.7549205", "0.7539034", "0.7538964", "0.7538143", "0.7533953", "0.7533787", "0.75263244", "0.7521199", "0.75200546", "0.7519753", "0.7519753", "0.7519753" ]
0.0
-1
Sets the GUI title.
public void setTitle(String title) { this.title = title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setWindowTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "void setTitle(java.lang.String title);", "public void setTitle(String title)\r\n {\r\n frame.setTitle(title);\r\n }", "public void setTitle (String title) {\n _frame.setTitle(title);\n }", "public void setTitle(java.lang.String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_scienceApp.setTitle(title);\n\t}", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public final void setTitle(final String title)\n\t{\n\t\tio.getFrame().setTitle(title);\n\t}", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title) {\n setDialogTitle(title);\n }", "public void setTitle(String title) { this.title = title; }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "public void setTitle(String title) {\n m_title.setText(title);\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n impl.setTitle(getElement(),legend, title);\r\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\r\n _title = title;\r\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle( String title ) {\n\t\t_title = title;\n\t}", "public void setTitle(String title){\n \tthis.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n etvTitle.setText(title);\n }", "public void setTitle(String title){\n this.title = title;\n }", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void setTitle(String title)\n {\n mTitle = title;\n }", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "public void setTitle(String title) {\n mTitle = title;\n }", "@Override\r\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\r\n\t}", "protected void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n\tthis.title = title;\n}", "public void setTitle(java.lang.String title)\n {\n this.title = title;\n }", "public void setTitle(String title) {\n mTitle = title;\n }", "public void setTitle(String title) {\n\t\tborder.setTitle(title);\n\t}", "public void setTitle_(String title_) {\n this.title_ = title_;\n }", "@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}", "public void setTitle(String title){\n\t\tplot.setTitle(title);\n\t}", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "public void setTitle(final String title)\n {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "void setConsoleTitle(String title);", "public void setTitle(String aNewTitle) \r\n\t{\r\n\t\tthis.title = aNewTitle;\r\n\t\tthis.panelEnvironment.panelTitleChanged();\r\n\t}", "public void setTitle(String strTitle) { m_strTitle = strTitle; }", "public void setTitle(final String title) {\n this.title = title;\n }", "@Override\n protected void updateTitle()\n {\n String frameName =\n SWTStringUtil.insertEllipsis(frame.getName(),\n StringUtil.NO_FRONT,\n SWTStringUtil.DEFAULT_FONT);\n\n view.setWindowTitle(modificationFlag\n + FRAME_PREFIX\n + \": \"\n + project.getName()\n + \" > \"\n + design.getName()\n + \" > \"\n + frameName\n + ((OSUtils.MACOSX) ? \"\" : UI.WINDOW_TITLE));\n }", "public void setTitle(final String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n \t\tdialogTitle = title;\n \t\tif (dialogTitle == null) {\n \t\t\tdialogTitle = \"\"; //$NON-NLS-1$\n \t\t}\n \t\tShell shell = getShell();\n \t\tif ((shell != null) && !shell.isDisposed()) {\n \t\t\tshell.setText(dialogTitle);\n \t\t}\n \t}", "protected void setPopUpTitle(String title){\r\n\t\tthis.stage.setTitle(title);\r\n\t}" ]
[ "0.8293758", "0.8277485", "0.8152411", "0.81409514", "0.8101771", "0.80967325", "0.8091512", "0.8091512", "0.8091512", "0.8091512", "0.8091512", "0.8076659", "0.8076659", "0.8076659", "0.80172104", "0.7970564", "0.7970564", "0.7970564", "0.7970564", "0.7970564", "0.7954788", "0.7954788", "0.7954408", "0.7945021", "0.7945021", "0.79328054", "0.79289997", "0.79258835", "0.7923513", "0.7923513", "0.7923513", "0.79145676", "0.79127663", "0.790704", "0.7904841", "0.7902817", "0.789635", "0.78927076", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78852135", "0.78825366", "0.78775144", "0.78775144", "0.78775144", "0.78775144", "0.78749955", "0.78733575", "0.786477", "0.78617024", "0.78406316", "0.78239626", "0.7819657", "0.78048474", "0.78013533", "0.78003705", "0.7799711", "0.7798689", "0.7793084", "0.77925164", "0.77700853", "0.7760639", "0.7756437", "0.7755347", "0.77522", "0.77513444", "0.77513444", "0.77513444", "0.7747486", "0.7724059", "0.7694018", "0.7688425", "0.7686356", "0.7656685", "0.76559556", "0.7632927", "0.7581855" ]
0.78556705
73
Sets the GUI subtitle.
public void setSubtitle(String subtitle) { this.subtitle = subtitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSubtitle(String subtitle) {\n m_subTitle.setText(subtitle);\n }", "@Override\n\tpublic void setSubtitle(CharSequence subtitle) {\n\t\t\n\t}", "public void setSubtitle(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "public void setSubtitle( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "@Override\n\tpublic void setSubtitle(int resId) {\n\t\t\n\t}", "public static void setSubtitle(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, SUBTITLE, value);\r\n\t}", "private void updateSubtitle() {\n String subtitle = getString(R.string.subtitle_new_chore);\n ChoreLab choreLab = ChoreLab.get(getActivity());\n int choreCount = choreLab.getChores().size();\n if(choreCount == 0) {\n mSubtitleVisible = true;\n } else {\n mSubtitleVisible = false;\n }\n\n if (!mSubtitleVisible) {\n subtitle = null;\n }\n\n AppCompatActivity activity = (AppCompatActivity) getActivity();\n activity.getSupportActionBar().setSubtitle(subtitle);\n }", "public void setSubtitle(String subtitle) {\r\n this.subtitle = subtitle == null ? null : subtitle.trim();\r\n }", "public void setSubtitle(String subtitle) {\n this.subtitle = subtitle == null ? null : subtitle.trim();\n }", "public void changeSubtitle (final Path newSubtitle) {\n\t\tsetModelProperty(SUBTITLE_PROPERTY, newSubtitle);\n\t}", "public static void setSubtitle( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, SUBTITLE, value);\r\n\t}", "public void addSubtitle(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "public void setToolbarSubTitle(String subtitle)\n {\n\n _toolbar.setSubtitle(subtitle);\n\n _toolbar.setSubtitleTextAppearance(_act, android.R.style.TextAppearance_Small);\n }", "private void setStatus(CharSequence subTitle) {\n getSupportActionBar().setSubtitle(subTitle);\n //textViewStatus.setText(subTitle);\n }", "public void setSubtitle(@Nullable String subtitle) {\n this.subtitle = subtitle;\n }", "public String getSubtitle() {\r\n return subtitle;\r\n }", "public void addSubtitle( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "public String getSubtitle() {\n return subtitle;\n }", "private void setStatus(CharSequence subTitle) {\n FragmentActivity activity = getActivity();\n if (null == activity) {\n return;\n }\n final ActionBar actionBar = activity.getActionBar();\n if (null == actionBar) {\n return;\n }\n actionBar.setSubtitle(subTitle);\n }", "private void setStatus(CharSequence subTitle) {\n FragmentActivity activity = getActivity();\n if (null == activity) {\n return;\n }\n final ActionBar actionBar = activity.getActionBar();\n if (null == actionBar) {\n return;\n }\n actionBar.setSubtitle(subTitle);\n }", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "public void setLabelText(String text);", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "void setTitle(java.lang.String title);", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "public void setTitle(String text) {\n title.setText(text);\n }", "public static void addSubtitle(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, SUBTITLE, value);\r\n\t}", "public void setTitle(java.lang.String title);", "public String getSubtitle();", "public void setTitleText(String txt) {\n if (title != null)\n title.setText(txt);\n if (editor != null)\n editor.title.setText(txt);\n }", "public void setText(String panelTitle, String text) {\n\t\tJTextPane textPane = (JTextPane) getBoard(panelTitle);\n\t\ttextPane.setText(text);\n\t\ttextPane.setCaretPosition(0);\n\t}", "public void setTitle(String t)\n {\n title = t;\n }", "public void setText( String text );", "public abstract Subtitle createSubtitle();", "public Builder setSubtitleRef(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n subtitleRef_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tvoid setTitle(String s) {\n\t\tsuper.title=s;\r\n\t}", "public void setTitle(String s){\n\t\ts = s.substring(s.lastIndexOf(\"\\\\\")+1,s.lastIndexOf(\".\"));//absolute path + .txt out of string\n\t\tframe.setTitle(s);\n\t}", "public static void addSubtitle( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, SUBTITLE, value);\r\n\t}", "private static void setStatus(CharSequence subTitle, Activity activity) {\n\n if (null == activity) {\n return;\n }\n final ActionBar actionBar = activity.getActionBar();\n if (null == actionBar) {\n return;\n }\n actionBar.setSubtitle(subTitle);\n }", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void setText(String text);", "protected final void setSubscript() {\n setFontSize((int) (getFontSize() * 0.5d));\n// yOffset += getFontSize();\n }", "public void setText(String title, String message) {\n this.mTitle = title;\n this.mMessage = message;\n }", "protected abstract void setTitle();", "public void setTitle(String strTitle) { m_strTitle = strTitle; }", "public void setTitle(String titleTemplate);", "@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}", "public void sendTitle ( String title , String subtitle ) {\n\t\tsendTitle ( title , subtitle , 10 , 70 , 20 );\n\t}", "protected String subtitle () { return null; }", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setCaption(String text) {\n DOM.setInnerHTML(captionText, text);\n }", "void setText(String text);", "public void setTitle(String title) { this.title = title; }", "public void setTitle(String title) {\n this.title = title;\n etvTitle.setText(title);\n }", "public TextFrame(String title, String text) {\n super(title);\n initComponents();\n area.setText(text);\n }", "@Override\n\tpublic void setText(String arg0) {\n\t\t\n\t}", "@Override\n public void setText(String text) {\n label.setText(text);\n textArea.setText(text);\n }", "void setText (String text);", "@Override\n public String getSubtitle() {\n return null;\n }", "public void setTitleAccordingToState(){\n String ts=null;\n switch(getPlayMode()){\n case LIVE:\n ts=\" LIVE\";\n break;\n case PLAYBACK:\n ts=currentFile.getName()+\" PLAYING\";\n break;\n case WAITING:\n ts=\"MotionViewer - WAITING\";\n break;\n }\n setTitle(ts);\n }", "@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}", "public void setCaption(String caption) {\n this.caption = caption;\n }", "void setTopLabelText(String text) {\n topLabel.setText(text);\n }", "public void setTitle(java.lang.String value) {\n this.title = value;\n }", "public void setText(String s) {\n text = s;\n }", "public void setTitle(String s){\n\t\tJLabel title = new JLabel(s);\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(title, BorderLayout.PAGE_START);\r\n\t}", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "public void removeSubtitle(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "public void setText(String text) {\n\t\tthis.textPane.setText(text);\n\t}", "public void setTitle(String lang, String value) {\n/* 346 */ setLangAlt(\"title\", lang, value);\n/* */ }", "public void setTitle(String title){\n \tthis.title = title;\n }", "@Override\n\tpublic CharSequence getSubtitle() {\n\t\treturn null;\n\t}", "public void setText(String text) {\n\t\tcurrentTrack.setText(text);\n\t}", "public void setTexts(String title, String message) {\n mTitle = title;\n mMessage = message;\n }", "public void setText(String text) {\r\n\r\n\t}", "public void setSubtitleFontSize(int size) {\n\t\tthis.subtitle_fontsize = size;\n\t}", "public void setText(String txt)\n {\n fileName.setText(txt);\n }", "@Override\n public void setText(String englishText) {\n\n }", "public void setTitleText(String newTitle) {\n\t\tCTTitle ctTitle;\n\t\tif (chart.isSetTitle()) {\n\t\t\tctTitle = chart.getTitle();\n\t\t} else {\n\t\t\tctTitle = chart.addNewTitle();\n\t\t}\n\n\t\tCTTx tx;\n\t\tif (ctTitle.isSetTx()) {\n\t\t\ttx = ctTitle.getTx();\n\t\t} else {\n\t\t\ttx = ctTitle.addNewTx();\n\t\t}\n\n\t\tif (tx.isSetStrRef()) {\n\t\t\ttx.unsetStrRef();\n\t\t}\n\n\t\tCTTextBody rich;\n\t\tif (tx.isSetRich()) {\n\t\t\trich = tx.getRich();\n\t\t} else {\n\t\t\trich = tx.addNewRich();\n\t\t\trich.addNewBodyPr(); // body properties must exist (but can be empty)\n\t\t}\n\n\t\tCTTextParagraph para;\n\t\tif (rich.sizeOfPArray() > 0) {\n\t\t\tpara = rich.getPArray(0);\n\t\t} else {\n\t\t\tpara = rich.addNewP();\n\t\t}\n\n\t\tif (para.sizeOfRArray() > 0) {\n\t\t\tCTRegularTextRun run = para.getRArray(0);\n\t\t\trun.setT(newTitle);\n\t\t} else if (para.sizeOfFldArray() > 0) {\n\t\t\tCTTextField fld = para.getFldArray(0);\n\t\t\tfld.setT(newTitle);\n\t\t} else {\n\t\t\tCTRegularTextRun run = para.addNewR();\n\t\t\trun.setT(newTitle);\n\t\t}\n\t}", "public void setText(String text) {\n\t\t\n\t}", "public void setTitle(String title) {\n\tthis.title = title;\n}", "public synchronized void setText(String string) {\n if (this.m_strText == null) {\n throw new IllegalStateException(\"This content pane does not contain a text field!\");\n }\n RootPaneContainer rootPaneContainer = this.getDialog();\n synchronized (rootPaneContainer) {\n int n;\n if (this.isVisible()) {\n this.m_lblText.setText(JAPHtmlMultiLineLabel.removeHTMLHEADAndBODYTags(string));\n this.getDialog().notifyAll();\n return;\n }\n JAPDialog jAPDialog = new JAPDialog((JAPDialog)null, \"\");\n RootPaneContainer rootPaneContainer2 = this.getDialog();\n boolean bl = this.isActive();\n boolean bl2 = false;\n boolean bl3 = false;\n Dimension dimension = rootPaneContainer2 instanceof JDialog ? ((JDialog)rootPaneContainer2).getSize() : ((JAPDialog)rootPaneContainer2).getSize();\n if (dimension.width == 0 || dimension.height == 0) {\n throw new IllegalStateException(\"The parent dialog has a size <=0! This is not allowed when changing the text.\");\n }\n jAPDialog.setSize(dimension);\n if (this.m_lblText != null) {\n this.m_titlePane.remove(this.m_lblText);\n }\n this.m_strText = JAPHtmlMultiLineLabel.removeHTMLHEADAndBODYTags(string);\n if (this.m_strText == null || this.m_strText.trim().length() == 0) {\n this.m_strText = \"\";\n return;\n }\n this.m_lblText = new JAPHtmlMultiLineLabel(this.m_strText, 0);\n this.m_lblText.setFontStyle(0);\n this.m_titlePane.add((Component)this.m_lblText, this.m_textConstraints);\n this.m_parentDialog = jAPDialog;\n if (this.m_rootPane.getPreferredSize().equals(new Dimension(2500, 2500))) {\n bl2 = true;\n }\n this.m_rootPane.setPreferredSize(null);\n if (this.m_lblSeeFullText != null) {\n this.m_titlePane.remove(this.m_lblSeeFullText);\n this.m_lblSeeFullText = null;\n }\n this.updateDialog(false);\n if (Thread.currentThread().isInterrupted()) {\n Thread.currentThread().interrupt();\n return;\n }\n this.m_lblText.setText(this.m_strText);\n this.m_lblText.setPreferredWidth(this.getContentPane().getSize().width);\n GridBagConstraints gridBagConstraints = (GridBagConstraints)this.m_textConstraints.clone();\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new Insets(0, 0, 0, 0);\n this.m_lblSeeFullText = new JAPHtmlMultiLineLabel();\n this.m_lblSeeFullText.setPreferredSize(new Dimension(this.getContentPane().getSize().width, 0));\n this.m_titlePane.add((Component)this.m_lblSeeFullText, gridBagConstraints);\n this.updateDialog(false);\n this.m_titlePane.remove(this.m_lblSeeFullText);\n if (jAPDialog.getContentPane().getSize().height < jAPDialog.getContentPane().getPreferredSize().height) {\n n = jAPDialog.getSize().height;\n int n2 = jAPDialog.getSize().width;\n jAPDialog.pack();\n if ((double)jAPDialog.getSize().height > (double)dimension.height * 1.2 || (double)jAPDialog.getSize().width > (double)dimension.width * 1.2) {\n jAPDialog.setSize(n2, n);\n } else if (rootPaneContainer2 instanceof JDialog) {\n ((JDialog)rootPaneContainer2).setSize(jAPDialog.getSize());\n } else {\n ((JAPDialog)rootPaneContainer2).setSize(jAPDialog.getSize());\n }\n }\n if (jAPDialog.getContentPane().getSize().height < jAPDialog.getContentPane().getPreferredSize().height) {\n this.m_lblSeeFullText = new JAPHtmlMultiLineLabel(\"<A href=''>(\" + JAPMessages.getString(MSG_SEE_FULL_MESSAGE) + \")</A>\", this.m_lblText.getFont(), 0);\n this.m_lblSeeFullText.setCursor(Cursor.getPredefinedCursor(12));\n this.m_lblSeeFullText.setPreferredSize(new Dimension(this.getContentPane().getSize().width, this.m_lblSeeFullText.getPreferredSize().height));\n this.m_lblSeeFullText.addMouseListener(new MouseAdapter(){\n\n public void mouseClicked(MouseEvent mouseEvent) {\n if (DialogContentPane.this.m_layout.getTitle() != null) {\n JAPDialog.showMessageDialog((Component)DialogContentPane.this.m_lblSeeFullText, DialogContentPane.this.m_strText, DialogContentPane.this.m_layout.getTitle());\n } else {\n JAPDialog.showMessageDialog(DialogContentPane.this.m_lblSeeFullText, DialogContentPane.this.m_strText);\n }\n }\n });\n this.m_titlePane.add((Component)this.m_lblSeeFullText, gridBagConstraints);\n int n3 = this.m_lblText.getHTMLDocumentLength();\n int n4 = n3 / 2;\n int n5 = 0;\n for (n = 0; n < 6; ++n) {\n if (n == 5) {\n if (bl3) {\n n4 = n5;\n } else {\n this.m_titlePane.remove(this.m_lblText);\n this.m_lblText = null;\n this.updateDialog(false);\n break;\n }\n }\n this.m_lblText.setText(this.m_strText);\n this.m_lblText.cutHTMLDocument(n4);\n this.m_lblText.setText(JAPHtmlMultiLineLabel.removeHTMLHEADAndBODYTags(this.m_lblText.getText()) + MORE_POINTS);\n this.updateDialog(false);\n if (jAPDialog.getContentPane().getSize().height < jAPDialog.getContentPane().getPreferredSize().height) {\n if (bl3) {\n n4 = n5 + n5 / (n + 2);\n continue;\n }\n n4 /= 2;\n continue;\n }\n bl3 = true;\n if (n5 < n4) {\n n5 = n4;\n }\n n4 += n4 / 2;\n }\n if (bl3 && n5 >= n3) {\n this.m_lblText.setText(this.m_strText);\n this.m_titlePane.remove(this.m_lblSeeFullText);\n }\n }\n if (this.m_lblText != null) {\n this.m_lblText.setText(\"<font color=#000000>\" + JAPHtmlMultiLineLabel.removeHTMLHEADAndBODYTags(this.m_lblText.getText()) + \"</font>\");\n }\n this.m_parentDialog = rootPaneContainer2;\n if (bl2) {\n this.m_rootPane.setPreferredSize(new Dimension(2500, 2500));\n }\n if (bl) {\n this.updateDialog(false);\n }\n this.getDialog().notifyAll();\n }\n }", "@Override\r\npublic void setTitle(String title) {\n\tsuper.setTitle(title);\r\n}", "public void setTitle(String title){\n this.title = title;\n }", "public void setTitle(String title) {\n mTitle = title;\n }", "private void setWindowTitle(String title) {\n this.title = title;\n }", "@Override\n public void setSubTaskName(String subTaskName) {\n if ((style & SUPPRESS_SUBTASK_LABEL) != 0) {\n return;\n }\n hasSubTask = true;\n String label = subTaskName;\n if ((style & PREPEND_MAIN_LABEL_TO_SUBTASK) != 0 && taskName != null && taskName.length() > 0) {\n label = taskName + ' ' + label;\n }\n super.setSubTaskName(label);\n }", "public void setTitle(String aNewTitle) \r\n\t{\r\n\t\tthis.title = aNewTitle;\r\n\t\tthis.panelEnvironment.panelTitleChanged();\r\n\t}", "private void setText(Text text) {\n \t\tthis.text = text;\n \t}", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String value) {\n/* 337 */ setTitle((String)null, value);\n/* */ }", "protected void SetTitle(String newTitle){ title = newTitle; }", "protected void setPopUpTitle(String title){\r\n\t\tthis.stage.setTitle(title);\r\n\t}" ]
[ "0.78997064", "0.78284675", "0.7703012", "0.72320926", "0.72083676", "0.7074167", "0.7051759", "0.70353234", "0.7011717", "0.6937087", "0.6886297", "0.68783444", "0.68198794", "0.67470556", "0.66564786", "0.66156375", "0.66015524", "0.657569", "0.6503126", "0.6503126", "0.6500257", "0.6500257", "0.6500257", "0.6500257", "0.6500257", "0.64999604", "0.643662", "0.643662", "0.643662", "0.6414574", "0.64066887", "0.64046603", "0.6400845", "0.6380564", "0.6315604", "0.6269086", "0.62653136", "0.6256097", "0.6241683", "0.6228364", "0.62253356", "0.6216115", "0.62150204", "0.61937827", "0.6168083", "0.6156743", "0.6154169", "0.6147555", "0.61212933", "0.61081475", "0.610331", "0.61032534", "0.61019135", "0.610161", "0.6094396", "0.60742074", "0.60626656", "0.6058287", "0.6055449", "0.6051667", "0.6050668", "0.6041892", "0.60320944", "0.6029264", "0.60239655", "0.60213035", "0.6012276", "0.600609", "0.60060316", "0.5989947", "0.597802", "0.59772265", "0.5959029", "0.5944313", "0.59431213", "0.5928041", "0.5928001", "0.58842885", "0.5876047", "0.5875437", "0.58742094", "0.5872897", "0.5864481", "0.5859268", "0.5858148", "0.5857501", "0.5848038", "0.5846449", "0.5840829", "0.58382124", "0.58314013", "0.58304566", "0.582875", "0.5823046", "0.58212864", "0.5814724", "0.58128506", "0.58101475", "0.5807413" ]
0.73997587
4
Amplifies the zoom value.
public void zoom(double amplifier) { int width = mapContainer.getWidth()-60; int height = mapContainer.getHeight()-60; double nXF = (double)(MouseInfo.getPointerInfo().getLocation().x - (getLocation().x + mapContainer.getLocation().x + 30))/width; double nYF = (double)(MouseInfo.getPointerInfo().getLocation().y - (getLocation().y + mapContainer.getLocation().y + 30))/height; zoom *= amplifier; xF = xF - 1/(zoom*2) + 1/zoom*nXF; yF = yF - 1/(zoom*2) + 1/zoom*nYF; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public void updateZoom() {\n camera.zoom = zoomLevel;\n }", "public void setZoom(float zoom){\r\n zoom = zoom * 100;\r\n zoom = Math.round(zoom);\r\n this.zoom = Math.max(zoom / 100, 0.01f);\r\n }", "public synchronized float getZoom()\r\n {\r\n return zoom;\r\n }", "public void setZoom(float zoom) {\n this.zoom = zoom;\n }", "public float getZoom() {\n return zoom;\n }", "public double getZoom() {\n return this.zoom;\n }", "public void setZoom(float zoomValue) {\n pos.zoom = zoomValue;\n invalidate();\n }", "@Override\n public void Zoom(double zoomNo) {\n\t \n }", "public float getZoom() {\n return zoom;\n }", "public void setleZoom( double valeur) {\n\t\tzoomMonde = valeur;\n\t}", "public double getZoomFactor()\r\n {\r\n return zoomFactor;\r\n }", "public synchronized void setZoom(float zoom)\r\n {\r\n this.zoom = Utils.clampFloat(zoom, .4f, 1.5f);\r\n }", "public void setZoom(){\n\t\tactive.setZoom();\n\t}", "public void zoomOnAddress(){\n adjustZoomLvl(16000);\n adjustZoomFactor();\n }", "private void adjustZoomFactor(){\n switch(zoomLevel){\n case 0:zoomFactor = 39; break;\n case 1:zoomFactor = 37; break;\n case 2:zoomFactor = 35; break;\n case 3:zoomFactor = 33; break;\n case 4:zoomFactor = 31; break;\n case 5:zoomFactor = 29; break;\n case 6:zoomFactor = 27; break;\n case 7:zoomFactor = 25; break;\n case 8:zoomFactor = 23; break;\n case 9:zoomFactor = 21; break;\n case 10:zoomFactor = 20; break;\n case 11:zoomFactor = 18; break;\n case 12:zoomFactor = 16; break;\n case 13:zoomFactor = 14; break;\n case 14:zoomFactor = 12; break;\n case 15:zoomFactor = 10; break;\n case 16:zoomFactor = 8; break;\n case 17:zoomFactor = 6; break;\n case 18:zoomFactor = 4; break;\n case 19:zoomFactor = 2; break;\n case 20:zoomFactor = 0; break;\n }\n }", "public double getZoom() {\n return mZoom;\n }", "public double getZoom() {\n\treturn zoom;\n}", "public int getZoom() {\n return P_SCALE;\n }", "public double getZoom() {\n return curZoom;\n }", "@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }", "public void zoomScaleIn() {\n \t\tzoomScale(SCALE_DELTA_IN);\n \t}", "public void setZoom( double zoom ) {\n\t\tthis.zoom = zoom;\n\t}", "public synchronized void addZoom(float zoom)\r\n {\r\n this.setZoom(zoom + this.getZoom());\r\n }", "public void setZoom(float zoom) {\r\n\t\tif (zoom < 0.1f)\r\n\t\t\treturn;\r\n\t\tthis.zoomFactor = zoom;\r\n\t}", "public void zoom(int s) {\r\n\t\tzoom += s * ZOOM_FACTOR;\r\n\t}", "public void zoomToFactor(double d) {\n\t\t\n\t}", "@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }", "@Override\n\tpublic void setZoom(int zoom) {\n\t\t\n\t}", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setZoom(double zoom) {\n if (zoom > 0) {\n this.zoom = zoom;\n this.rescale();\n }\n }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }", "int getZoomPref();", "public final int getZoom() {\r\n return zoom;\r\n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "public Integer getZoom() {\n return zoom;\n }", "public Integer getZoom() {\n return zoom;\n }", "public void zoomIn() {\n\tsetZoom(getNextZoomLevel());\n}", "protected void zoomToScale(float scale) {\n \t\tif (tweening) {\n \t\t\tscaleIntegrator.target(scale);\n \t\t} else {\n \t\t\tmapDisplay.sc = scale;\n \t\t\t// Also update Integrator to support correct tweening after switch\n \t\t\tscaleIntegrator.target(scale);\n \t\t\tscaleIntegrator.set(scale);\n \t\t}\n \t}", "public void setZoom(double zoom) {\n if(zoom != mZoom) {\n mZoom = zoom;\n setChanged();\n }\n }", "public void zoomIn() {\n\t\tif (this.zoom + DELTA_ZOOM <= MAX_ZOOM)\n\t\t\tthis.setZoom(this.zoom + DELTA_ZOOM);\n\t}", "void multitouchZoom(int new_zoom);", "protected abstract void onScalePercentChange(int zoom);", "public void zoomCam(float zoom){\n\t\tthis.camera.setZoom(zoom);\n\t}", "@Test\n public void testSetZoomMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MULTIPLIER, 1.678f);\n }", "protected abstract void handleZoom();", "int getMinZoom();", "protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}", "public float getPercentZoom() {\r\n return percentZoom;\r\n }", "public void zoomIn() {\r\n \t\tgraph.setScale(graph.getScale() * 1.25);\r\n \t}", "public void zoomScale(double scaleDelta) {\n \t\tzoomToScale((float) (mapDisplay.sc * scaleDelta));\n \t}", "public void zoom(double factor, Point mouseLocation) {\n Point2D.Double viewOffset = viewCoords_.getViewOffset();\n Point2D.Double sourceDataSize = viewCoords_.getFullResSourceDataSize();\n Point2D.Double zoomCenter;\n //compute centroid of the zoom in full res coordinates\n if (mouseLocation == null) {\n //if mouse not over image zoom to center\n zoomCenter = new Point2D.Double(viewOffset.x + sourceDataSize.y / 2,\n viewOffset.y + sourceDataSize.y / 2);\n } else {\n zoomCenter = new Point2D.Double(\n (long) viewOffset.x + mouseLocation.x\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor(),\n (long) viewOffset.y + mouseLocation.y\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor());\n }\n\n //Do zooming--update size of source data\n double newSourceDataWidth = sourceDataSize.x * factor;\n double newSourceDataHeight = sourceDataSize.y * factor;\n if (newSourceDataWidth < 5 || newSourceDataHeight < 5) {\n return; //constrain maximum zoom\n }\n if (data_.getBounds() != null) {\n //don't let either of these go bigger than the actual data\n double overzoomXFactor = newSourceDataWidth / (viewCoords_.xMax_ - viewCoords_.xMin_);\n double overzoomYFactor = newSourceDataHeight / (viewCoords_.yMax_ - viewCoords_.yMin_);\n if (overzoomXFactor > 1 || overzoomYFactor > 1) {\n newSourceDataWidth = newSourceDataWidth / Math.max(overzoomXFactor, overzoomYFactor);\n newSourceDataHeight = newSourceDataHeight / Math.max(overzoomXFactor, overzoomYFactor);\n }\n }\n viewCoords_.setFullResSourceDataSize(newSourceDataWidth, newSourceDataHeight);\n\n double xOffset = (zoomCenter.x - (zoomCenter.x - viewOffset.x)\n * newSourceDataWidth / sourceDataSize.x);\n double yOffset = (zoomCenter.y - (zoomCenter.y - viewOffset.y)\n * newSourceDataHeight / sourceDataSize.y);\n //make sure view doesn't go outside image bounds\n if (data_.getBounds() != null) {\n viewCoords_.setViewOffset(\n Math.max(viewCoords_.xMin_, Math.min(xOffset,\n viewCoords_.xMax_ - viewCoords_.getFullResSourceDataSize().x)),\n Math.max(viewCoords_.yMin_, Math.min(yOffset,\n viewCoords_.yMax_ - viewCoords_.getFullResSourceDataSize().y)));\n } else {\n viewCoords_.setViewOffset(xOffset, yOffset);\n }\n }", "@JSProperty(\"maxZoom\")\n void setMaxZoom(double value);", "private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}", "public void zoomIn() { zoomIn(1); }", "public int zoom() {\n double sizex = scale * getWidth();\n double sizey = scale * getHeight();\n for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2)\n if (sizex > world.east() || sizey > world.north())\n return zoom;\n return 32;\n }", "public void setScale(double value) {\n this.scale = value;\n }", "public void zoomIn()\n {\n zoomIn(1, width >> 1, height >> 1);\n }", "private void clampZoom()\n\t{\n\t\tif (zoom < ZOOM_MINIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MINIMUM;\n\t\t}\n\t\telse if (zoom > ZOOM_MAXIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MAXIMUM;\n\t\t}\n\t}", "public void zoom(float zoom) { \n if (zoom <=0) {\n throw new IllegalArgumentException();\n }\n\n workTransform.setTransform(null);\n workTransform.mScale(zoom);\n workTransform.mMultiply(userTransform);\n doc.setTransform(workTransform);\n swapTransforms();\n }", "public void setZoom(float zoom) {\n\t\tthis.zoom = zoom;\n\t\trevalidate();\n\t\trepaint();\n\t}", "public double getFacteurZoom()\n\t{\n \treturn facteurZoom;\n }", "public void zoomIn() {\n \t\tzoom(1);\n \t}", "public void adjustZoomLvl(double scale){\n zoomLevel = ZoomCalculator.calculateZoom(scale);\n scale = ZoomCalculator.setScale(zoomLevel);\n transform.setToScale(scale, -scale);\n }", "public long getZoomLevel()\r\n {\r\n return myZoomLevel;\r\n }", "public void setZoom(double zoom) {\n\tzoom = Math.min(getMaxZoom(), zoom);\n\tzoom = Math.max(getMinZoom(), zoom);\n\tif (this.zoom != zoom)\n\t\tprimSetZoom(zoom);\n}", "void onZoom() {\n\t\tmZoomPending=true;\n\t}", "@JavascriptInterface\n public void setZoom(final int zoom) {\n getHandler().post(new Runnable() {\n @Override\n public void run() {\n if (mWebViewFragment.getMapSettings()\n .getZoom() != zoom) {\n if (BuildConfig.DEBUG) {\n Log.d(TAG,\n \"setZoom \" + zoom);\n }\n\n final MapSettings mapSettings = mWebViewFragment.getMapSettings();\n mapSettings.setZoom(zoom);\n mWebViewFragment.setMapSettings(mapSettings);\n }\n }\n });\n }", "public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }", "public float getZoom() {\n if(internalNative != null) {\n return internalNative.getZoom();\n } else {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getZoomLevel();\n }\n // TODO: Browser component\n return 7;\n } \n }", "public final double transformZoom(double d) {\n double d2;\n int type2 = getType();\n if (type2 == 0) {\n return d + 1.0d;\n }\n if (type2 != 1) {\n if (type2 == 2) {\n d2 = getZoom();\n } else if (type2 == 3) {\n return getZoom();\n } else {\n if (type2 != 4) {\n return d;\n }\n d2 = getZoom();\n }\n return d + d2;\n }\n double d3 = d - 1.0d;\n if (d3 < 0.0d) {\n return 0.0d;\n }\n return d3;\n }", "public void zoomIn(double i) {\n Rectangle2D r = getExtents();\n double exp = Math.pow(1.5,i); double cx = r.getX() + r.getWidth()/2, cy = r.getY() + r.getHeight()/2;\n setExtents(new Rectangle2D.Double(cx - r.getWidth()/(exp*2), cy - r.getHeight()/(exp*2), r.getWidth()/exp, r.getHeight()/exp));\n }", "public void setZoom(int ps) {\n P_SCALE = ps;\n //EMBOSS = P_SCALE*8;\n }", "public double getCameraZoom() {\n\t\treturn cameraZoom;\n\t}", "public void zoomIn() {\n if (currentViewableRange.getLength() > 1) {\n zoomToLength(currentViewableRange.getLength() / 2);\n }\n }", "@SuppressWarnings(\"unused\")\n private void setZoom(JSONArray args, CallbackContext callbackContext) throws JSONException {\n Long zoom;\n zoom = args.getLong(1);\n\n this.myMoveCamera(CameraUpdateFactory.zoomTo(zoom), callbackContext);\n }", "private void applyZoomRatio(float ratio) {\n\t\tzoom = zoom * ratio;\n\t}", "public static void changeCameraZoom(boolean zoomIn){\r\n\t\tif(zoomIn && zoomLevel > 0){\r\n\t\t\tzoomLevel -= 2;\r\n\t\t}else if(!zoomIn){\r\n\t\t\tzoomLevel += 2;\r\n\t\t}\r\n\t}", "public void updateScale()\n {\n // get scale from world presenter\n s2 = (cam.getScale());\n //Convert to English Miles if appropriate\n if( !SettingsScreen.getUnits() ) s2 *= 0.60934;\n s1 = s2/2;\n repaint();\n }", "private void unsafeSetInitialZoom() {\n if (hic.isInPearsonsMode()) {\n initialZoom = hic.getMatrix().getFirstPearsonZoomData(HiC.Unit.BP).getZoom();\n } else if (HiCFileTools.isAllChromosome(hic.getXContext().getChromosome())) {\n mainViewPanel.getResolutionSlider().setEnabled(false);\n initialZoom = hic.getMatrix().getFirstZoomData(HiC.Unit.BP).getZoom();\n } else {\n mainViewPanel.getResolutionSlider().setEnabled(true);\n\n HiC.Unit currentUnit = hic.getZoom().getUnit();\n\n List<HiCZoom> zooms = (currentUnit == HiC.Unit.BP ? hic.getDataset().getBpZooms() :\n hic.getDataset().getFragZooms());\n\n\n// Find right zoom level\n\n int pixels = mainViewPanel.getHeatmapPanel().getMinimumDimension();\n int len;\n if (currentUnit == HiC.Unit.BP) {\n len = (Math.max(hic.getXContext().getChrLength(), hic.getYContext().getChrLength()));\n } else {\n len = Math.max(hic.getDataset().getFragmentCounts().get(hic.getXContext().getChromosome().getName()),\n hic.getDataset().getFragmentCounts().get(hic.getYContext().getChromosome().getName()));\n }\n\n int maxNBins = pixels / HiCGlobals.BIN_PIXEL_WIDTH;\n int bp_bin = len / maxNBins;\n initialZoom = zooms.get(zooms.size() - 1);\n for (int z = 1; z < zooms.size(); z++) {\n if (zooms.get(z).getBinSize() < bp_bin) {\n initialZoom = zooms.get(z - 1);\n break;\n }\n }\n\n }\n hic.unsafeActuallySetZoomAndLocation(\"\", \"\", initialZoom, 0, 0, -1, true, HiC.ZoomCallType.INITIAL, true);\n }", "public void zoom(double factor) {\n //Check whether we zooming in or out for adjusting the zoomLvl field\n //Scale the graphic and pan accordingly\n if(factor>1 && zoomLevel!=20) {\n transform.preConcatenate(AffineTransform.getScaleInstance(factor, factor));\n pan(getWidth() * (1 - factor) / 2, getHeight() * (1 - factor) / 2);\n checkForZoomIn();\n }else if(zoomLevel!=0 && factor<1){\n transform.preConcatenate(AffineTransform.getScaleInstance(factor, factor));\n pan(getWidth() * (1 - factor) / 2, getHeight() * (1 - factor) / 2);\n checkForZoomOut();\n }\n }", "public void zoomOut() { zoomOut(1); }", "public void zoomIn() {\n if (zoom > 0) {\n zoom--;\n spielPanel.setZoom(zoom);\n }\n }", "public void zoom(final double factor) {\n\t\tdouble oldScale = scene.getScalingFactor();\n\t\tdouble newScale = oldScale * (1 + factor);\n\t\tscene.setScalingFactor(newScale);\n\t\tif (orientation == Orientation.VERTICAL) {\n\t\t\tdouble before = -offset.getY() / oldScale + getSize().getHeight() / 2 / oldScale;\n\t\t\tdouble after = -offset.getY() / newScale + getSize().getHeight() / 2 / newScale;\n\t\t\toffset.translate(0, (int) Math.round((after - before) * newScale));\n\t\t} else {\n\t\t\tdouble before = -offset.getX() / oldScale + getSize().getWidth() / 2 / oldScale;\n\t\t\tdouble after = -offset.getX() / newScale + getSize().getWidth() / 2 / newScale;\n\t\t\toffset.translate((int) Math.round((after - before) * newScale), 0);\n\t\t}\n\t\trepaint();\n\t}", "public void setFacteurZoom(double fac)\n\t{\n \tthis.facteurZoom = this.facteurZoom * fac ;\n \tif (this.facteurZoom == 0)\n \t{\n \t\tthis.facteurZoom = 0.01;\n \t}\n }", "private static void initZoomOptions() {\n\t\tfloat zoom = 0;\n\t\twhile (zoom < DiagramaFigura.MAX_ZOOM) {\n\t\t\tzoom += DiagramaFigura.DELTA_ZOOM;\n\t\t\tif (zoom >= DiagramaFigura.MIN_ZOOM) {\n\t\t\t\tString key = Integer.toString((int) (zoom * 100));\n\t\t\t\tzoomOptions.put(key + \"%\", zoom);\n\t\t\t}\n\t\t}\n\t}", "public View zoom(Integer zoom) {\n setZoom(zoom);\n return this;\n }", "private void updateAmplificationValue() {\n ((TextView) findViewById(R.id.zoomUpDownText)).setText(String.valueOf(curves[0].getCurrentAmplification()));\n }", "@JSProperty(\"maxZoom\")\n double getMaxZoom();", "void onScaleChange(float scaleFactor, float focusX, float focusY);", "public void zoomScaleOut() {\n \t\tzoomScale(SCALE_DELTA_OUT);\n \t}", "public int getZoomLevel() {\n return this.zoomLevel;\n }", "public void zoomToLevel(int level) {\n \t\tfloat scale = getScaleFromZoom(level);\n \t\tzoomToScale(scale);\n \t}", "public void setScaleFactor(float scale){\n scaleFactor = scale;\n }", "public void setScale(float scale);", "void scale(double factor);", "public Integer getMaxzoom() {\n return maxzoom;\n }", "public double getScale(){\n\t\treturn scale;\n\t}", "public double getScale() {\n return scale;\n }" ]
[ "0.7250031", "0.7174638", "0.7108521", "0.70918125", "0.7074113", "0.70725554", "0.7053633", "0.70442235", "0.70329595", "0.70302796", "0.7028718", "0.70263815", "0.6988761", "0.6976066", "0.69717425", "0.6961163", "0.69267946", "0.6902393", "0.688831", "0.6879147", "0.68423796", "0.67770654", "0.677351", "0.67721", "0.6764831", "0.67518187", "0.6744941", "0.67345184", "0.6733052", "0.66602576", "0.66602576", "0.66571987", "0.6627385", "0.66183996", "0.6613572", "0.6612894", "0.65988463", "0.65988463", "0.658134", "0.65647787", "0.6539846", "0.6539637", "0.6531375", "0.65272844", "0.6524833", "0.651865", "0.6484956", "0.64549035", "0.6447551", "0.6435413", "0.643335", "0.64254284", "0.6411318", "0.64044815", "0.63969713", "0.6394624", "0.6385636", "0.6360971", "0.63549113", "0.6338606", "0.63376707", "0.6312168", "0.63095844", "0.63019794", "0.62950855", "0.62708324", "0.62672895", "0.6240247", "0.6205537", "0.62048703", "0.61992365", "0.6193133", "0.6189418", "0.61662203", "0.61622405", "0.61526084", "0.6149539", "0.61374235", "0.6130219", "0.6124527", "0.6121155", "0.61072636", "0.6103295", "0.6099082", "0.60802245", "0.6061557", "0.6036974", "0.60175556", "0.60104126", "0.59964764", "0.5983428", "0.5979928", "0.5967823", "0.59600776", "0.5933289", "0.59313804", "0.5915437", "0.59140027", "0.5904382", "0.5897597" ]
0.7109739
2
Updates the map image. Automatically revalidates the GUI JFrame.
public void updateMap(boolean animate) { getContentPane().add(mapContainer); revalidate(); // Setting up map int width = mapContainer.getWidth(); int height = mapContainer.getHeight(); BufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = I.createGraphics(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // Setting up map dimensions double xM = width*zoom, yM = height*zoom; double xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]); double xI = (xM-(yM-60)*(xL/yL))/2, yI = 30; if(xM/yM < xL/yL) { xI = 30; yI += (yM-(xM-60)*(yL/xL))/2; } double yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2; g2d.setColor(Color.white); g2d.fillRect(20, 20, width-40, height-40); g2d.setColor(roadColor); g2d.setStroke(new BasicStroke(roadWidth)); // Drawing each road int i, n = G.getSize(); double[] v1, v2; for(i = 0; i < n; i++) { for(Edge e : G.getEdges(i)) { v1 = V.get(i); v2 = V.get(e.next); if(animate) drawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d); else { drawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d); } } } // Drawing each path if(animate) { n = P.size()-1; for(i = 0; i < n; i++) { v1 = V.get(P.get(i)); v2 = V.get(P.get(i+1)); drawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d); try { Thread.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } mapContainer.setIcon(new ImageIcon(I)); revalidate(); } } // Creating image base g2d.setStroke(new BasicStroke(1)); g2d.setColor(Color.lightGray); g2d.fillRect(0, 0, width, 20); g2d.fillRect(0, 0, 20, height); g2d.fillRect(width-20, 0, 20, height); g2d.fillRect(0, height-20, width, 20); g2d.setColor(Color.black); g2d.drawRect(20, 20, width-40, height-40); g2d.setFont(titleFont); g2d.drawString(title, 40, 15); int tw = g2d.getFontMetrics().stringWidth(title); g2d.setFont(subtitleFont); g2d.drawString(subtitle, 50+tw, 15); mapContainer.setIcon(new ImageIcon(I)); revalidate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateLayer() {\n bufferedImage = null;\n repaint();\n panelResized();\n }", "public void updateLocation()\r\n {\r\n\t\timg.setUserCoordinator(latitude, longitude);\r\n\t\timg.invalidate();\r\n\t}", "public void updateMapGrid() {\n char[][] map = controller.getPopulatedMap();\n\t if (mapGrid == null) {\n mapGrid = new MapGrid(map.length, map[0].length, ICON_SIZE);\n }\n mapGrid.insertCharMap(map);\n }", "public void repaintMap() {\r\n\t\tpolygonMap.repaint();\r\n\t}", "public void updateInfo()\n\t{\n\t\twidth = Game.frame.getWidth();\n\t\theight = Game.frame.getHeight();\n\t\tGame.frame.revalidate();\n\t\tGame.frame.repaint();\n\t}", "public void refreshMapInformation() {\n\t\t((JLabel)components.get(\"timeElapsedLabel\")).setText(Integer.toString(ABmap.instance().getTimeElapsed()));\n\t\t((JLabel)components.get(\"oilInMapLabel\")).setText(Integer.toString(ABmap.instance().getOilInMap()));\n\t\t((JLabel)components.get(\"oilInStorageLabel\")).setText(Integer.toString(ABmap.instance().getOilInStorage()));\n\t\t((JProgressBar)components.get(\"oilCleanedProgressBar\")).setValue(100-((ABmap.instance().getOilInMap()*100)/ABmap.instance().initialOilCount));\n\t\t((JLabel)components.get(\"fuelUsedLabel\")).setText(Integer.toString(ABmap.instance().getFuelUsed()));\n\t\t((JLabel)components.get(\"simCompletedLabel\")).setText(Boolean.toString(ABmap.instance().isDone()));\n\t}", "@Override\n public void reloadWorkspace() {\n\tDataManager data = (DataManager)app.getDataComponent();\n mapName.setText(data.getMapName());\n bgColorPicker.setValue(Color.web(data.getBackgroundColor()));\n borderColorPicker.setValue(Color.web(data.getBorderColor()));\n //map.setMinSize(data.getMapWidth(), data.getMapHeight());\n //map.setMaxSize(data.getMapWidth(), data.getMapHeight());\n map.setBackground(new Background(new BackgroundFill(Color.web(data.getBackgroundColor()), null, null)));\n \n //map.setBorder(new Border(new BorderStroke(Color.web(data.getBorderColor()), BorderStrokeStyle.SOLID, null, new BorderWidths(data.getBorderWidth()))));\n mapZoomingSlider.setValue(data.getX());\n borderThicknessSlider.setValue(data.getBorderWidth());\n \n for (int p = 0; p<data.getPolygon().size();p++){\n Polygon changePolygon = new Polygon();\n changePolygon = (Polygon) data.getPolygon().get(p);\n changePolygon.setStrokeWidth(data.getBorderWidth());\n changePolygon.setStroke(Color.web(data.getBorderColor()));\n changePolygon.setFill(Color.rgb(data.getSubRegion().get(p).getRed(), data.getSubRegion().get(p).getGreen(), data.getSubRegion().get(p).getBlue()));\n }\n \n imagePane.getChildren().clear();\n for(int i=0;i<data.getImageDetail().size();i++){\n newImage = new Image(\"file:\"+data.getImageDetail().get(i).getPath());\n ImageView iv1 = new ImageView();\n iv1.setImage(newImage);\n iv1.setTranslateX(data.getImageDetail().get(i).getX());\n iv1.setTranslateY(data.getImageDetail().get(i).getY());\n imagePane.getChildren().add(iv1);\n }\n \n group.getChildren().clear();\n for (int k = 0; k<data.getSubRegion().size();k++){\n Polygon polygon = (Polygon) data.getPolygon().get(k);\n group.getChildren().add(polygon);\n }\n subRegionTable.setItems(data.getSubRegion());\n //group.resize(802, 536);\n group.setScaleX(data.getMapZoom());\n group.setScaleY(data.getMapZoom());\n }", "private void refreshMapAndFrame()\n\t{\n\t\tMapAccess.refresh();\n\t\tFrameMap.refresh();\n\t}", "public void update() {\n\t\t//Start updting the image\n\t\timg.loadPixels();\n\t\t\n\t\t//for every cell apply a color\n\t\tGridCell[] cells = grid.getCells();\n\t\tfor(int i = 0 ; i < cells.length; i++) {\n\t\t\timg.pixels[i] = cells[i].getMiniMapColor(ignoreDiscovered);\n\t\t}\n\t\t\n\t\t//Now update the image\n\t\timg.updatePixels();\n\t}", "public void showmap() {\n MapForm frame = new MapForm(this.mapLayout);\n frame.setSize(750, 540);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n frame.setVisible(true);\n }", "public void updateOnCtWindowChange() {\n int[] displayImageData = resolveRaw(imgData[currentLayer]);\n raster.setPixels(0, 0, imgWidth, imgHeight, displayImageData);\n image.setData(raster);\n }", "public void update()\n\t{\n\t\tGViewMapManager gViewMapManager = this.guiController.getCurrentStyleMapManager();\n\t\tLayout layout = gViewMapManager.getLayout();\n\n\t\tswitch (layout)\n\t\t{\n\t\t\tcase LINEAR:\n\t\t\t\tthis.linear.setSelected(true);\n\t\t\t\tbreak;\n\t\t\tcase CIRCULAR:\n\t\t\t\tthis.circular.setSelected(true);\n\t\t\t\tbreak;\n default:\n break;\n\t\t}\n\t}", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n if (game.hasPlayer(row, column)){\n setImage2(\"images/player.png\");\n } else {\n player = null;\n }\n \n //ImageIcon image = null;//new ImageIcon(\"images/blank.png\");\n JLabel lblImage = new JLabel(); // create a new label to put an image on\n \n // call the method to set a new Buffered image to this panel\n \n if (squareVisible && image == null){\n switch ( terrain )\n {\n case SAND : setImage(\"images/sand.png\"); break;// = new ImageIcon(\"images/sand.png\"); break;\n case FOREST : setImage(\"images/forest.png\"); break;\n case WETLAND : setImage(\"images/wetland.png\"); break;\n case SCRUB : setImage(\"images/scrub.png\"); break;\n case WATER : setImage(\"images/water.png\"); break;\n default : image = null; break;\n }\n }\n \n// this is old code that use to change the graphics, trying BufferedImage instead of IconImage\n// switch ( terrain )\n// {\n// case SAND : setImage(\"images/forest.png\");// = new ImageIcon(\"images/sand.png\"); break;\n// case FOREST : image = new ImageIcon(\"images/forest.png\"); break;\n// case WETLAND : image = new ImageIcon(\"images/wetland.png\"); break;\n// case SCRUB : image = new ImageIcon(\"images/scrub.png\"); break;\n// case WATER : image = new ImageIcon(\"images/water.png\"); break;\n// default : image = null; break;\n// }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column)); \n }\n else {\n lblText.setText(\"\");\n image = null;\n }\n \n // if the game is not being played, remove the activeBorder (this fixes the multiple borders glitch)\n// if (game.getState() != GameState.PLAYING) {\n// setBorder(normalBorder);\n// } \n \n // set the redsquare border to active if the player is here\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n \n\n // add the imageIcon to the gridsquare panel\n //lblImage.setIcon((Icon) image); // add the image to the label\n this.add(lblImage); // add the jlabel image to the current gridsquare\n \n JLabel lblImage2 = new JLabel(); \n this.add(lblImage2);\n \n }", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void updateImgCanvas() {\n\t\timgCanvas.updateCanvasImage(source.source);\n\t\tthis.revalidate();\n\t\tthis.repaint();\n\t}", "private void updateImage() {\r\n\r\n final BufferedImage image = imageCanvas.getImage();\r\n\r\n //\r\n // no image, no size\r\n\r\n if (image == null) {\r\n imageCanvas.setPreferredSize(new Dimension(0, 0));\r\n }\r\n\r\n else {\r\n\r\n final int imageWidth = image.getWidth();\r\n final int imageHeight = image.getHeight();\r\n\r\n //\r\n // if zoom is set to real size there is no need for calculations\r\n\r\n if (zoom == ZOOM_REAL_SIZE) {\r\n imageCanvas.setPreferredSize(new Dimension(imageWidth, imageWidth));\r\n }\r\n\r\n //\r\n // apply the zoom ratio to the image size\r\n\r\n else {\r\n\r\n final double ratio = ((double) zoom) / ((double) ZOOM_REAL_SIZE);\r\n\r\n final double imageCanvasMaxWidth = ((double) imageWidth) * ratio;\r\n final double imageCanvasMaxHeight = ((double) imageHeight) * ratio;\r\n\r\n imageCanvas.setPreferredSize(new Dimension((int) imageCanvasMaxWidth, (int) imageCanvasMaxHeight));\r\n }\r\n }\r\n\r\n //\r\n // revalidation\r\n // do not use #revaliade() method, validation will occur after all currently\r\n // pending events have been dispatched, use invalidate/validate/repaint\r\n\r\n imageCanvas. invalidate();\r\n imageCanvas.validate();\r\n imageCanvas.repaint();\r\n \r\n// imageCanvas.revalidate();\r\n \r\n invalidate();\r\n validate();\r\n repaint();\r\n\r\n// revalidate();\r\n \r\n //\r\n // this is the best place to update the cursor\r\n // since all actions on the image will call this method\r\n\r\n updateCursor(false);\r\n }", "@Override\n public void onScreenUpdated(BufferedImage image) {\n RemoteMachineConfig.SCREEN = image;\n panel1.repaint();\n panel1.setSize(1020,600);\n }", "void setMapChanged();", "private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }", "public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }", "private void init() {\n\t\trunning = true;\n\t\timage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\tg = (Graphics2D) image.getGraphics();\n\t\ttheMap.loadTiles(\"resizedTiles2.png\");\n\t}", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "public void updateImage(final Image image) { //The Reason that we have Set the Image to final over here is because once we fetch the Image from the AbsolutePath then after scaling this should be the Final Image in which we detect the Faces \n\t\timagelabel.setIcon(new ImageIcon(scaleImage(image))); \n\t}", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tthis.mapImage.resizeImage(this.getWidth() - 15, this.getHeight() - 60);\n\t\t// make the thread \"go to sleep\" to avoid smearing the screen\n\t\ttry {\n\t\t\tThread.sleep(20);\n\t\t} catch (InterruptedException e0) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te0.printStackTrace();\n\t\t}\n\t\tdrawAll();\n\t}", "public void Draw() {\n\t\timgIcon = new ImageIcon(imgUrl);\n\t}", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "@Override\r\n\tpublic void onMapElementCreated(MapElement mapElement) {\r\n\t\tfields.put(mapElement, new UIElement(mapElement.getCoord(), UIUtility.getImage(mapElement.getImagePath())));\r\n\r\n\t\tUILogger.log(mapElement + \" changed\");\r\n\r\n\t\t// Notify the GamePanel that its contents need to be repainted\r\n\t\tparent.repaint();\r\n\t\tUILogger.log(\"GamePanel.repaint()\");\r\n\t}", "@Override\n protected void freeUpdate()\n {\n if (raceStarted)\n dragRacePanel.updateGameImage();\n\n /* Repaint panel */\n dragRacePanel.repaint();\n }", "public void redraw() {\n\t\timgDisplay = null;\n\t\trepaint();\n\t}", "private void updateColorMap() {\n //if (colorMap == null) {\n colorMap = ColorUtil.buildColorMap(colorBar.getCurrentColors(),\n null);\n /* } else {\n colorMap = ColorUtil.updateColorMap(colorBar.getCurrentColors(),\n colorMap);\n }*/\n cmapParams.setColorMap(colorMap);\n cmapParams.setColorMapName(null);\n ((AbstractNcEditor) EditorUtil.getActiveEditor()).refresh();\n }", "public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(g);\n }\n g.dispose();\n }", "public void switchToMap()\n {\n feedbackLabel.setVisible(false);\n d.setVisible(false);\n a.setText(destinations[0].getName());\n b.setText(destinations[1].getName());\n c.setText(destinations[2].getName());\n currentClue=destinations[0].getRandClue();\n questionLabel.setText(currentClue);\n atQuestionStage=false;\n shuffleButtons();\n questionLabel.setBounds(650-questionLabel.getPreferredSize().width,120,600,30);\n mapImageLabel.setVisible(true);\n mapImageLabel.repaint();\n revalidate();\n }", "protected void reDraw(){\n\t\tcontentPane.revalidate();\n\t\trepaint();\n\t}", "public void setActiveMap(IMap map) {\n\t\tm_activeMap = map;\n\t\t\n\t\tFile imageLocation = map.getImage();\n\t\tif (! imageLocation.exists()) {\n\t\t\tFile altImage = map.getAltImage();\n\t\t\tif ( altImage != null && altImage.exists()) {\n\t\t\t\timageLocation = altImage;\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadImage(imageLocation);\n\t\tupdateZoomCanvas();\n\t}", "private void rebuildImageIfNeeded() {\n Rectangle origRect = this.getBounds(); //g.getClipBounds();\n// System.out.println(\"origRect \" + origRect.x + \" \" + origRect.y + \" \" + origRect.width + \" \" + origRect.height);\n\n backBuffer = createImage(origRect.width, origRect.height);\n// System.out.println(\"Image w \" + backBuffer.getWidth(null) + \", h\" + backBuffer.getHeight(null));\n Graphics backGC = backBuffer.getGraphics();\n backGC.setColor(Color.BLACK);\n backGC.fillRect(0, 0, origRect.width, origRect.height);\n// updateCSysEntList(combinedRotatingMatrix);\n paintWorld(backGC);\n }", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void repaintGraph() {\r\n this.repaint();\r\n ((GraphBuilder) getFrameParent()).getMiniMap().repaint();\r\n }", "public void refresh() {\n\t\tdrawingPanel.repaint();\n\t}", "public FRMUpdateRepair() {\n initComponents();\n this.setLocationRelativeTo(null);\n setIconImage(new ImageIcon(getClass().getResource(\"icono.png\")).getImage());\n }", "private void updateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateButtonActionPerformed\n try {\n ContactInfo contactInfo = new ContactInfo(nameField.getText(), phoneField.getText(), emailField.getText(), addressField.getText(), imageTitle);\n new DbConnection().edit(oldPhoneNumber, contactInfo);\n ImageSaver.saveImage(selectedFilePath, imageTitle);\n new File(\"images\\\\\" + oldImageTitle).delete();\n mainWindow.refreshList();\n this.setVisible(false);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUi() {\n if (mMap == null) {\n return;\n }\n try {\n if (mPermissionCheck.locationPermissionGranted()) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public void updateOnMaskChange() {\n if(maskList != null) {\n int[] displayMaskData = resolveMasks();\n maskRaster.setDataElements(0, 0, imgWidth, imgHeight, displayMaskData);\n maskImage.setData(maskRaster);\n }\n }", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }", "@Override\r\n\tpublic void pictureUpdated() {\r\n\t\tif(mDialog != null)\r\n\t\t\tmDialog.loadPicture();\r\n\t\t\r\n\t}", "public void update()\r\n {\n for (MapObject mo : gameData.getMap().getObjects())\r\n {\r\n mo.getAI().advance();\r\n }\r\n \r\n // update the UI\r\n for (UIElement uiEl : ui.getUIElements())\r\n {\r\n uiEl.update();\r\n }\r\n\r\n // Move the map objects\r\n movHandler.moveObjects();\r\n\r\n // Refresh the screen position\r\n Player player = gameData.getPlayer();\r\n this.centerScreen((int) player.getX() + Tile.TILESIZE / 2, (int) player.getY() + Tile.TILESIZE / 2);\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tAsset asset = ((ImageFileImagePanelModel)imagePanel.getModel()).getAsset(index);\n\t\t\t\t\t\t\tif (!AssetManager.hasAsset(asset)) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAssetManager.putAsset(asset);\n\t\t\t\t\t\t\t\tMapTool.serverCommand().putAsset(asset);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tZone zone = new Zone(asset.getId());\n\t\t\t\t\t\t\tzone.setType(Zone.Type.MAP);\n\t\t\t\t\t\t\t\n\t\t MapTool.addZone(zone);\n\t\t\t\t\t\t}", "public void actualizar() {\r\n\r\n\t\tthis.panelDatos.actualizar();\r\n\t\tthis.panelJuego.paintComponents(getGraphics());\r\n\r\n\t}", "void setIcon(String current) {\n\tif (current != null && (!current.equals(currentName) || mapList == null)) {\n mapList = main.myData.getGridLinks(current);\n\n removeAll();\n if (mapList == null) {\n revalidate();\n return;\n }\n\n\t currentName = current;\n\n TreeSet ts = new TreeSet(Collator.getInstance(Locale.FRANCE));\n ts.addAll(mapList.keySet());\n Iterator iter = ts.iterator();\n ArrayList panels = new ArrayList();\n int idx = 0;\n int x = 0;\n int y = 0;\n while (iter.hasNext()) {\n String gridid = (String) iter.next();\n String[] refmap = (String[]) mapList.get(gridid);\n ImagePanel p = new ImagePanel(refmap);\n\n if (gridid.matches(\"[0-9],[0-9]\")) {\n x = Integer.parseInt\n (gridid.substring(0, gridid.indexOf(',')));\n y = Integer.parseInt\n (gridid.substring(gridid.indexOf(',')+1));\n }\n else {\n x = idx%4;\n y = idx/4;\n idx++;\n }\n\n // Prepare y-panels\n for (int i = panels.size(); i <= y; i++)\n panels.add(new ArrayList());\n\n // Prepare x-panels\n ArrayList al = (ArrayList) panels.get(y);\n for (int i = al.size(); i <= x; i++)\n al.add(null);\n\n al.set(x, p);\n }\n\n GridBagConstraints constr = new GridBagConstraints();\n constr.fill = GridBagConstraints.BOTH;\n constr.weightx = constr.weighty = 1;\n constr.insets = new Insets(5,5,5,5);\n for (int i = 0; i < panels.size(); i++) {\n ArrayList al = (ArrayList) panels.get(i);\n for (int j = 0; j < al.size(); j++) {\n JComponent px = new JPanel();\n constr.gridx = j;\n constr.gridy = i;\n if (al.get(j) != null)\n px = (ImagePanel)al.get(j);\n add(px, constr);\n }\n }\n\n\t // Adapt the display\n\t revalidate();\n\t}\n }", "public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }", "public static void reload() {\n\t\tatlasHelpScreen.reload();\n\t}", "public void update_map(Player player) \n\t{\n\t\tfor (int i = 0; i < this.map.length; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.map[i].length;j++) \n\t\t\t{\n\t\t\t\tswitch (map[i][j]) \n\t\t\t\t{\n\t\t\t\tcase GRASS:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PATH:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase CROSS_ROADS:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase TA:\n\t\t\t\t\tthis.gc.drawImage(TA_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase RESEARCHER:\n\t\t\t\t\tthis.gc.drawImage(RESEARCHER_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase FIRST_YEAR:\n\t\t\t\t\tthis.gc.drawImage(FIRST_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SECOND_YEAR:\n\t\t\t\t\tthis.gc.drawImage(SECOND_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SCORE_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont titleFont = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(titleFont);\n\t\t\t\t\tString text = \"GPA: \" + player.getGPA();\n\t\t\t\t\tthis.gc.fillText(text, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(text, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TUITION_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont title = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(title);\n\t\t\t\t\tString Tuition = \"Tuition: \" + (player.getTuition());\n\t\t\t\t\tthis.gc.fillText(Tuition, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(Tuition, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void initialize() {\r\n\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 760, 680);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tmapa = new GraphicalMap();\r\n\t\tmapa.setBackground(Color.WHITE);\r\n\t\tmapa.setBounds(236, 20, 500, 500);\r\n\t\tmapa.loadSource();\r\n\t\tmapa.loadBoard(novoJogo.VirtualBoard());\r\n\t\tmapa.addKeyListener(new KeyListener() { \r\n\t\t\t\r\n\t\t\t@Override\r\n public void keyTyped(KeyEvent e) {}\r\n\r\n @Override\r\n public void keyReleased(KeyEvent e) {}\r\n\r\n \r\n\t\t\t@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tswitch(e.getKeyCode()){\r\n\t\t\t\tcase KeyEvent.VK_LEFT: \r\n\t\t\t\t\tmovement('a');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KeyEvent.VK_RIGHT:\r\n\t\t\t\t\tmovement('d');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KeyEvent.VK_UP: \r\n\t\t\t\t\tmovement('w');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KeyEvent.VK_DOWN: \r\n\t\t\t\t\tmovement('s');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t }\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\r\n\t\t\t}\r\n );\t\t\t\t\t\t\r\n\t\tmapa.setFocusable(true);\r\n\t\tframe.getContentPane().add(mapa);\r\n\t\t\r\n\t\t\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Number of Ogres: \");\r\n\t\tlblNewLabel.setBounds(10, 11, 104, 27);\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setBounds(107, 14, 119, 20);\r\n\t\ttextField.setText(\"0\");\r\n\t\tframe.getContentPane().add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\tlblGuardPersonality = new JLabel(\"Guard Personality:\");\r\n\t\tlblGuardPersonality.setBounds(10, 47, 94, 14);\r\n\t\tframe.getContentPane().add(lblGuardPersonality);\r\n\t\t\r\n\t\tJComboBox comboBox = new JComboBox();\r\n\t\tcomboBox.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tcomboBox.setModel(new DefaultComboBoxModel(new String[] {\"Suspicious\", \"Rookie\", \"Drunken\"}));\r\n\t\tcomboBox.setToolTipText(\"\");\r\n\t\tcomboBox.setBounds(107, 45, 119, 17);\r\n\t\tframe.getContentPane().add(comboBox);\r\n\t\t\r\n\r\n\t\tJComboBox comboBox_1 = new JComboBox();\r\n\t\tcomboBox_1.setModel(new DefaultComboBoxModel(new String[] {\"1\", \"2\"}));\r\n\t\tcomboBox_1.setBounds(107, 73, 119, 20);\r\n\t\tframe.getContentPane().add(comboBox_1);\r\n\t\t\r\n\t\tbtnSaveButton.setEnabled(false);\r\n\t\tbtnSaveButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tjogo.saveGame(novoJogo);\r\n\t\t\t}});\r\n\r\n\t\tbtnSaveButton.setBounds(10, 440, 216, 23);\r\n\t\tframe.getContentPane().add(btnSaveButton);\r\n\t\t\r\n\t\tbtnLoadButton.setEnabled(false);\r\n\t\tbtnLoadButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tnovoJogo = jogo.getBoard();\r\n\t\t\t}});\r\n\r\n\t\tbtnLoadButton.setBounds(10, 470, 216, 23);\r\n\t\tframe.getContentPane().add(btnLoadButton);\r\n\t\t\r\n\t\tbtnNewButton.setEnabled(false);\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tmovement('w');\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton.setBounds(70, 181, 89, 23);\r\n\t\tframe.getContentPane().add(btnNewButton);\r\n\t\t\r\n\t\t\r\n\t\tbtnNewButton_1.setEnabled(false);\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tmovement('s');\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setBounds(70, 249, 89, 23);\r\n\t\tframe.getContentPane().add(btnNewButton_1);\r\n\t\t\r\n\t\t\r\n\t\tbtnNewButton_2.setEnabled(false);\r\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tmovement('a');\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_2.setBounds(10, 215, 89, 23);\r\n\t\tframe.getContentPane().add(btnNewButton_2);\r\n\t\t\r\n\t\t\r\n\t\tbtnNewButton_3.setEnabled(false);\r\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tmovement('d');\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_3.setBounds(132, 215, 89, 23);\r\n\t\tframe.getContentPane().add(btnNewButton_3);\r\n\t\t\r\n\t\tJButton btnQuitGame = new JButton(\"Quit Game\");\r\n\t\tbtnQuitGame.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnQuitGame.setBounds(10, 500, 216, 23);\r\n\t\tframe.getContentPane().add(btnQuitGame);\r\n\t\t\r\n\t\tlblGameStatus = new JLabel(\"Game Status\");\r\n\t\tlblGameStatus.setBounds(21, 603, 223, 14);\r\n\t\tframe.getContentPane().add(lblGameStatus);\r\n\t\t\r\n\t\tJLabel lblLevel = new JLabel(\"Level:\");\r\n\t\tlblLevel.setBounds(49, 76, 46, 14);\r\n\t\tframe.getContentPane().add(lblLevel);\r\n\t\t\r\n\t\tJButton btnNewGame = new JButton(\"New Game\");\r\n\t\tbtnNewGame.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tnovoJogo = new Board();\r\n\t\t\t\t\r\n\t\t\t\tGuard guarda = new Guard(1,8);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(comboBox.getSelectedItem().toString() == \"Suspicious\")\r\n\t\t\t\t{\r\n\t\t\t\t\tguarda = new GuardSuspicious(1,8);\r\n\t\t\t\t}\r\n\t\t\t\telse if(comboBox.getSelectedItem().toString() == \"Drunken\")\r\n\t\t\t\t{\r\n\t\t\t\t\tguarda = new GuardDrunken(1,8);\r\n\t\t\t\t}\r\n\t\t\t\telse if(comboBox.getSelectedItem().toString() == \"Rooki\")\r\n\t\t\t\t{\r\n\t\t\t\t\tguarda = new GuardRookie(1,8);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnovoJogo.addGuard(guarda);\r\n\r\n\t\t\tif (textField.getText().equals(\"\") || Integer.parseInt(textField.getText()) > 5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tlblGameStatus.setText(\"Escolhe um numero valido!!\");\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Integer.parseInt(textField.getText()); i++)\r\n\t\t\t\t{\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tRandom rand = new Random();\r\n\t\t\t\t\tint x = rand.nextInt(8);\r\n\t\t\t\t\tx++;\r\n\t\t\t\t\tint y = rand.nextInt(8);\r\n\t\t\t\t\ty++;\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tOgre shrek = new Ogre(x,y);\r\n\t\t\t\t\tnovoJogo.addOgre(shrek);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tHero heroi = new Hero(1,1);\r\n\t\t\t\tjogo.setExit(0);\r\n\t\t\t\tif(comboBox_1.getSelectedItem().toString() == \"2\")\r\n\t\t\t\t{\r\n\t\t\t\t\tjogo.setExit(1);\r\n\t\t\t\t\tnovoJogo.newBoard();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tnovoJogo.setHero(heroi);\r\n\t\t\t\t\r\n\t\t\t\tbtnNewButton.setEnabled(true);\r\n\t\t\t\tbtnNewButton_1.setEnabled(true);\r\n\t\t\t\tbtnNewButton_2.setEnabled(true);\r\n\t\t\t\tbtnNewButton_3.setEnabled(true);\r\n\t\t\t\tbtnSaveButton.setEnabled(true);\r\n\t\t\t\tbtnLoadButton.setEnabled(true);\r\n\t\t\t\tmapa.loadBoard(novoJogo.VirtualBoard());\r\n\t\t\t\tmapa.repaint();\r\n\t\t\t\tmapa.requestFocusInWindow();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewGame.setBounds(10, 410, 216, 23);\r\n\t\tframe.getContentPane().add(btnNewGame);\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "public void updateObjectImage() {\r\n\t\tif (this.objectDescriptionTabItem != null) this.objectDescriptionTabItem.redrawImageCanvas();\r\n\t}", "private void update(){\n\n//\t\tif(frameSupplier != null){\n//\n//\t\t\tBufferedImage frame = frameSupplier.getFrame();\n//\n//\t\t\tvideoContainer.setIcon(new ImageIcon(frame));\n//\t\t\tvideoContainer.setText(null);\n//\n//\t\t}\n\n\t\tBufferedImage frame = camera.getImage();\n\t\tvideoContainer.setIcon(new ImageIcon(frame));\n\t\tvideoContainer.setText(null);\n\n\t\tgpioManager.setStatusColour(Color.getHSBColor((System.currentTimeMillis() % 3000) / 3000f, 1, 1));\n\n\t\tgpioManager.setShutterLEDState(System.currentTimeMillis() % 1000 > 500);\n\n\t\tjFrame.repaint();\n\t}", "private void updateLocationUI() {\n if (map == null) {\n return;\n }\n try {\n if (locationPermissionGranted) {\n map.setMyLocationEnabled(true);\n map.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n map.setMyLocationEnabled(false);\n map.getUiSettings().setMyLocationButtonEnabled(false);\n lastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public static void reload() {\n\t\tatlasUIElements.reload();\n\t}", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n\n // Display the user selected map type\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(mContext, R.raw.map_style_night);\n mMap.setMapStyle(style);\n\n // Don't want to display the default location button because\n // we are already displaying using a FAB\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n mMap.setOnMyLocationClickListener(this);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "protected void updateDisplay() {\n\t\t\t// this is called when upload is completed\n\n\t\t\tString filename = getLastFileName();\n\t\t\tfor (SetupMapViewListener listener : listeners)\n\t\t\t\tlistener.shapeFileUploadedEvent(filename, new ByteArrayInputStream((byte[]) getValue()));\n\t\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jDesktopPane1 = new javax.swing.JDesktopPane();\n jFrameMap = new javax.swing.JFrame();\n mapPanel = new javax.swing.JPanel();\n jPanelDB = new javax.swing.JPanel();\n jButtonDBToAddr = new javax.swing.JButton();\n jLabelHMTitle = new javax.swing.JLabel();\n jButtonHMExit = new javax.swing.JButton();\n jPanelDBLoad = new javax.swing.JPanel();\n jLabelDBHead = new javax.swing.JLabel();\n jFieldDBFile = new javax.swing.JTextField();\n jButtonDBLoad = new javax.swing.JButton();\n jCheckBoxZipFilter = new javax.swing.JCheckBox();\n jTextFieldZipcodes = new javax.swing.JTextField();\n jPanelAddr = new javax.swing.JPanel();\n jButtonAddrToDB = new javax.swing.JButton();\n jPanelAddrInfo = new javax.swing.JPanel();\n jTextFieldEnd = new javax.swing.JTextField();\n jLabelStart = new javax.swing.JLabel();\n jLabelEnd = new javax.swing.JLabel();\n jTextFieldStart = new javax.swing.JTextField();\n jLabelShowDB = new javax.swing.JLabel();\n jPanelFormat = new javax.swing.JPanel();\n jLabelFormatHead = new javax.swing.JLabel();\n jComboBoxFormat = new javax.swing.JComboBox();\n jCheckBoxQuickSearch = new javax.swing.JCheckBox();\n jLabelHMTitle1 = new javax.swing.JLabel();\n jButtonGetDirections = new javax.swing.JButton();\n jCheckBoxHideStreetNames = new javax.swing.JCheckBox();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaResults = new javax.swing.JTextArea();\n\n jFrameMap.setTitle(\"Husky Maps: Map View\");\n jFrameMap.setMinimumSize(new java.awt.Dimension(100, 100));\n\n mapPanel.setBackground(new java.awt.Color(254, 254, 254));\n mapPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n mapPanel.setPreferredSize(new java.awt.Dimension(500, 300));\n mapPanel.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n mapPanelMouseReleased(evt);\n }\n });\n mapPanel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n mapPanelMouseDragged(evt);\n }\n });\n\n javax.swing.GroupLayout mapPanelLayout = new javax.swing.GroupLayout(mapPanel);\n mapPanel.setLayout(mapPanelLayout);\n mapPanelLayout.setHorizontalGroup(\n mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 496, Short.MAX_VALUE)\n );\n mapPanelLayout.setVerticalGroup(\n mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 296, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jFrameMapLayout = new javax.swing.GroupLayout(jFrameMap.getContentPane());\n jFrameMap.getContentPane().setLayout(jFrameMapLayout);\n jFrameMapLayout.setHorizontalGroup(\n jFrameMapLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jFrameMapLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jFrameMapLayout.setVerticalGroup(\n jFrameMapLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jFrameMapLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Husky Maps: Controls\");\n\n jPanelDB.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanelDB.setPreferredSize(new java.awt.Dimension(400, 251));\n\n jButtonDBToAddr.setLabel(\"Back to Current\");\n jButtonDBToAddr.setMaximumSize(new java.awt.Dimension(130, 29));\n jButtonDBToAddr.setMinimumSize(new java.awt.Dimension(130, 29));\n jButtonDBToAddr.setPreferredSize(new java.awt.Dimension(130, 29));\n jButtonDBToAddr.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonDBToAddrActionPerformed(evt);\n }\n });\n\n jLabelHMTitle.setFont(new java.awt.Font(\"Arial Black\", 3, 24));\n jLabelHMTitle.setText(\"Husky Maps!\");\n\n jButtonHMExit.setText(\"Exit\");\n jButtonHMExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonHMExitActionPerformed(evt);\n }\n });\n\n jLabelDBHead.setText(\"Enter Database Source:\");\n\n jFieldDBFile.setForeground(new java.awt.Color(170, 170, 170));\n jFieldDBFile.setText(\"enter folder path\");\n jFieldDBFile.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jFieldDBFileFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jFieldDBFileFocusLost(evt);\n }\n });\n\n jButtonDBLoad.setText(\"Load Database\");\n jButtonDBLoad.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonDBLoadActionPerformed(evt);\n }\n });\n\n jCheckBoxZipFilter.setText(\"Filter zipcodes?\");\n\n jTextFieldZipcodes.setForeground(new java.awt.Color(170, 170, 170));\n jTextFieldZipcodes.setText(\"zipcode1, zipcode2, etc\");\n jTextFieldZipcodes.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jTextFieldZipcodesFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextFieldZipcodesFocusLost(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelDBLoadLayout = new javax.swing.GroupLayout(jPanelDBLoad);\n jPanelDBLoad.setLayout(jPanelDBLoadLayout);\n jPanelDBLoadLayout.setHorizontalGroup(\n jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jFieldDBFile, javax.swing.GroupLayout.DEFAULT_SIZE, 375, Short.MAX_VALUE)\n .addComponent(jLabelDBHead)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDBLoadLayout.createSequentialGroup()\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addComponent(jTextFieldZipcodes, javax.swing.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)\n .addGap(30, 30, 30))\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addComponent(jCheckBoxZipFilter)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addComponent(jButtonDBLoad, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanelDBLoadLayout.setVerticalGroup(\n jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelDBHead)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jFieldDBFile, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonDBLoad)\n .addComponent(jCheckBoxZipFilter))\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jTextFieldZipcodes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(24, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanelDBLayout = new javax.swing.GroupLayout(jPanelDB);\n jPanelDB.setLayout(jPanelDBLayout);\n jPanelDBLayout.setHorizontalGroup(\n jPanelDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelHMTitle)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)\n .addComponent(jButtonDBToAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDBLayout.createSequentialGroup()\n .addContainerGap(310, Short.MAX_VALUE)\n .addComponent(jButtonHMExit, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(jPanelDBLayout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addComponent(jPanelDBLoad, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelDBLayout.setVerticalGroup(\n jPanelDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelHMTitle)\n .addComponent(jButtonDBToAddr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanelDBLoad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonHMExit)\n .addGap(36, 36, 36))\n );\n\n jPanelAddr.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanelAddr.setPreferredSize(new java.awt.Dimension(400, 251));\n\n jButtonAddrToDB.setLabel(\"Database select\");\n jButtonAddrToDB.setMaximumSize(new java.awt.Dimension(130, 29));\n jButtonAddrToDB.setMinimumSize(new java.awt.Dimension(130, 29));\n jButtonAddrToDB.setPreferredSize(new java.awt.Dimension(130, 29));\n jButtonAddrToDB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonAddrToDBActionPerformed(evt);\n }\n });\n\n jTextFieldEnd.setForeground(new java.awt.Color(170, 170, 170));\n jTextFieldEnd.setText(\"address street zipcode\");\n jTextFieldEnd.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jTextFieldEndFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextFieldEndFocusLost(evt);\n }\n });\n\n jLabelStart.setText(\"Start Address:\");\n\n jLabelEnd.setText(\"Destination:\");\n\n jTextFieldStart.setForeground(new java.awt.Color(170, 170, 170));\n jTextFieldStart.setText(\"address street zipcode\");\n jTextFieldStart.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jTextFieldStartFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextFieldStartFocusLost(evt);\n }\n });\n\n jLabelShowDB.setText(\"Current Database: \");\n\n javax.swing.GroupLayout jPanelAddrInfoLayout = new javax.swing.GroupLayout(jPanelAddrInfo);\n jPanelAddrInfo.setLayout(jPanelAddrInfoLayout);\n jPanelAddrInfoLayout.setHorizontalGroup(\n jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrInfoLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelShowDB)\n .addGroup(jPanelAddrInfoLayout.createSequentialGroup()\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelEnd)\n .addComponent(jLabelStart))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldEnd, javax.swing.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE)\n .addComponent(jTextFieldStart, javax.swing.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE))))\n .addContainerGap())\n );\n jPanelAddrInfoLayout.setVerticalGroup(\n jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrInfoLayout.createSequentialGroup()\n .addComponent(jLabelShowDB)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabelStart))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelEnd)\n .addComponent(jTextFieldEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n jLabelFormatHead.setText(\"<html>How will you travel?\");\n\n jComboBoxFormat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"I'm driving\", \"I'm walking\" }));\n jComboBoxFormat.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jComboBoxFormatFocusLost(evt);\n }\n });\n\n jCheckBoxQuickSearch.setText(\"Quick 'n Dirty search\");\n jCheckBoxQuickSearch.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jCheckBoxQuickSearchMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelFormatLayout = new javax.swing.GroupLayout(jPanelFormat);\n jPanelFormat.setLayout(jPanelFormatLayout);\n jPanelFormatLayout.setHorizontalGroup(\n jPanelFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelFormatLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelFormatHead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBoxFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCheckBoxQuickSearch))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelFormatLayout.setVerticalGroup(\n jPanelFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelFormatLayout.createSequentialGroup()\n .addComponent(jLabelFormatHead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBoxFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxQuickSearch)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabelHMTitle1.setFont(new java.awt.Font(\"Arial Black\", 3, 24));\n jLabelHMTitle1.setText(\"Husky Maps!\");\n\n jButtonGetDirections.setFont(new java.awt.Font(\"DejaVu Sans\", 0, 17));\n jButtonGetDirections.setText(\"Find Directions!\");\n jButtonGetDirections.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonGetDirectionsActionPerformed(evt);\n }\n });\n\n jCheckBoxHideStreetNames.setText(\"Hide street names\");\n\n javax.swing.GroupLayout jPanelAddrLayout = new javax.swing.GroupLayout(jPanelAddr);\n jPanelAddr.setLayout(jPanelAddrLayout);\n jPanelAddrLayout.setHorizontalGroup(\n jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelHMTitle1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)\n .addComponent(jButtonAddrToDB, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanelAddrInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addComponent(jPanelFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jCheckBoxHideStreetNames))\n .addComponent(jButtonGetDirections, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap())\n );\n jPanelAddrLayout.setVerticalGroup(\n jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelHMTitle1)\n .addComponent(jButtonAddrToDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanelAddrInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanelFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jButtonGetDirections, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxHideStreetNames)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jTextAreaResults.setColumns(20);\n jTextAreaResults.setEditable(false);\n jTextAreaResults.setRows(20);\n jTextAreaResults.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Results\"));\n jScrollPane1.setViewportView(jTextAreaResults);\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(jPanelDB, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)\n .addComponent(jPanelAddr, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanelDB, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanelAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "public final void refresh() {\n // Bug fixing refresh video bug\n // (no image seen, but it is there and gets shown if you move a window\n // over the application pane or just resize the application.\n // Might be an OS video driver issue too.\n this.repaint();\n this.updateUI();\n // - Fix Refresh Bug with resizing\n this.setSize(this.getSize());\n }", "public void update(BufferedImage newImg, structs.ScreenRegion frame) {\r\n\t\tfeed.updateImage(newImg, frame);\r\n\t}", "public void\r UpdatePixmap(CType display_context, ILPix_t pixmap,\r int x_offset, int y_offset, int width, int height);", "public void opdaterfaktura() {\n jPanel_Visfaktura.revalidate();\n }", "public void affiche() {\n\t\tcontroller.image.repaint();\n\t}", "@Override\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\n stage.mapImg.setHeight(Gdx.graphics.getHeight());\n stage.mapImg.setWidth(Gdx.graphics.getWidth());\n stage.gameUI.show();\n }", "@Override\n\tpublic void update() {\n\t\tthis.setBounds(obstacle.getCoords().getX() * 64, obstacle.getCoords().getY() * 64, 64, 64);\n\t}", "private void updateUi() {\n final int numPoints = map.getPolyLinePoints(featureId).size();\n final MapPoint location = map.getGpsLocation();\n\n // Visibility state\n playButton.setVisibility(inputActive ? View.GONE : View.VISIBLE);\n pauseButton.setVisibility(inputActive ? View.VISIBLE : View.GONE);\n recordButton.setVisibility(inputActive && recordingEnabled && !recordingAutomatic ? View.VISIBLE : View.GONE);\n\n // Enabled state\n zoomButton.setEnabled(location != null);\n backspaceButton.setEnabled(numPoints > 0);\n clearButton.setEnabled(!inputActive && numPoints > 0);\n settingsView.findViewById(R.id.manual_mode).setEnabled(location != null);\n settingsView.findViewById(R.id.automatic_mode).setEnabled(location != null);\n\n if (intentReadOnly) {\n playButton.setEnabled(false);\n backspaceButton.setEnabled(false);\n clearButton.setEnabled(false);\n }\n // Settings dialog\n\n // GPS status\n boolean usingThreshold = isAccuracyThresholdActive();\n boolean acceptable = location != null && isLocationAcceptable(location);\n int seconds = INTERVAL_OPTIONS[intervalIndex];\n int minutes = seconds / 60;\n int meters = ACCURACY_THRESHOLD_OPTIONS[accuracyThresholdIndex];\n locationStatus.setText(\n location == null ? getString(org.odk.collect.strings.R.string.location_status_searching)\n : !usingThreshold ? getString(org.odk.collect.strings.R.string.location_status_accuracy, location.accuracy)\n : acceptable ? getString(org.odk.collect.strings.R.string.location_status_acceptable, location.accuracy)\n : getString(org.odk.collect.strings.R.string.location_status_unacceptable, location.accuracy)\n );\n locationStatus.setBackgroundColor(\n location == null ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary)\n : acceptable ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary)\n : getThemeAttributeValue(this, com.google.android.material.R.attr.colorError)\n );\n collectionStatus.setText(\n !inputActive ? getString(org.odk.collect.strings.R.string.collection_status_paused, numPoints)\n : !recordingEnabled ? getString(org.odk.collect.strings.R.string.collection_status_placement, numPoints)\n : !recordingAutomatic ? getString(org.odk.collect.strings.R.string.collection_status_manual, numPoints)\n : !usingThreshold ? (\n minutes > 0 ?\n getString(org.odk.collect.strings.R.string.collection_status_auto_minutes, numPoints, minutes) :\n getString(org.odk.collect.strings.R.string.collection_status_auto_seconds, numPoints, seconds)\n )\n : (\n minutes > 0 ?\n getString(org.odk.collect.strings.R.string.collection_status_auto_minutes_accuracy, numPoints, minutes, meters) :\n getString(org.odk.collect.strings.R.string.collection_status_auto_seconds_accuracy, numPoints, seconds, meters)\n )\n );\n }", "public void refresh() {\n\t\tthis.repaint();\n\t}", "public void update(Observable o, Object arg) {\r\n\t\tBufferedImage background = map.getRm().getEmptyMap();\r\n\t\tthis.setIcon(new ImageIcon(this.getImageMap(background)));\r\n\t\tif (map.isSuccess()) // GameSuccess Like Google Style\r\n\t\t{\r\n\t\t\tthis.setHorizontalTextPosition(JLabel.CENTER);\r\n\t\t\tthis.setText(\"<HTML><B><H1><I><FONT COLOR='BLUE'>S</FONT>\"\r\n\t\t\t\t\t+ \"<FONT COLOR='RED'>U</FONT><FONT COLOR='YELLOW'>CC</FONT>\"\r\n\t\t\t\t\t+ \"<FONT COLOR='BLUE'>E</FONT><FONT COLOR='GREEN'>S</FONT>\"\r\n\t\t\t\t\t+ \"<FONT COLOR='RED'>S</FONT></I></H1></B></HTML>\");\r\n\t\t}\r\n\t}", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n \n Color color;\n ImageIcon image;\n \n switch ( terrain )\n {\n case SAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sand.jpg\")); break;\n case FOREST : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\")); break;\n case WETLAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/forest.jpg\")); break;\n case SCRUB : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\")); break;\n case WATER : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\")); break;\n case BRICK : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick.jpg\")); break;\n default : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/gray.jpg\")); break; \n }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column));\n lblText.setHorizontalTextPosition((int) CENTER_ALIGNMENT);\n lblText.setVerticalTextPosition((int) CENTER_ALIGNMENT);\n \n setVisible(true);\n \n //Kiwifruit\n if( row == 6 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick2.jpg\"));\n }\n \n if( row == 0 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n \n if( row == 7 && column == 0 || row == 7 && column == 7 || row == 6 && column == 6 || row == 8 && column == 3 || row == 9 && column == 3 || row == 9 && column == 4 || row == 9 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassk.jpg\"));\n }\n \n if( row == 2 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n //Trap\n if(\"T\".equals(game.getOccupantStringRepresentation(row, column))){\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/trap.jpg\"));\n lblText.setIcon(image);\n }\n //Food\n //if(game.getOccupantStringRepresentation(row, column) == \"apple\" ) {\n //image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n //}\n if( row == 6 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 5 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassm.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 2 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubs.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 8 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grasso.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n //Predator\n if( row == 2 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 9 && column == 7 ||row == 5 && column == 2 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassp.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 3 && column == 4 || row == 6 && column == 4 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 4 && column == 1) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/waters.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\"));\n }\n }\n //Mystical Creature\n if( row == 7 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brickf.jpg\"));\n }\n \n if( row == 4 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandph.jpg\"));\n }\n \n if( row == 0 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandm.jpg\"));\n }\n \n if( row == 4 && column == 6 || row == 6 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubp.jpg\"));\n }\n \n if( row == 8 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassd.jpg\"));\n }\n \n \n //Hazard\n if( squareExplored && row == 2 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n\n \n if( squareExplored && row == 3 && column == 5 || squareExplored && row == 7 && column == 4 || squareExplored && row == 6 && column == 5 || squareExplored && row == 7 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 1 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 5 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if ( squareVisible && !squareExplored ) \n {\n\n }\n lblText.setIcon(image);\n \n // set border colour according to \n // whether the player is in the grid square or not\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n }\n else\n {\n lblText.setText(\"\");\n lblText.setIcon(null);\n setBorder(normalBorder);\n }\n }", "public void setFondoMapaLibre() {\n URL url = getClass().getResource(\"/Imagenes/ImaxeVUbi.png\");\n\tthis.setOpaque(false);\n\tthis.image = new ImageIcon(url).getImage();\n\trepaint();\n }", "public void redraw() {\n\t\tif(this.getGraphics() != null){\n\t\t\tthis.getGraphics().drawImage(imageBuffer, 0, 0, this); // Swap\n\t\t}\n\t}", "public void updateImage(BufferedImage displayImage) {\n this.imageToDisplay = new ImageIcon(displayImage);\n this.revalidate();\n this.repaint();\n }", "public void updatePicture(int frameNum) {\n\n if (frameNum < billboardFileList.size()) {\n String[] filename = billboardFileList.get(frameNum);\n File inputfile = new File(\"/Users/sha33/NetBeansProjects/vbs2gui/saved/\" + filename[1]);\n if (inputfile.exists()) {\n BufferedImage uncropped = null;\n BufferedImage scaled = null;\n\n try {\n uncropped = ImageIO.read(inputfile);\n } catch (IOException e) {\n }\n AffineTransform at = new AffineTransform();\n at.scale(1.5, 1.5);\n AffineTransformOp scaleOp =\n new AffineTransformOp(at, AffineTransformOp.TYPE_BICUBIC);\n scaled = scaleOp.filter(uncropped, scaled);\n picture.setIcon(new ImageIcon(scaled));\n// txt.setText(\"Showing now: \" + billboardFileList.get(frameNum));\n\n } else {\n picture.setText(\"image #\" + billboardFileList.get(frameNum) + \" does not exist!\");\n }\n }\n }", "public void looser()\n {\n this.mapFrame.looser();\n }", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "public updateFrame() {\n initComponents();\n }", "@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }", "protected void repaint() {\n if (_tile!=null)\n _tile.repaint();\n }", "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(1000, 1000));\n getContentPane().setLayout(null);\n\n jLabel2.setFont(new java.awt.Font(\"Tiger\", 3, 36));\n jLabel2.setForeground(new java.awt.Color(255, 0, 51));\n jLabel2.setText(\"ROAD MAP VIEW\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(80, 10, 460, 60);\n\n jButton3.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 18));\n jButton3.setText(\"HOME\");\n jButton3.setToolTipText(\"move main panel\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3);\n jButton3.setBounds(650, 180, 90, 100);\n\n jButton2.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 18));\n jButton2.setText(\"EXIT\");\n jButton2.setToolTipText(\"end application\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2);\n jButton2.setBounds(650, 350, 90, 90);\n\n jLabel1.setBackground(new java.awt.Color(255, 51, 153));\n jLabel1.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 24));\n jLabel1.setForeground(new java.awt.Color(255, 51, 102));\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/HOSPITAL_MANAGEMENT/F2.JPG\"))); // NOI18N\n jLabel1.setText(\"jLabel1\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 640, 570);\n\n pack();\n }", "public GraphicUI() {\n initComponents();\n jPanelAddr.setVisible(false);\n jButtonDBToAddr.setVisible(false);\n jFrameMap.setVisible(false);\n\n selectedFormat = 0;\n quickSearch = false;\n \ttextFieldDefaults = setFieldDefaults();\n \ttextFieldCurrents = setFieldDefaults();;\n\n }", "public Map(int r, int c){\r\n try {\r\n bomb = new Image(new FileInputStream(\"Minesweeper_Images/bomb.png\"));\r\n zero = new Image(new FileInputStream(\"Minesweeper_Images/zero.png\"));\r\n one = new Image(new FileInputStream(\"Minesweeper_Images/one.png\"));\r\n two = new Image(new FileInputStream(\"Minesweeper_Images/two.png\"));\r\n three = new Image(new FileInputStream(\"Minesweeper_Images/three.png\"));\r\n four = new Image(new FileInputStream(\"Minesweeper_Images/four.png\"));\r\n five = new Image(new FileInputStream(\"Minesweeper_Images/five.png\"));\r\n six = new Image(new FileInputStream(\"Minesweeper_Images/six.png\"));\r\n seven = new Image(new FileInputStream(\"Minesweeper_Images/seven.png\"));\r\n eight = new Image(new FileInputStream(\"Minesweeper_Images/eight.png\"));\r\n flag = new Image(new FileInputStream(\"Minesweeper_Images/flag.png\"));\r\n square = new Image(new FileInputStream(\"Minesweeper_Images/square.png\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n map = new Square[r][c];\r\n for(int row = 0; row<map.length; row++){\r\n for(int col = 0; col<map[0].length; col++){\r\n map[row][col] = new Square();\r\n //map[row][col].setVisual(\" \");\r\n int x = row;\r\n int y = col;\r\n map[row][col].setVisual(square);\r\n map[row][col].getSquareButton().setOnMouseClicked(e->{\r\n if(e.getButton() == MouseButton.PRIMARY){\r\n revealArea(x, y);\r\n }\r\n if(e.getButton() == MouseButton.SECONDARY){\r\n flag(x, y);\r\n if(win() == true){\r\n System.out.println(\"WIN\");\r\n EndBox.end(\"Win\", \"YOU WIN!!!\");\r\n System.exit(0);\r\n }\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n }\r\n }", "public void setMap01(){\n\t\tmapSelect = \"map01.txt\";\n\t\treloadMap(mapSelect);\n\t\tsetImg(mapSelect);\n\t}", "public void updateFromDeserialization() {\n\t\tif (inSerializedState) {\n\t\t\tframes = new KeyFrames();\n\t\t\tfor(Integer key : pixelsMap.keySet()) {\n\t\t\t\tint[][] pixels = pixelsMap.get(key);\n\t\t\t\tDrawFrame image = new DrawFrame(serializedWidth, serializedHeight);\n\t\t\t\tfor(int r = 0; r < serializedHeight; r++) {\n\t\t\t\t\tfor (int c = 0; c < serializedWidth; c++) {\n\t\t\t\t\t\timage.setRGB(c, r, pixels[r][c]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t WritableRaster raster = (WritableRaster) image.getData();\n\t\t raster.setPixels(0,0, serializedWidth, serializedHeight, pixels);\n\t\t image.setData(raster);\n\t\t */\n\t\t\t\tframes.put(key, image);\n\t\t\t}\n\t\t\tinitializeTransientUIComponents();\n\t\t\tinSerializedState = false;\t\n\t\t}\n\t}", "private void updateMap(){\n mMap.clear();\n // this instruction clears the Map object from the other object, it's needed in orther to display\n //the right current geofences without having the previous ones still on screen\n\n mOptions.setOption(mOptions.getOption().center(circle.getCenter()));\n mOptions.setOption(mOptions.getOption().radius(circle.getRadius()));\n\n\n circle=mMap.addCircle(mOptions.getOption());//i need to add again the user circle object on screen\n\n //TODO have to implement settings\n //set markers based on the return objects of the geoquery\n for (int ix = 0; ix < LOCATIONS.length; ix++) {\n mMap.addMarker(new MarkerOptions()\n .title(LOCATIONS[ix].getExplaination())\n .snippet(\"TODO\")\n .position(LOCATIONS[ix].getPosition()));\n }\n }", "public void changeIcon(){\r\n\t\tif (pacman.direction.equals(\"up\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"down\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"left\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"right\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightOpened.png\"));\r\n\t\t}\r\n\t\t\r\n\t\tmouthOpen = !mouthOpen;\r\n\t}", "public void showMap(boolean isEnd) {\n\t\t// Map shown inbetween games. Works by grabbing the system time in milliseconds,\n\t\t// adding 5000, and then counting down 1 second every second. Effectively keeping\n\t\t// the map screen up for 5 seconds.\n//\t\tif(legnum == 4) {\n//\t\t\treplay = new JButton(\"Replay\");\n//\t\t\treplay.setSize(frameWidth*5/100, frameHeight*5/100);\n//\t\t\tif(isOsprey) {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*30/100, frameHeight/2);\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*15/100, frameWidth/2);\n//\t\t\t}\n//\t\t\tframe.add(replay);\n//\t\t}\n\t\tlong tEnd = System.currentTimeMillis();\n\t\tframe.setVisible(true);\n\t\tlong tStart = tEnd + 3*1000;\n\t\twhile(tStart > tEnd) {\n\t\t\ttStart -= 1000;\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\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void showMaps() throws Exception{\r\n MapMaintenanceBaseWindow mapMaintenanceBaseWindow = null;\r\n String unitNumber=mdiForm.getUnitNumber();\r\n \r\n if( ( mapMaintenanceBaseWindow = (MapMaintenanceBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.MAPS_BASE_FRAME_TITLE+\" \"+unitNumber))!= null ){\r\n if( mapMaintenanceBaseWindow.isIcon() ){\r\n mapMaintenanceBaseWindow.setIcon(false);\r\n }\r\n mapMaintenanceBaseWindow.setSelected( true );\r\n return;\r\n }\r\n \r\n MapMaintenanceBaseWindowController mapMaintenanceBaseWindowController = new MapMaintenanceBaseWindowController(unitNumber,false);\r\n mapMaintenanceBaseWindowController.display();\r\n \r\n }", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}" ]
[ "0.6459642", "0.640347", "0.63828844", "0.63232315", "0.6304222", "0.62995094", "0.6220757", "0.6199114", "0.6049946", "0.6022898", "0.6018035", "0.59832716", "0.59716284", "0.59580016", "0.59338", "0.5932867", "0.59284544", "0.59255683", "0.5916071", "0.59081674", "0.587798", "0.58335656", "0.58165175", "0.5809352", "0.57711285", "0.5770669", "0.5751308", "0.574999", "0.57382166", "0.5731369", "0.57300234", "0.57172054", "0.5716578", "0.5706942", "0.57013357", "0.570095", "0.56834984", "0.5681341", "0.56747866", "0.5674514", "0.5664317", "0.5662395", "0.5658207", "0.5653881", "0.5653881", "0.5653881", "0.5653011", "0.5643682", "0.5629017", "0.5627645", "0.56124157", "0.56105334", "0.5596133", "0.5595137", "0.5590184", "0.55900943", "0.5573322", "0.5563774", "0.5557744", "0.5553958", "0.5552546", "0.5550893", "0.5550558", "0.554891", "0.55399853", "0.55255616", "0.55255616", "0.55221134", "0.5513883", "0.5512104", "0.55061364", "0.5492698", "0.54842466", "0.5479961", "0.5472773", "0.5467741", "0.54671884", "0.5462056", "0.5456787", "0.54558957", "0.54537797", "0.5453651", "0.5453147", "0.5449663", "0.54434735", "0.54403764", "0.5433331", "0.54223156", "0.5410118", "0.5407511", "0.54068625", "0.54018587", "0.5396876", "0.53948367", "0.5391967", "0.53915715", "0.53851676", "0.53773355", "0.53650725", "0.5361882" ]
0.63629574
3
Draws a road with received parameters.
private void drawRoad(double xM, double yM, double xL, double yL, double xI, double yI, double xP, double yP, double lat1, double lon1, double lat2, double lon2, int highlight, Graphics2D g2d) { lat1 = 1-Math.abs(lat1-mapBounds[0])/yL; lon1 = Math.abs(lon1-mapBounds[1])/xL; lat2 = 1-Math.abs(lat2-mapBounds[0])/yL; lon2 = Math.abs(lon2-mapBounds[1])/xL; int x1 = (int) (lon1*(xM-xI*2) + xI-xP); int y1 = (int) (lat1*(yM-yI*2) + yI-yP); int x2 = (int) (lon2*(xM-xI*2) + xI-xP); int y2 = (int) (lat2*(yM-yI*2) + yI-yP); if(highlight == 1) { g2d.setColor(pathColor); g2d.setStroke(new BasicStroke(pathWidth)); } else { g2d.setColor(roadColor); g2d.setStroke(new BasicStroke(roadWidth)); } g2d.drawLine(x1, y1, x2, y2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawRoad(int player, int location, Graphics g){\n\t}", "public void drawRoute(Set<Waypoint> waypoints, List<GeoPosition> track) {\r\n\t\tRoutePainter routePainter = new RoutePainter(track);\r\n\t\t\r\n WaypointPainter<Waypoint> waypointPainter = new WaypointPainter<Waypoint>();\r\n waypointPainter.setWaypoints(waypoints);\r\n \r\n List<Painter<JXMapViewer>> painters = new ArrayList<Painter<JXMapViewer>>();\r\n painters.add(routePainter);\r\n painters.add(waypointPainter);\r\n\r\n CompoundPainter<JXMapViewer> painter = new CompoundPainter<JXMapViewer>(painters);\r\n mapViewer.setOverlayPainter(painter);\r\n\t}", "private void routeDrawing(Location location) {\n\n // validity check in case the first point does not have a previous point\n if (previousLocation == null) {\n // copy the current location to the previous point\n previousLocation = location;\n }\n double lat = location.getLatitude();\n double lon = location.getLongitude();\n\n latitude = lat;\n longitude = lon;\n latList.add(latitude);\n lonList.add(longitude);\n\n // previous coordinates\n //System.out.println(\"previous Location: \" + previousLocation.getLatitude() + \" \" + previousLocation.getLongitude());\n // current coordinates\n //System.out.println(\"Current Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n\n // Polyline Options differ from\n PolylineOptions lineOptions = new PolylineOptions();\n // set the option of each part of polyline\n // 0.03 is the location update interval also the drawing interval\n vdraw = (GetDistance(previousLocation.getLatitude(), previousLocation.getLongitude(), location.getLatitude(), location.getLongitude()))/0.3;\n System.out.println(\"vdraw: \"+vdraw);\n if (vdraw<0.01){\n\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.slow))\n .width(30);\n System.out.print(\"I am running slow\");\n }\n if (vdraw>=0.008 && vdraw<=0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.commen))\n .width(30);\n System.out.print(\"I am running normally\");\n }\n if (vdraw>0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.fast))\n .width(30);\n System.out.print(\"I am running fast\");\n }\n\n // add the polyline to the map\n Polyline partOfRunningRoute = mMap.addPolyline(lineOptions);\n // set the zindex so that the poly line stays on top of my tile overlays\n partOfRunningRoute.setZIndex(1000);\n // add the poly line to the array so they can all be removed if necessary\n runningRoute.add(partOfRunningRoute);\n // add the latlng from this point to the array\n points.add(location);\n // store current location as previous location in the end\n previousLocation = location;\n }", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "private void DrawRoute(final DirectionsResult result){\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n if(RouteArrayList.size() > 0 ){\n\n //this for loop removes all the other routes\n //so when a new route is created, all previous routes will be removed\n for(Route route : RouteArrayList){\n route.getPolyline().remove();\n }\n RouteArrayList.clear();\n RouteArrayList = new ArrayList<>();\n }\n\n\n\n for(DirectionsRoute route: result.routes){\n //get the encoded path ( get all the points along each rote)in order to build the polyline\n\n List<com.google.maps.model.LatLng> decodedPath = PolylineEncoding.decode(route.overviewPolyline.getEncodedPath());\n\n List<LatLng> newPath = new ArrayList<>();\n\n for(com.google.maps.model.LatLng latLng: decodedPath){\n newPath.add(new LatLng(latLng.lat,latLng.lng));\n }\n\n Polyline polyline = mMap.addPolyline(new PolylineOptions().addAll(newPath).color(Color.GRAY).width(10));\n\n //make it clickable show that the info about distance/duration will show\n polyline.setClickable(true);\n\n RouteArrayList.add(new Route(polyline, route.legs[0]));\n //keep track of routes.legs[0] too.., diction - key being the polyline id?\n }\n }\n });\n }", "@Override\r\n\tpublic void buildRoad() {\n\t\t\r\n\t}", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void drawDronePath(ArrayList<LatLng> arr){\n dronePath.drawRout(arr,googleMap,Color.GREEN);\n }", "public void draw(Object... params) {\n Camera cam = (Camera) params[1];\n \n Vector u = cam.getTransform().transformVector(transform.transformVector(A));\n Vector v = cam.getTransform().transformVector(transform.transformVector(B));\n \n if(u.Y <= 0 && v.Y <= 0)\n return;\n else if(v.Y <= 0) {\n double error = -v.Y + 0.0625;\n Vector diff = u.sub(v);\n diff = diff.mul(error / diff.Y);\n v = u.add(diff);\n } else if(u.Y <= 0) {\n double error = -u.Y + 0.0625;\n Vector diff = v.sub(u);\n diff = diff.mul(error / diff.Y);\n v = v.add(diff);\n }\n\n Point2D a = cam.simpleProject(u);\n Point2D b = cam.simpleProject(v);\n \n if(a.X < 0 || a.X >= 2*cam.getCenterPoint().X\n || a.Y < 0 || a.Y >= 2*cam.getCenterPoint().Y\n || b.X < 0 || b.X >= 2*cam.getCenterPoint().X\n || b.Y < 0 || b.Y >= 2*cam.getCenterPoint().Y)\n return;\n \n //Draw line from a to b on the screen.\n Graphics2D g2 = (Graphics2D) params[0];\n g2.drawLine((int) a.X, (int) a.Y, (int) b.X, (int) b.Y);\n }", "private void drawFlights(){\n if(counter%180 == 0){ //To not execute the SQL request every frame.\n internCounter = 0;\n origins.clear();\n destinations.clear();\n internCounter = 0 ;\n ArrayList<String> answer = GameScreen.database.readDatas(\"SELECT Origin, Destination FROM Flights\");\n for(String s : answer){\n internCounter++;\n String[] parts = s.split(\" \");\n String xyOrigin, xyDestination;\n try{\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[0]+\"' ;\").get(0);\n } catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[0]+\"' ;\");\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n origins.add(new Vector2(Float.parseFloat(xyOrigin.split(\" \")[0]), Float.parseFloat(xyOrigin.split(\" \")[1])));\n\n try{\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[1]+\"' ;\").get(0);\n }catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[1]+\"' ;\");\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n destinations.add(new Vector2(Float.parseFloat(xyDestination.split(\" \")[0]), Float.parseFloat(xyDestination.split(\" \")[1])));\n }\n }\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.WHITE);\n renderer.circle(600, 380, 4);\n for(int i = 0; i<internCounter; i++){\n renderer.line(origins.get(i), destinations.get(i));\n renderer.setColor(Color.RED);\n renderer.circle(origins.get(i).x, origins.get(i).y, 3);\n renderer.setColor(Color.GREEN);\n renderer.circle(destinations.get(i).x, destinations.get(i).y, 3);\n }\n renderer.end();\n }", "public void drawOnMap (char[][] roadMap) {\n int deltaX = 0;\n int deltaY = 0;\n int startX = 0;\n int startY = 0;\n /*\n * If there's no turn, pick an end and calculate the delta. To\n * avoid overwriting the intersections, reduce the delta by 1 and,\n * at the equality end (the initial i value in the loop) shift the\n * start by one for the same reason.\n */\n if (xTurn == -1) {\n startX = xOne;\n startY = yOne;\n deltaX = xTwo - xOne;\n deltaY = yTwo - yOne;\n if (deltaY == 0) {\n if (deltaX < 0) {\n deltaX += 1;\n } else {\n startX++;\n deltaX -= 1;\n }\n } else {\n if (deltaY < 0) {\n deltaY += 1;\n } else {\n startY++;\n deltaY -= 1;\n }\n }\n }\n /*\n * There's a turn. Our starting point will be the turn\n * coordinates. Calculate deltaX and deltaY. Here, we want to\n * overwrite the turn (offset of zero in the loops) and reduce\n * delta to avoid overwriting the intersections at each end.\n */\n else {\n startX = xTurn;\n startY = yTurn;\n if (startX == xOne) {\n deltaX = xTwo - startX;\n deltaY = yOne - startY;\n } else {\n deltaX = xOne - startX;\n deltaY = yTwo - startY;\n }\n if (deltaX < 0) {\n deltaX++;\n }\n if (deltaY < 0) {\n deltaY++;\n }\n }\n /*\n * Now we can run two loops to fill in the necessary chars.\n */\n if (deltaX != 0) {\n for (int i = Math.min(deltaX,0) ; i < Math.max(deltaX,0) ; i++) {\n roadMap[startY][startX + i] = '*';\n }\n }\n if (deltaY != 0) {\n for (int i = Math.min(deltaY,0) ; i < Math.max(deltaY,0) ; i++) {\n roadMap[startY + i][startX] = '*';\n }\n }\n /*\n * Blind spot: in the case where both deltaX and deltaY are\n * counting back toward the turn, an offset of zero, and not quite\n * getting there.\n */\n if (deltaX < 0 && deltaY < 0) roadMap[startY][startX] = '*';\n }", "public void makeRoads()\r\n\t{\r\n\t\tfor(int i=0; i<roads.length; i++)\r\n\t\t\troads[i] = new Road(i*SCREEN_HEIGHT/20,SCREEN_WIDTH,SCREEN_HEIGHT/20-10);\r\n\t}", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void draw(Frame frame) {\n\t\t// Draw vehicle corner points.\n\t\tif (this.points != null) {\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (this.points[i] == null) continue;\n\t\t\t\tImgproc.circle(frame.getSource(), this.points[i], 3, new Scalar(0, 0, 255));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Draw the vehicles back point.\n\t\tif (this.back != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.back, 3, new Scalar(0, 0, 255));\n\t\t}\n\t\t\n\t\t// Draw the vehicles front point.\n\t\tif (this.front != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.front, 6, new Scalar(0, 0, 255));\n\t\t}\n\t\t\n\t\t// Draw the vehicles center point.\n\t\tif (this.center != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.center, 3, new Scalar(255, 0, 0), Imgproc.FILLED);\n\t\t}\n\t}", "private void drawRoutes () {\n // Lay ngay cua tour\n Date tourDate = OnlineManager.getInstance().mTourList.get(tourOrder).getmDate();\n // Kiem tra xem ngay dien ra tour la truoc hay sau hom nay. 0: hom nay, 1: sau, -1: truoc\n int dateEqual = Tour.afterToday(tourDate);\n // Kiem tra xem tour da dien ra chua\n if (dateEqual == -1) {\n // Tour da dien ra, khong ve gi ca\n } else if (dateEqual == 1) {\n // Tour chua dien ra, khong ve gi ca\n } else {\n // Tour dang dien ra thi kiem tra gio\n /* Chang sap toi mau do, today nam trong khoang src start va src end\n Chang dang di chuyen mau xanh, today nam trong khoang src end va dst start\n Chang vua di qua mau xam, today nam trong khoang dst start va dst end */\n ArrayList<TourTimesheet> timesheets = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet();\n // Danh dau chang dang di qua\n int changDangDiQuaOrder = -1;\n // Danh dau chang sap di qua\n int changSapDiQuaOrder = -1;\n if(Tour.afterCurrentHour(timesheets.get(0).getmStartTime()) == 1){\n // Chang sap di qua mau do\n // Neu chua ve chang sap di, ve duong mau do\n if (timesheets.size() >= 2) {\n drawRoute(Color.RED, timesheets.get(0).getmBuildingLocation(), timesheets.get(1).getmBuildingLocation());\n }\n } else {\n for (int i = 0; i < timesheets.size() - 1; i++) {\n // Kiem tra xem chang hien tai la truoc hay sau gio nay. 0: gio nay, 1: gio sau, -1: gio truoc\n int srcStartEqual = Tour.afterCurrentHour(timesheets.get(i).getmStartTime());\n int srcEndEqual = Tour.afterCurrentHour(timesheets.get(i).getmEndTime());\n int dstStartEqual = Tour.afterCurrentHour(timesheets.get(i + 1).getmStartTime());\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(i).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(i + 1).getmBuildingLocation();\n if (srcStartEqual == -1 && srcEndEqual == 1) {\n // Chang dang di qua mau xanh\n // Neu chua ve chang dang di, ve duong mau xanh\n drawRoute(Color.BLUE, srcLocation, dstLocation);\n // Danh dau chang dang di qua\n changDangDiQuaOrder = i;\n // Thoat khoi vong lap\n break;\n } else if (srcEndEqual == -1 && dstStartEqual == 1) {\n // Chang sap toi mau do\n // Neu chua ve chang sap toi, ve duong mau do\n drawRoute(Color.RED, srcLocation, dstLocation);\n // Danh dau chang sap di qua\n changSapDiQuaOrder = i;\n // Thoat khoi vong lap\n break;\n }\n }\n }\n // Kiem tra xem da ve duoc nhung duong nao roi\n if (changDangDiQuaOrder != - 1) {\n // Neu ve duoc chang dang di qua roi thi ve tiep 2 chang con lai\n if (changDangDiQuaOrder < timesheets.size() - 2) {\n // Neu khong phai chang ket thuc thi ve tiep chang sap di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changDangDiQuaOrder + 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changDangDiQuaOrder + 2).getmBuildingLocation();\n drawRoute(Color.RED, srcLocation, dstLocation);\n }\n if (changDangDiQuaOrder > 0) {\n // Neu khong phai chang bat dau thi ve tiep chang da di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changDangDiQuaOrder - 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changDangDiQuaOrder).getmBuildingLocation();\n drawRoute(Color.GRAY, srcLocation, dstLocation);\n }\n }\n if (changSapDiQuaOrder != - 1) {\n // Neu ve duoc chang sap di qua roi thi ve tiep 2 chang con lai\n if (changSapDiQuaOrder > 0) {\n // Neu khong phai chang bat dau thi ve tiep chang dang di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changSapDiQuaOrder - 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changSapDiQuaOrder).getmBuildingLocation();\n drawRoute(Color.BLUE, srcLocation, dstLocation);\n }\n if (changSapDiQuaOrder > 1) {\n // Neu khong phai chang bat dau thi ve tiep chang da di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changSapDiQuaOrder - 2).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changSapDiQuaOrder - 1).getmBuildingLocation();\n drawRoute(Color.GRAY, srcLocation, dstLocation);\n }\n }\n }\n }", "private void drawRoute(LatLng prevCoords, LatLng curCoords) {\n\n if(!isRequiredMetersComplete()){\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.colorPrimary)));\n }\n else{\n if(isOverPace){\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.goodGreen)));\n }else{\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.badRed)));\n }\n }\n }", "public Road(int x, int y, int width, int height)\n {\n screenWidth = width;\n screenHeight = height;\n xTopLeft = x;\n yTopLeft = y;\n }", "public void drawPath(LinkedList<GPS> gpsList)\n\t{\n\n\t\tPolylineOptions lineOptions = new PolylineOptions();\n\t\tfor(int i = 0; i < gpsList.size(); i++)\n\t\t{\n\t\t\tGPS currentLocation = gpsList.get(i);\n\t\t\tLatLng thisLocation = new LatLng(currentLocation.latitude, currentLocation.longitude);\n\t\t\tlineOptions.add(thisLocation);\t\n\t\t}\n \t\n \tmap.addPolyline(lineOptions);\n \t}", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "void buildRoad(EdgeLocation edge, boolean free);", "private void generateMap(){\n if(currDirections != null){\n\n\t \tPoint edge = new Point(mapPanel.getWidth(), mapPanel.getHeight());\n \tmapPanel.paintImmediately(0, 0, edge.x, edge.y);\n\t \t\n\t \t\n\t \t// setup advanced graphics object\n\t Graphics2D g = (Graphics2D)mapPanel.getGraphics();\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);\n\n\t \n\t Route rt = currDirections.getRoute();\n\t\n\t boolean singleStreet = rt.getGeoSegments().size() == 1;\n\t Route contextRoute = (!singleStreet ? rt : \n\t \t\tnew Route( virtualGPS.findFullSegment(rt.getEndingGeoSegment()) ) );\n\t \n\t // calculate the longitude and latitude bounds\n\t int[] bounds = calculateCoverage( contextRoute , edge);\n\t \n\t Collection<StreetSegment> map = virtualGPS.getContext(bounds, contextRoute);\n\t \n\t \n\t // draw every segment of the map\n\t g.setColor(Color.GRAY);\n\t for(GeoSegment gs : map){\n\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t \n\t // draw the path over the produced map in BLUE\n\t g.setColor(Color.BLUE);\n\t for(GeoFeature gf : rt.getGeoFeatures()){\n\t for(GeoSegment gs : gf.getGeoSegments()){\n\t\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t Point start = derivePoint(bounds, edge, gf.getStart());\n\t Point end = derivePoint(bounds, edge, gf.getEnd());\n\t \n\t int dX = (int)(Math.abs(start.x - end.x) / 2.0);\n\t int dY = (int)(Math.abs(start.y - end.y) / 2.0);\n\n if(!jCheckBoxHideStreetNames.isSelected()){\n \tg.setFont(new Font(g.getFont().getFontName(), Font.BOLD, g.getFont().getSize()));\n \tg.drawString(gf.getName(), start.x + (start.x<end.x ? dX : -dX),\n \t\t\tstart.y + (start.y<end.y ? dY : -dY));\n }\n\t }\n }\n }", "public void drawPath(String result) {\n\n\t\ttry {\n\t\t\t// Tranform the string into a json object\n\t\t\tfinal JSONObject json = new JSONObject(result);\n\t\t\tJSONArray routeArray = json.getJSONArray(\"routes\");\n\t\t\tJSONObject routes = routeArray.getJSONObject(0);\n\t\t\tJSONObject overviewPolylines = routes\n\t\t\t\t\t.getJSONObject(\"overview_polyline\");\n\t\t\tString encodedString = overviewPolylines.getString(\"points\");\n\t\t\tList<LatLng> list = decodePoly(encodedString);\n\n\t\t\tfor (int z = 0; z < list.size() - 1; z++) {\n\t\t\t\tLatLng src = list.get(z);\n\t\t\t\tLatLng dest = list.get(z + 1);\n\t\t\t\tPolyline line = gMap.addPolyline(new PolylineOptions()\n\t\t\t\t\t\t.add(new LatLng(src.latitude, src.longitude),\n\t\t\t\t\t\t\t\tnew LatLng(dest.latitude, dest.longitude))\n\t\t\t\t\t\t.width(2).color(Color.BLUE).width(3));\n\t\t\t}\n\n\t\t} catch (JSONException e) {\n\n\t\t}\n\t}", "@Override\n public void buildWorldObject() {\n setPoint(new Point3d());\n\n List<Point2d> pointList = new ArrayList<Point2d>();\n\n for (int i = 0; i < way.getNodesCount(); i++) {\n Node node = way.getNode(i);\n pointList.add(perspective.calcPoint(node));\n }\n\n list = pointList;\n\n roadWidth = (float) DEFAULT_ROAD_WIDTH;\n\n roadWidth = getRoadWidth();\n\n TextureData texture = getTexture();\n\n Material m = MaterialFactory.createTextureMaterial(texture.getFile());\n\n ModelFactory modelBuilder = ModelFactory.modelBuilder();\n\n int mi = modelBuilder.addMaterial(m);\n\n MeshFactory meshWalls = modelBuilder.addMesh(\"road\");\n\n meshWalls.materialID = mi;\n meshWalls.hasTexture = true;\n\n if (list.size() > 1) {\n\n FaceFactory leftBorder = meshWalls.addFace(FaceType.QUAD_STRIP);\n FaceFactory leftPart = meshWalls.addFace(FaceType.QUAD_STRIP);\n FaceFactory rightBorder = meshWalls.addFace(FaceType.QUAD_STRIP);\n FaceFactory rightPart = meshWalls.addFace(FaceType.QUAD_STRIP);\n\n Vector3d flatSurface = new Vector3d(0, 1, 0);\n\n int flatNormalI = meshWalls.addNormal(flatSurface);\n\n Point2d beginPoint = list.get(0);\n for (int i = 1; i < list.size(); i++) {\n Point2d endPoint = list.get(i);\n\n double x = endPoint.x - beginPoint.x;\n double y = endPoint.y - beginPoint.y;\n // calc lenght of road segment\n double mod = Math.sqrt(x * x + y * y);\n\n double distance = beginPoint.distance(endPoint);\n\n // calc orthogonal for road segment\n double orthX = x * cos90 + y * sin90;\n double orthY = -x * sin90 + y * cos90;\n\n // calc vector for road width;\n double normX = roadWidth / 2 * orthX / mod;\n double normY = roadWidth / 2 * orthY / mod;\n // calc vector for border width;\n double borderX = normX + 0.2 * orthX / mod;\n double borderY = normY + 0.2 * orthY / mod;\n\n double uEnd = distance / texture.getLenght();\n\n // left border\n int tcb1 = meshWalls.addTextCoord(new TextCoord(0, 0.99999d));\n // left part of road\n int tcb2 = meshWalls.addTextCoord(new TextCoord(0, 1 - 0.10d));\n // Middle part of road\n int tcb3 = meshWalls.addTextCoord(new TextCoord(0, 0.00001d));\n // right part of road\n int tcb4 = meshWalls.addTextCoord(new TextCoord(0, 1 - 0.10d));\n // right border\n int tcb5 = meshWalls.addTextCoord(new TextCoord(0, 0.99999d));\n\n // left border\n int tce1 = meshWalls.addTextCoord(new TextCoord(uEnd, 0.99999d));\n // left part of road\n int tce2 = meshWalls.addTextCoord(new TextCoord(uEnd, 1 - 0.10d));\n // Middle part of road\n int tce3 = meshWalls.addTextCoord(new TextCoord(uEnd, 0.00001d));\n // right part of road\n int tce4 = meshWalls.addTextCoord(new TextCoord(uEnd, 1 - 0.10d));\n // right border\n int tce5 = meshWalls.addTextCoord(new TextCoord(uEnd, 0.99999d));\n\n // left border\n int wbi1 = meshWalls.addVertex(new Point3d(beginPoint.x + borderX, 0.0d, -(beginPoint.y + borderY)));\n // left part of road\n int wbi2 = meshWalls.addVertex(new Point3d(beginPoint.x + normX, 0.1d, -(beginPoint.y + normY)));\n // middle part of road\n int wbi3 = meshWalls.addVertex(new Point3d(beginPoint.x, 0.15d, -beginPoint.y));\n // right part of road\n int wbi4 = meshWalls.addVertex(new Point3d(beginPoint.x - normX, 0.1d, -(beginPoint.y - normY)));\n // right border\n int wbi5 = meshWalls.addVertex(new Point3d(beginPoint.x - borderX, 0.0d, -(beginPoint.y - borderY)));\n\n // left border\n int wei1 = meshWalls.addVertex(new Point3d(endPoint.x + borderX, 0.0d, -(endPoint.y + borderY)));\n // left part of road\n int wei2 = meshWalls.addVertex(new Point3d(endPoint.x + normX, 0.1d, -(endPoint.y + normY)));\n // middle part of road\n int wei3 = meshWalls.addVertex(new Point3d(endPoint.x, 0.15d, -endPoint.y));\n // right part of road\n int wei4 = meshWalls.addVertex(new Point3d(endPoint.x - normX, 0.1d, -(endPoint.y - normY)));\n // right border\n int wei5 = meshWalls.addVertex(new Point3d(endPoint.x - borderX, 0.0d, -(endPoint.y - borderY)));\n\n leftBorder.addVert(wbi1, tcb1, flatNormalI);\n leftBorder.addVert(wbi2, tcb2, flatNormalI);\n leftBorder.addVert(wei1, tce1, flatNormalI);\n leftBorder.addVert(wei2, tce2, flatNormalI);\n\n leftPart.addVert(wbi2, tcb2, flatNormalI);\n leftPart.addVert(wbi3, tcb3, flatNormalI);\n leftPart.addVert(wei2, tce2, flatNormalI);\n leftPart.addVert(wei3, tce3, flatNormalI);\n\n rightBorder.addVert(wbi3, tcb3, flatNormalI);\n rightBorder.addVert(wbi4, tcb4, flatNormalI);\n rightBorder.addVert(wei3, tce3, flatNormalI);\n rightBorder.addVert(wei4, tce4, flatNormalI);\n\n rightPart.addVert(wbi4, tcb4, flatNormalI);\n rightPart.addVert(wbi5, tcb5, flatNormalI);\n rightPart.addVert(wei4, tce4, flatNormalI);\n rightPart.addVert(wei5, tce5, flatNormalI);\n\n beginPoint = endPoint;\n }\n }\n\n model = modelBuilder.toModel();\n model.setUseLight(true);\n model.setUseTexture(true);\n\n buildModel = true;\n }", "public void paintRoute(Graphics g, String[] ruteData, int begin, int end, int color) {\n //System.out.println(\"painting rute\");\n end += RUTE_FLOOR + 1;\n begin += RUTE_FLOOR + 1;\n if (begin > end || end > ruteData.length || begin < 0 || g == null || ruteData == null) {\n return;\n }\n g.setColor(color);\n //paint the rute\n int x = 0, y = 0, lastx = 0, lasty = 0, i = begin;\n int floor = Integer.parseInt(ruteData[RUTE_FLOOR]);\n for (; i < end; i++) {\n //System.out.println(ruteData[i]);\n point = getPoint(ruteData[i]);\n x = point[0] + currMatrixX + transformCoordenate(floor, X_COORD);\n y = point[1] + currMatrixY + transformCoordenate(floor, Y_COORD);\n //dot\n g.fillRoundRect(x - 5, y - 5, 10, 10, 5, 5);\n //line\n if (!(lastx == 0 && lasty == 0)) {\n g.drawLine(x - 1, y - 1, lastx - 1, lasty - 1);\n g.drawLine(x, y - 1, lastx, lasty - 1);\n g.drawLine(x - 1, y, lastx - 1, lasty);\n g.drawLine(x, y, lastx, lasty);\n g.drawLine(x, y + 1, lastx, lasty + 1);\n g.drawLine(x + 1, y, lastx + 1, lasty);\n g.drawLine(x + 1, y + 1, lastx + 1, lasty + 1);\n }\n lastx = x;\n lasty = y;\n //System.out.println(\"point \" + (i-begin) + \": \" + x + \",\" + y + \" floor \" + floor);\n }\n }", "public void draw()\n {\n drawLine(x1, y1, x2, y2);\n }", "void addRoadAround(Map<RoadType, Tile> rts, Rectangle rect, Collection<Location> corners) {\r\n\t\tLocation la = Location.of(rect.x, rect.y);\r\n\t\tLocation lb = Location.of(rect.x + rect.width - 1, rect.y);\r\n\t\tLocation lc = Location.of(rect.x, rect.y - rect.height + 1);\r\n\t\tLocation ld = Location.of(rect.x + rect.width - 1, rect.y - rect.height + 1);\r\n\t\t\r\n\t\tcorners.add(la);\r\n\t\tcorners.add(lb);\r\n\t\tcorners.add(lc);\r\n\t\tcorners.add(ld);\r\n\t\t\r\n\t\trenderer.surface.buildingmap.put(la, createRoadEntity(rts.get(RoadType.RIGHT_TO_BOTTOM)));\r\n\t\trenderer.surface.buildingmap.put(lb, createRoadEntity(rts.get(RoadType.LEFT_TO_BOTTOM)));\r\n\t\trenderer.surface.buildingmap.put(lc, createRoadEntity(rts.get(RoadType.TOP_TO_RIGHT)));\r\n\t\trenderer.surface.buildingmap.put(ld, createRoadEntity(rts.get(RoadType.TOP_TO_LEFT)));\r\n\t\t// add linear segments\r\n\t\t\r\n\t\tTile ht = rts.get(RoadType.HORIZONTAL);\r\n\t\tfor (int i = rect.x + 1; i < rect.x + rect.width - 1; i++) {\r\n\t\t\trenderer.surface.buildingmap.put(Location.of(i, rect.y), createRoadEntity(ht));\r\n\t\t\trenderer.surface.buildingmap.put(Location.of(i, rect.y - rect.height + 1), createRoadEntity(ht));\r\n\t\t}\r\n\t\tTile vt = rts.get(RoadType.VERTICAL);\r\n\t\tfor (int i = rect.y - 1; i > rect.y - rect.height + 1; i--) {\r\n\t\t\trenderer.surface.buildingmap.put(Location.of(rect.x, i), createRoadEntity(vt));\r\n\t\t\trenderer.surface.buildingmap.put(Location.of(rect.x + rect.width - 1, i), createRoadEntity(vt));\r\n\t\t}\r\n\t}", "private void drawWaypoints() {\r\n\t\tint x1 = (width - SIZE_X) / 2;\r\n\t\tint y1 = (height - SIZE_Y) / 2;\r\n\r\n\t\tfloat scissorFactor = (float) _resolutionResolver.getScaleFactor() / 2.0f;\r\n\r\n\t\tint glLeft = (int) ((x1 + 10) * 2.0f * scissorFactor);\r\n\t\tint glWidth = (int) ((SIZE_X - (10 + 25)) * 2.0f * scissorFactor);\r\n\t\tint gluBottom = (int) ((this.height - y1 - SIZE_Y) * 2.0f * scissorFactor);\r\n\t\tint glHeight = (int) ((SIZE_Y) * 2.0f * scissorFactor);\r\n\r\n\t\tGL11.glEnable(GL11.GL_SCISSOR_TEST);\r\n\t\tGL11.glScissor(glLeft, gluBottom, glWidth, glHeight);\r\n\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glScalef(_textScale, _textScale, _textScale);\r\n\r\n\t\t_startCell = getStartCell();\r\n\t\t_cellStartX = (int) (((float) x1 + (float) 13) / _textScale);\r\n\t\t_cellStartY = (int) (((float) y1 + (float) 22) / _textScale);\r\n\r\n\t\tint x2 = _cellStartX;\r\n\t\tint y2 = _cellStartY + (int) ((float) 0 * (float) CELL_SIZE_Y / _textScale);\r\n\r\n\t\tImmutableList<UltraTeleportWaypoint> list = UltraTeleportWaypoint.getWaypoints();\r\n\t\tfor (int i = 0; i < 2; ++i) {\r\n \t\tfor (int j = 0; j < list.size() && j < MAX_CELL_COUNT; ++j) {\r\n\r\n \t\t\tint x = _cellStartX;\r\n \t\t\tint y = _cellStartY + (int) ((float) j * (float) CELL_SIZE_Y / _textScale);\r\n\r\n \t\t\tdouble posX = list.get(j + _startCell).getPos().getX();\r\n \t\t\tdouble posY = list.get(j + _startCell).getPos().getY();\r\n \t\t\tdouble posZ = list.get(j + _startCell).getPos().getZ();\r\n\r\n \t\t\tString strX = String.format(\"x: %4.1f\", posX);\r\n \t\t\tString strY = String.format(\"y: %4.1f\", posY);\r\n \t\t\tString strZ = String.format(\"z: %4.1f\", posZ);\r\n \t\t\tString text = strX + \" \" + strY + \" \" + strZ;\r\n\r\n \t\t\tif (i == 0) {\r\n \t\t\t this.fontRendererObj.drawStringWithShadow(text, x + 18, y, list.get(j).getColor());\r\n\r\n \t\t\t boolean selected = j + _startCell < _selectedList.size() ? _selectedList.get(j + _startCell) : false;\r\n\r\n \t\t\t GL11.glPushMatrix();\r\n GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);\r\n \t\t\t this.mc.renderEngine.bindTexture(selected ? BUTTON_ON_RESOURCE : BUTTON_OFF_RESOURCE);\r\n \t\t\t HubbyUtils.drawTexturedRectHelper(0, x + CELL_SIZE_X + 18, y - 3, 16, 16, 0, 0, 256, 256);\r\n \t\t\t GL11.glPopMatrix();\r\n \t\t\t}\r\n \t\t\telse if (i == 1) {\r\n \t\t\t\tBlockPos pos = new BlockPos((int)posX, (int)posY - 1, (int)posZ);\r\n \t\t\t Block block = Minecraft.getMinecraft().theWorld.getBlockState(pos).getBlock();\r\n \t\t\tif (block != null) {\r\n \t\t\t Item itemToRender = Item.getItemFromBlock(block);\r\n \t\t\t itemToRender = itemToRender != null ? itemToRender : Item.getItemFromBlock((Block)Block.blockRegistry.getObjectById(3));\r\n \t\t\t ItemStack is = new ItemStack(itemToRender, 1, 0);\r\n \t\t\t _itemRender.renderItemAndEffectIntoGUI(is, x - 1, y - 3);\r\n \t _itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, is, x - 1, y - 3, \"\"); // TODO: is the last param correct?\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t}\r\n\r\n\t\tGL11.glPopMatrix();\r\n\t\tGL11.glDisable(GL11.GL_SCISSOR_TEST);\r\n\t}", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "public void draw() {\n \n // TODO\n }", "@Override\n\tpublic void roadChanged() {\n\t\tthis.from_x=this.from.getX();\n\t\tthis.from_y=this.from.getY();\n\t\tthis.to_x=this.to.getX();\n\t\tthis.to_y=this.to.getY();\n\t\tthis.getTopLevelAncestor().repaint();\n\t\tthis.repaint();\n//\t\tthis.getParent().repaint();\n\t}", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "void setRoute(Shape route);", "private void paintGraph() {\n if(graph) {\n for (MapFeature street : mapFStreets) {\n if (!(street instanceof Highway)) continue;\n Highway streetedge = (Highway) street;\n Iterable<Edge> edges = streetedge.edges();\n if (edges == null) continue;\n Iterator<Edge> it = edges.iterator();\n g.setStroke(new BasicStroke(0.0001f));\n g.setPaint(Color.CYAN);\n while (it.hasNext()) {\n Edge e = it.next();\n if (e.isOneWay())\n g.setPaint(Color.orange);\n else if (e.isOneWayReverse())\n g.setPaint(Color.PINK);\n g.draw(e);\n }\n\n\n }\n for (MapFeature street : mapFStreets) {\n if (!(street instanceof Highway)) continue;\n Highway streetedge = (Highway) street;\n List<Point2D> points = streetedge.getPoints();\n for(Point2D p : points){\n g.setPaint(Color.yellow);\n g.draw(new Rectangle2D.Double(p.getX(), p.getY(), 0.000005, 0.000005));\n }\n\n }\n }\n }", "private void drawSegments(List<LatLng> listPoints) {\n\n PolylineOptions rectOptions = new PolylineOptions()\n .width(8)\n .color(context.getResources().getColor(R.color.colorPolylineComplete))\n .addAll(listPoints);\n\n googleMap.addPolyline(rectOptions);\n }", "public void draw(Graphics2D g2)\n {\n Rectangle2D.Double land= new Rectangle2D.Double(xleft, ybottom, 10000, 100);\n Color mycolor= new Color(255, 222, 156);\n g2.setColor(mycolor);\n g2.draw(land);\n g2.fill(land);\n g2.draw(land);\n \n }", "public void draw() {\n \n }", "private void addPolyline(DirectionsResult results, GoogleMap mMap)\n {\n //Converts the result received on to a List of Lat and Lng values\n final List<LatLng> decodedPath = PolyUtil.decode(results.routes[overview].overviewPolyline.getEncodedPath());\n\n this.crimeDisplay.drawCrimeAlongRoute(decodedPath);\n\n //The following code creates a polyline to include all the LatLng values and changes how it works\n PolylineOptions polyline = new PolylineOptions();\n polyline = polyline.addAll(decodedPath);\n polyline = polyline.width(15);\n polyline = polyline.color(Color.RED);\n polyline = polyline.visible(true);\n polyline = polyline.clickable(true);\n //Adds the polyline to the map\n mMap.addPolyline(polyline);\n }", "@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean arrow, boolean screenCoords) {\n if(screenCoords) {\n start = convToImageCoords(start);\n end = convToImageCoords(end);\n }\n Line l = new Line(id, start, end, weight, color, arrow);\n lineMap.put(id, l);\n render();\n }", "public static void draw(ArrayList<Sighting> data){\n \n \t\tint backgroundColor = Utils.globalProcessing.color(120, 120, 120, 60);\n \n \t\tUtils.globalProcessing.fill(backgroundColor);\n \n \t\tUtils.globalProcessing.rect(200, 0, 1024, 768);\n \t\t//Utils.globalProcessing.rectMode(Utils.globalProcessing.CORNERS);\n \t\tArrayList<Shape> shapes = new ArrayList<Shape>();\n \t\tArrayList<Time> times = new ArrayList<Time>();\n \t\tArrayList<City> locations = new ArrayList<City>();\n \t\t//calculate min/max for each dimension\n \t\tfor(int i = 0; i < data.size(); i++){\n \t\t\tSighting s = data.get(i);\n \t\t\tif(!shapes.contains(s.getShape()))\n \t\t\t\tshapes.add(s.getShape());\n \t\t\tif(!times.contains(s.getTime()))\n \t\t\t\ttimes.add(s.getTime());\n \t\t\tif(!locations.contains(s.getPosition()))\n \t\t\t\tlocations.add((City)s.getPosition());\n \t\t}\n \t\tfloat xPloti, xPlote, yPloti, yPlote;\n \t\txPloti = 200;\n \t\txPlote = 1024;\n \t\tyPloti = 100;\n \t\tyPlote = 700;\n \n \t\tfloat maxDistance = 0;\n\t\tfloat minPopulationDensity = Utils.allCities.get(0).getPopulationDensity();\n\t\tfloat maxpopulationDensity = Utils.allCities.get(0).getPopulationDensity();\n \t\tfor(City c: locations){\n \t\t\tif(c.getDistanceAirport() > maxDistance)\n \t\t\t\tmaxDistance = c.getDistanceAirport();\n \t\t\tif(c.getPopulationDensity()< minPopulationDensity)\n \t\t\t\tminPopulationDensity = c.getPopulationDensity();\n \t\t\telse if(c.getPopulationDensity() > maxpopulationDensity)\n \t\t\t\tmaxpopulationDensity = c.getPopulationDensity();\n \n \t\t}\n \n \n \n \t\t\n \t\tfor(int i = 0; i < data.size(); i++){\n \t\t\tSighting s = data.get(i);\n \t\t\tUtils.globalProcessing.stroke(s.getShape().getColor());\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t//Utils.globalProcessing.stroke(120);\n \t\t\tfloat x = Utils.globalProcessing.map((float)1/7, 0, 1, xPloti, xPlote);\n \t\t\tfloat y = Utils.globalProcessing.map(((City)s.getPosition()).getDistanceAirport(), 0, maxDistance, yPloti, yPlote);\n \n \t\t\tUtils.globalProcessing.vertex(x,y); // distance\n \n \t\t\tx = Utils.globalProcessing.map((float)2/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(((City)s.getPosition()).getPopulationDensity(), minPopulationDensity, maxpopulationDensity, yPloti, yPlote);\n \n \t\t\tUtils.globalProcessing.vertex(x,y); //populationDensity\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\t//It works only if I threat all the couple of points as separate, indipendent lines\n \t\t\tUtils.globalProcessing.beginShape();\n \n \t\t\tUtils.globalProcessing.vertex(x,y);\n \n \t\t\tx = Utils.globalProcessing.map((float)3/7, 0, 1, xPloti, xPlote);\n \t\t\tif(s.getTime().getBeginTime().get(Calendar.HOUR_OF_DAY)<19 &&s.getTime().getBeginTime().get(Calendar.HOUR_OF_DAY)>=7)\n \t\t\t\ty = Utils.globalProcessing.map(1, 0, 3, yPloti, yPlote); //day \n \t\t\telse\t\n \t\t\t\ty = Utils.globalProcessing.map(2, 0, 3, yPloti, yPlote); //night \n \t\t\t//System.out.println(x +\" \" +y);\n \t\t\tUtils.globalProcessing.vertex(x,y); // night/day\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x,y);\n \t\t\tx = Utils.globalProcessing.map((float)4/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(s.getTime().getBeginTime().get(Calendar.MONTH)+1, 0, 13, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //month of the year\n \t\t\t\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x, y);\n \t\t\tx = Utils.globalProcessing.map((float)5/7, 0, 1, xPloti, xPlote);\n \t\t\tif(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.MARCH || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.APRIL ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.MAY) //Spring\n \t\t\ty = Utils.globalProcessing.map(1, 0, 5, yPloti, yPlote);\n \t\t\telse if(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.JUNE || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.JULY ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.AUGUST) //summer\n \t\t\t\ty = Utils.globalProcessing.map(2, 0, 5, yPloti, yPlote);\n \t\t\telse if(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.SEPTEMBER || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.OCTOBER ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.NOVEMBER) //autumn\n \t\t\t\ty = Utils.globalProcessing.map(3, 0, 5, yPloti, yPlote);\n \t\t\telse\n \t\t\t\ty = Utils.globalProcessing.map(3, 0, 5, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //seasons\n \t\t\t\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x, y);\n \t\t\t\n \t\t\tx = Utils.globalProcessing.map((float)6/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(s.getTime().getBeginTime().get(Calendar.YEAR), 2000, 2011, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //years\n \t\t\tUtils.globalProcessing.endShape();\n \t\t}\n \t\t//draw vertical lines\n \n \t\tfor(int i = 1; i < 7 ; i++){\n \t\t\tfloat x = Utils.globalProcessing.map((float)i/7, 0, 1, xPloti, xPlote);\n \t\t\t//Utils.globalProcessing.\n \t\t}\n \n \t}", "public Road(String name) {\n this.name = name;\n this.points = new ArrayList<>();\n }", "@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean screenCoords) {\n drawLine(id, start, end, weight, color, false, screenCoords);\n }", "public Shapes draw ( );", "public void draw(WorldLocation coord){\n \n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "public void polygone (Graphics g){\n\t}", "public void draw(Canvas canvas, MapView mapv, boolean shadow){\n\t super.draw(canvas, mapv, shadow);\n\n\t // paint object to define the prefrences of the line to be drawn\n\t Paint mPaint = new Paint();\n\t mPaint.setDither(true);\n\t mPaint.setColor(Color.RED);\n\t mPaint.setStyle(Paint.Style.FILL_AND_STROKE);\n\t mPaint.setStrokeJoin(Paint.Join.ROUND);\n\t mPaint.setStrokeCap(Paint.Cap.ROUND);\n\t mPaint.setStrokeWidth(20);\n\n\t GeoPoint gP1 = goeP1;\n\t GeoPoint gP2 = geoP2;\n\n\t \n\t // the points the will represent the start and finish of the line.\n\t Point p1 = new Point();\n\t Point p2 = new Point();\n\n\t // path object the draw a reference path.\n\t Path path = new Path();\n // A projection object which converts between coordinates and pixels on the screen.\n\t Projection projection = mapv.getProjection();\n\t // converting of coordinates to pixel\n\t projection.toPixels(gP1, p1);\n\t projection.toPixels(gP2, p2);\n// draw a reference path\n\t path.moveTo(p2.x, p2.y);\n\t path.lineTo(p1.x,p1.y);\n// draw the actual path.\n\t canvas.drawPath(path, mPaint);\t\n\t }", "public void draw();", "public void draw();", "public void draw();", "public void draw(Point location) {\n\t}", "public void roadList(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(i + \" \" + roads.get(i).start.getCityName() + \", \" + roads.get(i).end.getCityName());\n }\n }", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "private void plotRoute(int zoomLevel, LatLon src, LatLon dst, Route r) {\n List<GeoPoint> geoPoints = new ArrayList<>();\n\n Polyline polyline = new Polyline(mapView.getContext());\n polyline.setColor(busRouteLegendOverlay.getColor(r.getNumber()));\n geoPoints.add(new GeoPoint(Geometry.gpFromLatLon(src)));\n geoPoints.add(new GeoPoint(Geometry.gpFromLatLon(dst)));\n polyline.setPoints(geoPoints);\n polyline.setVisible(true);\n polyline.setWidth(getLineWidth(zoomLevel));\n busRouteOverlays.add(polyline);\n }", "private void drawMap(HashMap<String, TrailObj> trailCollection,\n\t\t\tGoogleMap mMap2) {\n\n\t\tfor (TrailObj trail : trailCollection.values()) {\n\t\t\tfor (PlacemarkObj p : trail.getPlacemarks()) {\n\t\t\t\tPolylineOptions rectOptions = new PolylineOptions();\n\t\t\t\tfor (LatLng g : p.getCoordinates()) {\n\t\t\t\t\trectOptions.add(g);\n\t\t\t\t}\n\t\t\t\tPolyline polyline = mMap2.addPolyline(rectOptions);\n\t\t\t\tpolyline.setColor(Color.RED);\n\t\t\t\tpolyline.setWidth(5);\n\t\t\t\tpolyline.setVisible(true);\n\t\t\t}\n\t\t}\n\t}", "public void draw() {\n }", "public Road(Place A, Place B)\n\t{\n\t\tEmpire roadEmpire = Empire.getInstance();\n\t\t\n\t\tint intXA, intYA, intXB, intYB;\n\t\tdouble xA, yA, xB, yB;\n\t\t\n\t\tintXA = A.getXPosition();\n\t\tintYA = A.getYPosition();\n\t\tintXB = B.getXPosition();\n\t\tintYB = B.getYPosition();\n\t\t\n\t\txA = (double) intXA;\n\t\tyA = (double) intYA;\n\t\txB = (double) intXB;\n\t\tyB = (double) intYB;\n\t\t\n\t\taPoint = new Point((int) xA, (int) yA);\n\t\tbPoint = new Point((int) xB, (int) yB);\n\t\t\n\t\taName = A.getName();\n\t\tbName = B.getName();\n\t\t\n\t\tlength = Math.sqrt((((xA-xB)*(xA-xB) + (yA - yB)*(yA - yB))));\n\t\tkFactor = (yB - yA)/(xB-xA);\n\t\t\n\t\troad.add(new Point(intXA, intYA));\n\t\t\n\t\tString keyA = String.valueOf(intXA) + \"-\" + String.valueOf(intYA);\n\t\tif(!roadEmpire.POINTS.containsKey(keyA));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXA,intYA);\n\t\t\troadEmpire.POINTS.put(keyA, m);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif((xA == xB) && (yA == yB))\n\t\t{\n\t\t\tdirection = Direction.NONE;\n\t\t}\n\t\telse if(xA == xB)\n\t\t{\n\t\t\tif(yB > yA)\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH;\n\t\t\t}\t\t\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x = (int) xA;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tif(yB > yA)\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if(yA == yB)\n\t\t{\n\t\t\tif(xB > xA)\n\t\t\t{\n\t\t\t\tdirection = Direction.EAST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.WEST;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y = (int)yA;\n\t\t\t\t\n\t\t\t\tif(xB > xA)\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_EAST;\n\t\t\t}\n\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t{\t\n\t\t\t\tdirection = Direction.NORTH_EAST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_WEST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH_WEST;\n\t\t\t}\n\t\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tdouble c = (double) i;\n\t\t\t\tdouble a = c/(Math.sqrt((kFactor*kFactor + 1.0))); \n\t\t\t\tdouble b = Math.abs(a*kFactor);\n\t\t\t\t\n\t\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = 100;\n\t\t\t\t\ty = 100;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point (x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t\t\n\t\troad.add(new Point(intXB, intYB));\n\t\t\n\t\tString keyB = String.valueOf(intXB) + \"-\" + String.valueOf(intYB);\n\t\tif(!roadEmpire.POINTS.containsKey(keyB));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXB,intYB);\n\t\t\troadEmpire.POINTS.put(keyB, m);\n\t\t}\n\t}", "public void draw(Graphics2D g, Dimension area);", "public static String buildRoute(String controlPoints, String id, \n String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, \n SymbolModifiers attributes) {\n \n String pointArrayStringList = \"\"; \n double width;\n double leftWidth;\n double rightWidth; \n\n try {\n // Get the points of the icons. For the polyarc we need only\n // one point, the pivot point, then the rest of the points for the \n // polygon. \n String[] latlons = controlPoints.split(\" \");\n if (latlons.length >= 2) {\n width = attributes.AM_DISTANCE.get(0);\n leftWidth = width / 2;\n rightWidth = width / 2;\n \n // Build the polyarc\n pointArrayStringList = XsltCoordinateWrapper.getRouteKml(latlons,\n id, name, description, lineColor, fillColor, altitudeMode,\n leftWidth, rightWidth, attributes.X_ALTITUDE_DEPTH.get(0), attributes.X_ALTITUDE_DEPTH.get(1));\n\n } else {\n // illegal number of points exception\n throw new InvalidNumberOfPointsException();\n }\n } catch (Exception e) {\n pointArrayStringList = \"\"; \n }\n\n return pointArrayStringList;\n\n }", "void draw(IViewShapes shape);", "private void drawShapes() {\n\n // get a polygon shape object\n SKPolygon polygon = new SKPolygon();\n // set the polygon's nodes\n List<SKCoordinate> nodes = new ArrayList<SKCoordinate>();\n nodes.add(new SKCoordinate(-122.4342, 37.7765));\n nodes.add(new SKCoordinate(-122.4141, 37.7765));\n nodes.add(new SKCoordinate(-122.4342, 37.7620));\n polygon.setNodes(nodes);\n // set the outline size\n polygon.setOutlineSize(3);\n // set colors used to render the polygon\n polygon.setOutlineColor(new float[]{1f, 0f, 0f, 1f});\n polygon.setColor(new float[]{1f, 0f, 0f, 0.2f});\n // render the polygon on the map\n mapView.addPolygon(polygon);\n\n // get a circle mask shape object\n SKCircle circleMask = new SKCircle();\n // set the shape's mask scale\n circleMask.setMaskedObjectScale(1.3f);\n // set the colors\n circleMask.setColor(new float[]{1f, 1f, 0.5f, 0.67f});\n circleMask.setOutlineColor(new float[]{0f, 0f, 0f, 1f});\n circleMask.setOutlineSize(3);\n // set circle center and radius\n circleMask.setCircleCenter(new SKCoordinate(-122.4200, 37.7665));\n circleMask.setRadius(300);\n // set outline properties\n circleMask.setOutlineDottedPixelsSkip(6);\n circleMask.setOutlineDottedPixelsSolid(10);\n // set the number of points for rendering the circle\n circleMask.setNumberOfPoints(150);\n // render the circle mask\n mapView.addCircle(circleMask);\n\n\n // get a polyline object\n SKPolyline polyline = new SKPolyline();\n // set the nodes on the polyline\n nodes = new ArrayList<SKCoordinate>();\n nodes.add(new SKCoordinate(-122.4342, 37.7898));\n nodes.add(new SKCoordinate(-122.4141, 37.7898));\n nodes.add(new SKCoordinate(-122.4342, 37.7753));\n polyline.setNodes(nodes);\n // set polyline color\n polyline.setColor(new float[]{0f, 0f, 1f, 1f});\n // set properties for the outline\n polyline.setOutlineColor(new float[]{0f, 0f, 1f, 1f});\n polyline.setOutlineSize(4);\n polyline.setOutlineDottedPixelsSolid(3);\n polyline.setOutlineDottedPixelsSkip(3);\n mapView.addPolyline(polyline);\n }", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "@Override\r\n\tpublic void placeRoad(EdgeLocation edgeLoc) {\n\t\t\r\n\t}", "void playRoadCard(EdgeLocation spot1, EdgeLocation spot2);", "public void draw(){\n }", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }", "public void recordWaypoints(){\n\t\t\n\t\tfor (int i = 0; i < waypoints.size(); i++) {\n WayPoint wei = waypoints.get(i);\n int x = (int)Math.round((wei.getX() * scale) + width/2);\n int y = (int)Math.round((wei.getY() * scale) + height/2);\n g2d.setColor(Color.blue);\n g2d.fillRect(x,y,4,4);\n\t\t\t\t\t \n //System.out.println(x + \" \" + y);\n }\n\t}", "public void drawBed(double x, double y, double length, double height){\n double bedPostLength = length/15;\n double mattressLength = length - bedPostLength*2;\n double mattressHeight = height/10 * 6;\n //for measurement\n double bedunit = height/10;\n \n //make both bed posts\n Rectangle2D.Double fstpost = new Rectangle2D.Double(x, y, bedPostLength, height);\n Rectangle2D.Double sndpost = new Rectangle2D.Double(x+length-bedPostLength, y, bedPostLength, height);\n \n //make slat\n Rectangle2D.Double slat = new Rectangle2D.Double(x+bedPostLength, y+(bedunit*8), mattressLength, bedunit);\n \n //make mattress\n Rectangle2D.Double mattress = new Rectangle2D.Double(x+bedPostLength, y+(bedunit*2), mattressLength, (bedunit*7));\n \n //put bed together\n \n GeneralPath wholeBed = this.get();\n \n wholeBed.append(fstpost, false);\n wholeBed.append(sndpost, false);\n wholeBed.append(slat, false);\n wholeBed.append(mattress, false);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public static void mainDraw(Graphics graphics) {\n int x1 = 50;\r\n int x2 = 180;\r\n int y1 = 180;\r\n int y2 = 50;\r\n Color[] colors = {Color.blue, Color.cyan, Color.green, Color.magenta};\r\n graphics.setColor(colors[1]);\r\n graphics.drawLine(x1, y2, x2, y2);\r\n graphics.setColor(colors[2]);\r\n graphics.drawLine(x2, y2, x2, y1);\r\n graphics.setColor(colors[3]);\r\n graphics.drawLine(x2, y1, x1, y1);\r\n graphics.setColor(colors[0]);\r\n graphics.drawLine(x1, y1, x1, y2);\r\n }", "public void draw(Graphics g){\n g.setColor (colour);\n g.fillOval (x,y,DIAMETER, DIAMETER);\n g.setColor (Color.black);\n g.drawString(name, x+5, y+30);\n g.setFont (new Font (\"Times New Roman\", Font.PLAIN, 16) );\n g.setColor (Color.black);\n g.drawString (Integer.toString(seatNum), x+13 ,y+18) ;\n \n \n \n \n \n \n }", "@Override\n\tpublic void draw(Graphics2D g) {\n\n\t\t\n\t\tg.setColor(new Color(36, 36, 36));\n\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\n\t\tg.setColor(new Color(87, 87, 87));\n\t\tSceneManager.sm.currSector.drawBasicGrid(g, 1000000, (int) (100 * (1 / Math.sqrt((Camera.scale)))), 2);\n\n\t\tif (target != null) {\n\t\t\tg.setPaint(new Color(255, 0, 0, 200));\n\t\t\tg.setStroke(new BasicStroke((int) (3 * Camera.scale)));\n\t\t\tCamera.toScreen(target.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tSceneManager.sm.currSector.draw(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.drawImage(ui, 0, 0, 1920, 1010, null);\n\n\t\t// draw player scrap amt\n\t\tg.setFont(Misc.arialBig);\n\t\tg.setColor(Color.white);\n\t\tg.drawString(\"\" + Driver.playerScrap, 1733, 72);\n\n\t\t// draw speed\n\t\tg.setColor(new Color(0, 119, 166));\n\t\tg.fillRect(1872, (int) (113 + 564 - 564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))), 33,\n\t\t\t\t(int) (564 * ((p.vel.getMagnitude() * 20)\n\t\t\t\t\t\t/ (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))));\n\t\tg.setFont(Misc.font);\n\t\tg.setColor(Color.LIGHT_GRAY);\n\t\tg.drawString((int) (p.vel.getMagnitude() * 20) + \" mph\", 1760, 564 - (int) (564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag))))\n\t\t\t\t+ 120);\n\n\t\t// show selected ship\n\t\tif (selected != null && !selected.destroyed) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tCamera.toScreen(selected.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tfor (Part p : s.parts) {\n\t\t\t\tif (p.health < p.baseHealth && Camera.scale > .5) {\n\t\t\t\t\tg.rotate(s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t\tdrawPartHealth(g, p,\n\t\t\t\t\t\t\tCamera.toScreen(new Point(s.pos.x + p.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\t\t\ts.pos.y + p.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t\t\t(int) (40 * Camera.scale), (int) (15 * Camera.scale), p.health, p.baseHealth);\n\t\t\t\t\tg.rotate(-s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (partTarget != null) {\n\t\t\tg.rotate(target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t\tg.setColor(Color.red);\n\t\t\toutlinePart(g,\n\t\t\t\t\tCamera.toScreen(new Point(target.pos.x + partTarget.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\ttarget.pos.y + partTarget.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t(int) (partTarget.width * Part.SQUARE_WIDTH * Camera.scale),\n\t\t\t\t\t(int) (partTarget.height * Part.SQUARE_WIDTH * Camera.scale));\n\t\t\tg.rotate(-target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t}\n\n\t\t// shipYard.draw(g);\n\t\t// starMap.draw(g);\n\n\t\tif (target != null) {\n\t\t\tPoint avg = Camera.toScreen(target.cm.avg(p.cm));\n\t\t\tPoint mapAvg = target.cm.avg(p.cm);\n\t\t\teyeLoc.setXY(mapAvg.x, mapAvg.y);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, eyeFocused ? .1f : .3f));\n\t\t\tg.drawImage(eye, (int)(avg.x - eye.getWidth() * Camera.scale / 2), (int)(avg.y - eye.getHeight() * Camera.scale / 2),\n\t\t\t\t\t(int)(eye.getWidth() * Camera.scale), (int)(eye.getHeight() * Camera.scale), null);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));\n\t\t\t\n\t\t}\n\n\t\tminimap.mc.focus(Camera.toMap(Driver.screenWidth / 2, Driver.screenHeight / 2));\n\t\tminimap.draw(g, SceneManager.sm.currSector.ships);\n\n\t\tif (!running) {\n\t\t\tg.setPaint(new Color(0, 0, 0, 128));\n\t\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(Misc.arialSmall);\n\t\t\tg.drawString(\"Paused - [p] to resume\", 900, 50);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.drawString(\n\t\t\t\t\t\"Protect your reactor, destroy enemies to collect scrap, build up your ship, and make your way to the end of the galaxy!\",\n\t\t\t\t\tDriver.screenWidth / 2 - 920, Driver.screenHeight / 2 - 400);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.drawString(\"CONTROL BASICS:\", Driver.screenWidth / 2 - 940, Driver.screenHeight / 2 - 350);\n\t\t\t\n\t\t\tg.drawString(\"MOVEMENT: Rotation = Q and E, Translation = WASD\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 300);\n\t\t\tg.drawString(\"COMBAT: Right Click on enemy = set as a target: lasers will shoot target when in range\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 250);\n\t\t\tg.drawString(\"CAMERA: Middle Mouse Click on ship = set the camera to that ship\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 200);\n\t\t\tg.drawString(\"Scroll Wheel = zoom\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 150);\n\t\t\tg.drawString(\"Arrow Keys = pan\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 100);\n\t\t\t\n\t\t\tg.drawString(\"GAMEPLAY + STRATEGY:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - 0);\n\t\t\tg.setColor(new Color(217, 52, 52));\n\t\t\tg.drawString(\"If you just started, your ship is weak! Upgrade it before entering combat!\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -50);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.drawString(\"Cannot jump to the next sector if current sector is not clear\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -100);\n\t\t\tg.drawString(\"Enemies will attack you when in range & can't edit ship if in enemy range\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -150);\n\t\t\t\n\t\t\t\n\t\t\t//advanced\n\t\t\tg.drawString(\"ADVANCED:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - -200);\n\t\t\tg.drawImage(eye, Driver.screenWidth / 2 - 340, Driver.screenHeight / 2 + 225, eye.getWidth()/4, eye.getHeight()/4, null);\n\t\t\tg.drawString(\"Middle Click the icon: set the camera to focus on the center of battle\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -250);\n\t\t\tg.drawString(\"Spacebar = recenter camera on player\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -300);\n\t\t}\n\n\t}", "public void draw(Graphics g, Point cmpPosRelPrnt) {\n\t\tint xLoc = cmpPosRelPrnt.getX() + (int)this.getLocationX() - (this.getSize()/2); //Center.x - width/2 relative to mapView.\n\t\tint yLoc = cmpPosRelPrnt.getY() + (int)this.getLocationY() - (this.getSize()/2); //Center.y - width/2 relative to mapView.\n\t\t\n\t\tint radius = this.getSize()/2;\n\t\t\n\t\tg.setColor(this.getColor());\n\t\tg.fillArc(xLoc, yLoc, 2*radius, 2*radius, 0, 360);\n\t}", "protected void drawWithLaser() {\n stroke(SnakeRun.LASER_COLOR);\n beginRaw(laserRenderer);\n if (leftSkier.finished() && rightSkier.finished()) {\n /*\n * Display winner.\n * Using high scan speed in hopes to provide non-flickering text.\n */\n laser.output().setScanSpeed(SnakeRun.TEXT_SCANSPEED);\n laserRenderer.noSmooth();\n String finishNote = SkierContestant.winner(leftSkier, rightSkier);\n pushMatrix();\n translate(width / 2, height / 2);\n font.setAlign(RFont.CENTER);\n int fontSize = font.size;\n font.setSize(40);\n font.draw(finishNote);\n font.setSize(fontSize);\n popMatrix();\n } else {\n /*\n * Display game.\n * Use slower scan speed since shapes are quite easy to draw.\n */\n laser.output().setScanSpeed(SnakeRun.GAME_SCANSPEED);\n this.drawGame();\n }\n endRaw();\n stroke(SnakeRun.SCREEN_COLOR);\n }", "public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }", "public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }", "public void draw(Graphics g){\n\n g.setColor(Color.red);\n g.drawLine(x1,y1,x2,y2);\n g.drawLine(x2,y2,x3,y3);\n g.drawLine(x3,y3,x1,y1);\n g.setFont(new Font(\"Courier\", Font.BOLD, 12));\n DecimalFormat fmt = new DecimalFormat(\"0.##\"); \n g.setColor(Color.blue);\n g.drawString(fmt.format(perimeter()) + \" \" + name,x1+2 , y1 -2);\n \n }", "public void drawOnMapFragment(){\n if(!ifFieldTooBig()){\n isFreeDraw = true;\n mFreeDrawView.setVisibility(View.INVISIBLE);\n mFreeDrawView.cleanCanvas();\n drawPolygonWithMarker(mMapInterface.getPathFrame(), Color.WHITE);\n\n dronePath.findDronePath(mMapInterface.getPathFrame(), RESOLUTION);\n dronePath.drawRout(getDronePath(), googleMap, Color.GREEN);\n isPathReady=true;\n mMapInterface.setFullDronePath(getDronePath());\n Toast.makeText(getContext(), getString(R.string.edit_explain), Toast.LENGTH_LONG).show();\n }\n else{\n deletePath();\n }\n }", "public void paint(Graphics g)\n {\n int X_x;\n int X_y;\n int Y_x;\n int Y_y;\n int Z_x;\n int Z_y;\n\n X_x = 0;\n X_y = 0;\n Y_x = 500;\n Y_y = 0;\n Z_x = 250;\n Z_y = 500;\n\n int currentX = X_x;\n int currentY = X_y;\n int targetX, targetY;\n int midwayX, midwayY;\n Random r = new Random();\n\n for(int i = 0; i < 10000; i++)\n {\n int random = r.nextInt(3);\n if(random == 0)\n {\n targetX = X_x;\n targetY = X_y;\n }\n else if(random == 1)\n {\n targetX = Y_x;\n targetY = Y_y;\n }\n else\n {\n targetX = Z_x;\n targetY = Z_y;\n }\n\n //halfway between\n currentX = (targetX + currentX) / 2;\n currentY = (targetY + currentY) / 2;\n g.drawLine(currentX, currentY, currentX, currentY);\n }\n }", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public void draw() {\n\n }", "private void drawMap(final Graphics2D theGraphics) {\n for (int y = 0; y < myGrid.length; y++) {\n final int topy = y * SQUARE_SIZE;\n\n for (int x = 0; x < myGrid[y].length; x++) {\n final int leftx = x * SQUARE_SIZE;\n\n switch (myGrid[y][x]) {\n case STREET:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n drawStreetLines(theGraphics, x, y);\n break;\n\n case WALL:\n theGraphics.setPaint(Color.BLACK);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case TRAIL:\n theGraphics.setPaint(Color.YELLOW.darker().darker());\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case LIGHT:\n // draw a circle of appropriate color\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n \n case CROSSWALK:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n \n drawCrossWalkLines(theGraphics, x, y);\n \n // draw a small circle of appropriate color centered in the square\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n topy + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n SQUARE_SIZE / 2, SQUARE_SIZE / 2);\n break;\n\n default:\n }\n\n drawDebugInfo(theGraphics, x, y);\n }\n }\n }", "@Override\n\tpublic void onNextRoadClick() {\n\t\t\n\t}", "private void addKey() {\t\n\t\t// Remember you can use Processing's graphics methods here\n\t\tfill(255, 250, 240);\n\t\t\n\t\tint xbase = 25;\n\t\tint ybase = 50;\n\t\t\n\t\trect(xbase, ybase, 250, 240);\n\t\t\n\t\tfill(0);\n\t\ttextAlign(LEFT, CENTER);\n\t\ttextSize(12);\n\t\ttext(\"Route Info\", xbase+25, ybase+25);\n\t\t\n\t\tfill(150, 30, 30);\n\n\n\t\tfill(0, 0, 0);\n\t\ttextAlign(LEFT, CENTER);\n\t\tString name0 = station0 == null ? \"\" : station0.getName();\n\t\tString name1 = station1 == null ? \"\" : station1.getName();\n\t\t\n\t\t// If two stations are currently selected, generate an API call\n\t\tString peak = \"\";\n\t\tString offPeak = \"\";\n\t\tString discount = \"\";\n\t\tString time = \"\";\n\t\tString distance = \"\";\n\t\tif(routeInfo != null){\n\t\t\tpeak = routeInfo.getPeak();\n\t\t\toffPeak = routeInfo.getOffPeak();\n\t\t\tdiscount = routeInfo.getDiscount();\n\t\t\ttime = routeInfo.getTime();\n\t\t\tdistance = routeInfo.getDistance();\n\t\t}\n\t\ttext(\"Station 1: \" + name0, xbase+25, ybase+65);\n\t\ttext(\"Station 2: \" + name1, xbase+25, ybase+85);\n\t\ttext(\"Peak fare: $\" + peak, xbase+25, ybase+125);\n\t\ttext(\"Off-peak fare: $\" + offPeak, xbase+25, ybase+145);\n\t\ttext(\"Discount fare: $\" + discount, xbase+25, ybase+165);\n\t\ttext(\"Est. travel time: \" + time + \" min\", xbase+25, ybase+205);\n\t\ttext(\"Distance: \" + distance + \" miles\", xbase+25, ybase+225);\t\n\t}", "public void drawArc(int num1, int num2) {\n\t\t//Gdx.app.log(\"renderer\", String.valueOf(((CercleObstacle) myWorld.getObstacles()[num1]).getArcs()[num2].getRayon()));\n \tshapeRenderer.arc(((CercleObstacle) myWorld.getObstacles()[num1]).getArcs()[num2].getPosition().x,\n \t\t((CercleObstacle) myWorld.getObstacles()[num1]).getArcs()[num2].getPosition().y,\n \t\t((CercleObstacle) myWorld.getObstacles()[num1]).getArcs()[num2].getRayon(),\n \t\t((CercleObstacle) myWorld.getObstacles()[num1]).getArcs()[num2].getAngleDepart(),\n \t\t((CercleObstacle) myWorld.getObstacles()[num1]).getArcs()[num2].getAngle());\n }", "void draw();", "public void draw() {\n // añadimos el programa al entorno de opengl\n GLES20.glUseProgram(mProgram);\n\n // obtenemos el identificador de los sombreados del los vertices a vPosition\n positionHandle = GLES20.glGetAttribLocation(mProgram, \"vPosition\");\n\n // habilitamos el manejo de los vertices del triangulo\n GLES20.glEnableVertexAttribArray(positionHandle);\n\n // Preparamos los datos de las coordenadas del triangulo\n GLES20.glVertexAttribPointer(positionHandle, COORDS_PER_VERTEX,\n GLES20.GL_FLOAT, false,\n vertexStride, vertexBuffer);\n\n // Obtenemos el identificador del color del sombreado de los fragmentos\n colorHandle = GLES20.glGetUniformLocation(mProgram, \"vColor\");\n\n // Establecemos el color para el dibujo del triangulo\n GLES20.glUniform4fv(colorHandle, 1, color, 0);\n\n // SE dibuja el triangulo\n GLES20.glDrawArrays(GLES20.GL_LINE_LOOP, 0, vertexCount);\n\n // Deshabilitamos el arreglo de los vertices (que dibuje una sola vez)\n GLES20.glDisableVertexAttribArray(positionHandle);\n }", "private void showRoutePolyline(String routeId) {\n\t\ttry {\n\n\t\t\tRoute route = getDbHelper().getRoutesDAO().queryForId(routeId);\n\t\t\tshowRoutePolyline(route);\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e);\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public void draw() \n{\n background(250, 243, 225);\n timer(); //control timing of the program\n mapwd.draw(); //visualize weekday trajectory\n shadeTra(t1); \n mapwk.draw(); //visualize weekend trajectory\n shadeTra(t2); \n transport(); //draw the transport legend\n infoDisplay(); //display almost text information\n \n\n stroke(0);\n \n gweekend();\n gweekday();\n frame();\n graduation();\n piechart();\n \n stroke(0);\n arrow();\n \n saveFrame(\"Output1/traffic_######.tif\");\n}", "private void drawStreet(Graphics2D g2d, int x, int y, Cell c) {\n try {\r\n g2d.setPaint(Color.LIGHT_GRAY);\r\n g2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n drawStreetAgents(g2d,x,y,c);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Override\n public void draw() {\n drawAPI.drawCircle(radius, x, y); \n }", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void paintLine(Point2D pt1, Point2D pt2, Graphics graphics) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // the line connecting the segments\n OMLine cLine = new OMLine((float) pt1.getY(), (float) pt1.getX(), (float) pt2.getY(), (float) pt2.getX(), lineType);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the line for rendering\n cLine.generate(proj);\n // render the line graphic\n cLine.render(g);\n }\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\r\n System.out.println(\"How many roads?\");\r\n int roadSpawns = scanner.nextInt();\r\n System.out.println(\"How many cars?\");\r\n int carSpawns = scanner.nextInt();\r\n // Store adjacent paths\r\n List<String> connectedRoad = new ArrayList<>();\r\n List<TrafficLight> lights = new ArrayList<>();\r\n\r\n //Create objects:\r\n System.out.println(\"Object Creation:\\n---------------------\");\r\n System.out.println(\"Roads:\");\r\n ArrayList<Road> roads = new ArrayList<>();\r\n for (int i = 0; i < roadSpawns; i++) {\r\n System.out.println(\"Please input parameters for road_\" + i + \"...\");\r\n System.out.print(\"Length:\");\r\n int lengthInput = scanner.nextInt();\r\n int speedLimitInput = (new Random()).nextInt(11);\r\n roads.add(new Road(Integer.toString(i), speedLimitInput, lengthInput, new int[]{0, 0}));\r\n System.out.println(\"Please input connected roads of road_\" + i + \"...(like:0,1,2...)\");\r\n String infos = scanner.next();\r\n connectedRoad.add(infos);\r\n }\r\n System.out.println(\"\\nRoads;\");\r\n for (Road road : roads) {\r\n road.printRoadInfo();\r\n }\r\n\r\n // Set up TrafficLight at road junctions\r\n for (int i = 0; i < connectedRoad.size(); i++) {\r\n TrafficLight trafficLight = null;\r\n if (roads.get(i).getLightsOnRoad().size() > 0) trafficLight = roads.get(i).getLightsOnRoad().get(0);\r\n else {\r\n long currentTime = new Date().getTime();\r\n trafficLight = new TrafficLight(String.valueOf(currentTime), roads.get(i));\r\n roads.get(i).addTrafficLight(trafficLight);\r\n lights.add(trafficLight);\r\n }\r\n for (String s : connectedRoad.get(i).split(\",\")) {\r\n roads.get(i).addConnectRoad(roads.get(Integer.parseInt(s)));\r\n if (roads.get(Integer.parseInt(s)).getLightsOnRoad().size() > 0) continue;\r\n else roads.get(Integer.parseInt(s)).addTrafficLight(trafficLight);\r\n }\r\n }\r\n\r\n System.out.println(\"\\nCars;\");\r\n ArrayList<Car> cars = new ArrayList<>();\r\n for (int i = 0; i < carSpawns; i++) {\r\n // random add bus or motorbke\r\n if ((new Random()).nextInt(10) <= 5) {\r\n cars.add(new Bus(Integer.toString(i), roads.get(0)));\r\n } else {\r\n cars.add(new Motorbike(Integer.toString(i), roads.get(0)));\r\n }\r\n cars.get(i).printCarStatus();\r\n }\r\n\r\n // Let car run\r\n int time = 0;\r\n System.out.print(\"\\nSet time scale in milliseconds:\");\r\n int maxtime = scanner.nextInt();\r\n while (true) {\r\n // change trafficlight state\r\n for (TrafficLight light : lights) {\r\n light.chageState();\r\n }\r\n for (Car car : cars) {\r\n car.move();\r\n car.printCarStatus();\r\n }\r\n time = time + 1;\r\n System.out.println(time + \" Seconds have passed.\\n\");\r\n if (time >= maxtime) {\r\n System.out.println(\"timeout\");\r\n break;\r\n }\r\n }\r\n }", "private void drawStreetLines(final Graphics2D theGraphics,\n final int theX, final int theY) {\n \n final Paint oldPaint = theGraphics.getPaint();\n theGraphics.setPaint(Color.YELLOW);\n\n final int leftx = theX * SQUARE_SIZE;\n final int topy = theY * SQUARE_SIZE;\n final int centerx = leftx + SQUARE_SIZE / 2;\n final int centery = topy + SQUARE_SIZE / 2;\n final int rightx = leftx + SQUARE_SIZE;\n final int bottomy = topy + SQUARE_SIZE;\n\n if (isValidIndex(theY - 1, theX) && myGrid[theY - 1][theX] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, centerx, topy); // above\n }\n if (isValidIndex(theY + 1, theX) && myGrid[theY + 1][theX] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, centerx, bottomy); // below\n }\n if (isValidIndex(theY, theX - 1) && myGrid[theY][theX - 1] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, leftx, centery); // left\n }\n if (isValidIndex(theY, theX + 1) && myGrid[theY][theX + 1] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, rightx, centery); // right\n }\n\n theGraphics.setPaint(oldPaint);\n }", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}" ]
[ "0.73886925", "0.63848263", "0.62449485", "0.6227694", "0.61910725", "0.6183093", "0.6112452", "0.60041624", "0.5953068", "0.5937819", "0.593684", "0.59269077", "0.590378", "0.5883489", "0.5870113", "0.5851824", "0.581839", "0.58177704", "0.5816476", "0.581202", "0.57674617", "0.57672834", "0.57508403", "0.5710192", "0.56766504", "0.5662297", "0.5658595", "0.5642615", "0.56166047", "0.559482", "0.5545518", "0.5524245", "0.55154157", "0.54995966", "0.5497834", "0.54943717", "0.5492271", "0.54849535", "0.5476921", "0.5464522", "0.5462205", "0.54583055", "0.545273", "0.5438207", "0.54308957", "0.5411329", "0.5410888", "0.5409631", "0.5409631", "0.5409631", "0.54055154", "0.5393798", "0.53915", "0.538767", "0.5387139", "0.5377065", "0.5376498", "0.5364937", "0.53641295", "0.53634536", "0.5361769", "0.5360616", "0.5359111", "0.53558207", "0.5355692", "0.5354111", "0.5341195", "0.5338708", "0.5335105", "0.5335105", "0.5335105", "0.5335105", "0.53337944", "0.5326106", "0.5324036", "0.5322742", "0.5322148", "0.5320042", "0.5318788", "0.5317682", "0.529881", "0.5294513", "0.5283245", "0.52771235", "0.52762103", "0.5274164", "0.5267478", "0.52658516", "0.52657264", "0.5252465", "0.52512616", "0.52510506", "0.5249722", "0.5242656", "0.5235686", "0.5232141", "0.52282196", "0.52256185", "0.5221174", "0.5221029" ]
0.6667148
1
if a is having value 1 to 10 we are safe else thow some exception
public void myMethod(int a) throws Exception { if(a>=1 && a<=10) System.out.println("We are safe"); else throw new Exception("we are at danger"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateField(int[] a, int field) {\n\t\tboolean valid = true;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tif (a[i] >= field) {\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn valid;\n\t}", "private boolean isValidOption(int option){\n return (option >= 0) && (option < this.count());\n }", "@Test(expectedExceptions=NumberFormatException.class)\r\n\tpublic void chkNumberFrmtExcep(){\r\n\t\tString x=\"100A\";\r\n\t\tint f=Integer.parseInt(x);//it will throw exception bcoz x=100A, if it is 100 it will not throw exception\r\n\t}", "@Override\n\t\t\tpublic boolean test(Integer t) {\n\t\t\t\treturn false;\n\t\t\t}", "private void validationInt(List<Integer> list) {\n\t\tint i=0;\n\t\tfor(i=0;i<list.size();i++) {\n\t\t\tif(!(list.get(i) > 0)){\n\t\t\t\tthrow new IntValueLessOneException(list.get(i));\n\t\t\t}\n\t\t}\n\t}", "public boolean makes10(int a, int b) {\n return a == 10 || b == 10 || a + b == 10;\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n // Undeclared exception!\n try { \n Range.of(3253L, 1198L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "void checkRange(String value) throws TdtTranslationException {\r\n\t\tif (!hasRange)\r\n\t\t\treturn;\r\n\t\tLong intValue;\r\n\t\ttry {\r\n\t\t\tintValue = Long.valueOf(Long.parseLong(value));\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new TdtTranslationException(\"Cannot convert \" + value\r\n\t\t\t\t\t+ \" to ulong in field \" + getId());\r\n\t\t}\r\n\t\tcheckRange(intValue);\r\n\t}", "private void rangeCheck(int index) {\n if (index >= this.values.length) {\n throw new ArrayIndexOutOfBoundsException(\"Index of out bounds!\");\n }\n }", "private boolean esColumnaValida(int columna) {\n return (columna>=0 && columna<=casillas[0].length);\n }", "private boolean esFilaValida(int fila) {\n return (fila>=0 && fila<=casillas.length);\n }", "private boolean isInteger(String a) {\n try \n {\n Integer.parseInt(a);\n return true;\n }\n catch(Exception e) {\n return false;\n }\n }", "public boolean makes10(int a, int b) {\n return (a == 10 || b == 10 || a + b == 10);\n}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n long long0 = (-1903L);\n // Undeclared exception!\n try { \n Range.ofLength((-1903L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public boolean in1020(int a, int b) {\n return ((a >= 10 && a <= 20) || (b >= 10 && b <= 20));\n}", "@Test\n\tpublic void testAddOutOfRange() {\n\t\tInteger result = SimpleCalc.add(40, 10);\n\t\tassertNull(\"Input value 40 is out of range [-10, 10]\", result);\n\t}", "void checkRange(Long value) throws TdtTranslationException {\r\n\t\tif (hasRange) {\r\n\t\t\tif ((value.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (value.compareTo(maximum) > 0)) {\r\n\t\t\t\tthrow new TdtTranslationException(\"Value {\" + value\r\n\t\t\t\t\t\t+ \"} out of range [{\" + minimum + \"},{\" + maximum\r\n\t\t\t\t\t\t+ \"}] in field \" + getId());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n Range range0 = Range.of(0L);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem0);\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem1);\n range0.iterator();\n Range.of((-1233L), 0L);\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem1, 0L, (-1233L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private int checkRange(int number,int range){\n return (number+range)%range;\n }", "public static void isValid(int i) throws IllegalArgumentException {\n\t//nothing to do here\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n Range.Builder range_Builder1 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(243L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n long long0 = 127L;\n Range range1 = Range.of((-636L), 127L);\n range1.isSubRangeOf(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private static boolean checkBy3 (int a) {\n return a % 3 == 0;\n }", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n Range.of(4294967296L);\n long long0 = 1264L;\n // Undeclared exception!\n try { \n Range.of(1321L, 1264L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "protected static void checkValue(Object value) {\n\tif (!(value instanceof java.lang.Long)) {\n throw new IllegalArgumentException(\"value is not a Long\");\n }\n }", "void validateValue(long val) {\n\n if ((min != null && val < min) || (max != null && val > max)) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Value, \");\n sb.append(val);\n sb.append(\", is outside of the allowed range\");\n throw new IllegalArgumentException(sb.toString());\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range0.isSubRangeOf(range1);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public static void checkValue(long candidate) throws ArithmeticException {\n if (candidate < MIN_INT_VALUE) {\n throw new ArithmeticException();\n }\n if (candidate > MAX_INT_VALUE) {\n throw new ArithmeticException();\n }\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n Range range0 = Range.of(range_CoordinateSystem0, (-1241L), 848L);\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public boolean d(String paramString)\n/* */ {\n/* 316 */ return a(paramString) <= -15;\n/* */ }", "private void checkRange(int index) {\n\t\tif (index < 0 || index >= array.length()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index \" + index + \" is out of bouds [0, \" + array.length() + \"]\");\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372032559808509L, 9223372036854775806L);\n // Undeclared exception!\n try { \n range0.split((-797L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private static boolean isValue(long x) {\n return x >= 0L; // 1\n }", "public boolean getMiss(int a)\r\n\t{\r\n\t\tif(Math.random()>(((double)a/(vlr+a))))\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n Range range0 = Range.of(32767L);\n Object object0 = new Object();\n boolean boolean0 = range0.equals(object0);\n assertFalse(boolean0);\n }", "private boolean validIndex(int index)\n {\n if(index >= 0 && index < songs.size())\n return true;\n else\n {\n System.out.println(\"not valid number as index\");\n return false;\n }\n }", "private boolean checkInteger(String str) {\n try {\n return Integer.parseInt(str) <= 30; // Check if the entered value is an Integer and <= 30;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, (-5250L), 2383L);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean isValidValue(String val) {\n for (int i = 2; i <= 10; i++) {\n if (val.equals(i + \"\")) {\n return true;\n }\n }\n return (val.equals(\"J\") || val.equals(\"Q\") || val.equals(\"K\") || val.equals(\"A\"));\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n long long0 = 2147483647L;\n Range.of(2147483647L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean isValidSeam(int[] a, int len, int range)\n {\n if (a.length != len || a[0] < 0 || a[0] > range)\n return false;\n for (int i = 1; i < len; i++)\n {\n if (a[i] < Math.max(0, a[i-1] -1) || a[i] > Math.min(range, a[i-1] +1))\n return false;\n }\n return true;\n }", "private boolean checkInt(String str) {\n\t\ttry {\n\t\t\tint integer = Integer.parseInt(str);\n\t\t\tif(integer>=0&&integer<100000){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean validateIndex(int index)\n {\n return index >= 0;\n }", "static int check(int x, int a, int b) \n\t{ \n\t\t// sum of digits is 0 \n\t\tif (x == 0) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (x > 0) \n\t\t{ \n\n\t\t\t// if any of digits in sum is \n\t\t\t// other than a and b \n\t\t\tif (x % 10 != a & x % 10 != b) \n\t\t\t{ \n\t\t\t\treturn 0; \n\t\t\t} \n\n\t\t\tx /= 10; \n\t\t} \n\n\t\treturn 1; \n\t}", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n long long0 = (-1L);\n Range range0 = Range.of((-1L));\n range0.getBegin();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.build();\n long long1 = 0L;\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getEnd();\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\n public void testIsInLimitLower() {\n Assertions.assertTrue(saab.isInLimit(.3, .9, .6));\n }", "private void checkStartLimit(int start, int limit) {\r\n if (start > limit) {\r\n throw new IllegalArgumentException(\r\n \"Start is greater than limit. start:\" + start + \"; limit:\" + limit);\r\n }\r\n if (start < 0) {\r\n throw new IllegalArgumentException(\"Start is negative. start:\" + start);\r\n }\r\n if (limit > length()) {\r\n throw new IllegalArgumentException(\"Limit is greater than length. limit:\" + limit);\r\n }\r\n }", "static boolean checkbetween(int n) {\n if(n>9 && n<101){\n return true;\n }\n else {\n return false;\n }\n \n }", "protected final boolean rangeTestFailed(int value) {\n\tboolean test1 =\n\t (reqminSet && (reqminClosed? (value < reqmin): (value <= reqmin)))\n\t || (minSet && (minClosed? (value < min): (value <= min)));\n\tboolean test2 =\n\t (reqmaxSet && (reqmaxClosed? (value > reqmax): (value >= reqmax)))\n\t || (maxSet && (maxClosed? (value > max): (value >= max)));\n\treturn (test1 || test2);\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n String string0 = \"]?&0A@\";\n range0.getLength();\n // Undeclared exception!\n try { \n Range.ofLength((-2524L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public boolean check(int value);", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n Range range0 = Range.ofLength(127L);\n Object object0 = new Object();\n boolean boolean0 = range0.equals(object0);\n assertFalse(boolean0);\n assertFalse(range0.isEmpty());\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n boolean boolean0 = range0.equals(range0);\n assertTrue(boolean0);\n assertFalse(range0.isEmpty());\n }", "@Override\n\t\t\tpublic boolean test(Integer t) {\n\t\t\t\tint tmp = t;\n\t\t\t\tif (tmp % 2 == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "private void checkRange(int index) {\n if ((index < 0 || index >= curSize))\n throw new IndexOutOfBoundsException(\"Index: \" + index + \" is out of bounds. Size = \" + size());\n }", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "private boolean isPosicaoFerrovia(int posicao) {\n return (posicao == 5 || posicao == 15 || posicao == 25 || posicao == 35);\n }", "private static boolean verify(int value, int size) {\r\n return size > 0 && size < Integer.SIZE\r\n && Integer.SIZE - Integer.numberOfLeadingZeros(value) <= size;\r\n }", "@Test\n public void testCondition2()\n {\n Double[] coordinates = {5.0, -5.0, 1.0};\n boolean pass = false;\n \n // TEST if an ArgumentOutOfBoundsException is thrown when a value < 0.0:\n try\n {\n _renderable.position(coordinates);\n }\n catch(ArgumentOutOfBoundsException e)\n {\n pass = true;\n }\n \n // TEST if an ArgumentOutOfBoundsException is thrown when a value > 10.0:\n if (pass)\n {\n pass = false;\n coordinates[1] = 10.1;\n try\n {\n _renderable.position(coordinates);\n }\n catch(ArgumentOutOfBoundsException e)\n {\n pass = true;\n }\n }\n \n if (!pass)\n fail(\"ArgumentOutOfBoundsException was not thrown\");\n }", "private static boolean special_optimization(String a)\n {\n int sum = 0;\n for(int x = 0; x < a.length(); x++)\n {\n sum += (find_value(\"\"+a.charAt(x)));\n }\n if(sum <= library.return_uppervalue() && sum >= library.return_lowervalue())\n return false;\n return true;\n }", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long0 = (-665L);\n long long1 = 14L;\n Range.Builder range_Builder0 = new Range.Builder(14L);\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(14L, (-665L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private boolean acceptedValueRange(double amount){\n if(amount <= 1.0 && amount >= 0.0){\n return true;\n }\n else{\n throw new IllegalArgumentException(\"Number must be in range of [0,1]\");\n }\n }", "boolean hasIntValue();", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n // Undeclared exception!\n try { \n range0.intersects((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\n\tpublic void testSet_Out_Range() {\n\t\t try {\n\t\t\t SET setarray= new SET( new int[]{-1,1002});\n\t\t }\n\t\t catch (Exception e) {\n\t\t\t assertEquals(\"Value out of range\", e.getMessage());\n\t\t }\n\t}", "@Test(timeout = 4000)\n public void test038() throws Throwable {\n Range range0 = Range.of(12599011L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n Range range1 = range0.asRange();\n Range.CoordinateSystem.values();\n // Undeclared exception!\n try { \n range1.intersection((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public static boolean isEven(int a) {\r\n //8th error redundancy ? wonder consider or not\r\n return a % 2 == 0;\r\n }", "boolean valueCheckMatch(String value) {\r\n\t\tif (value.length() > intLength) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (hasRange) {\r\n\t\t\tLong ulongValue = Long.valueOf(Long.parseLong(value));\r\n\t\t\tif ((ulongValue.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (ulongValue.compareTo(maximum) > 0)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void checkValue(BigDecimal candidate) throws ArithmeticException {\n if (candidate.compareTo(MIN_VALUE) < 0) {\n throw new ArithmeticException();\n }\n if (candidate.compareTo(MAX_VALUE) > 0) {\n throw new ArithmeticException();\n }\n }", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "private static boolean m3404a(int i) {\n boolean z;\n if (100 > i || i >= 200) {\n z = false;\n } else {\n z = true;\n }\n return (z || i == AppLovinErrorCodes.NO_FILL || i == 304) ? false : true;\n }", "private void valid_rc(int row, int col) {\n\t\tif (row < 1 || row > n || col < 1 || col > n) \r\n\t\t\tthrow new IllegalArgumentException(\"Index is outside its prescribed range\");\r\n\t}", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "private void checkRange(int i) throws IndexOutOfBoundsException {\n if (i < 0 || i >= size) {\n throw new IndexOutOfBoundsException();\n }\n }", "private boolean m116914a(int i) {\n return m116916b() && i >= this.f83727a.getItemCount();\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Amino;\n defaultNucleotideCodec0.encode(nucleotide0);\n int int0 = 15;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Range range0 = Range.ofLength(359L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range1 = Range.of(range_CoordinateSystem0, (-874L), (-874L));\n range0.isSubRangeOf(range1);\n // Undeclared exception!\n try { \n Range.ofLength((-2918L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private boolean determineValid(){\n for(Integer val : group){\n if(!racers.containsKey(val)){\n WrongNumber = val;\n return false;\n }\n }\n return true;\n }", "public static boolean checkNumber(int a[], int x) {\n\t\t\n \n if(a.length==1)\n {\n if(a[0]==x){\n return true;\n }\n else\n return false;\n \n }\n if(a[0]==x)\n return true;\n \n int arr[]=new int[a.length-1];\n for(int i=1;i<a.length;i++)\n {\n arr[i-1]=a[i];\n }\n \n boolean check = checkNumber(arr,x);\n return check;\n\t}", "private boolean checkInteger(byte buffer[], int sindex, int findex)\n {\n \t\t// 첫 글자를 체크한다. (+, -가 올수 있다.)\n \t\tbyte b = buffer[sindex];\n \t\tif ((b < 48) || (b > 57)) {\n \t\t\tif (b != 45)\n \t\t\t\tif (b != 43) return false;\n \t\t}\n \t\tfor (int i=sindex+1; i<findex; i++) {\n \tif ((buffer[i] < 48) || (buffer[i] > 57)) return false;\n \t\t}// end of for\n \t\treturn true;\n \t}", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n Object object0 = new Object();\n range0.endsBefore(range0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"[ 0 .. -1 ]/0B\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ 0 .. -1 ]/0B into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test \n\tpublic void testIfValueisWhitePiece()\n\t{\n \tData d = new Data();\n\t\tassertTrue(d.isWhite(59)); // 59 is the value of the 1st index of the array. \n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Range range0 = Range.of((-1259L));\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n long long0 = new Long((-1259L));\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range range3 = range1.asRange();\n String string0 = null;\n range3.intersection(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. -1258 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ -1259 .. -1258 ]/SB into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void testScanItemLowException(){\n instance.scanItem(-0.5);\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range.of(range_CoordinateSystem0, (-2147483648L), (-2147483648L));\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 3993L, (-2147483648L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private void RangeCheck(int index) {\r\n if (index >= size || index < 0)\r\n throw new IndexOutOfBoundsException(\"Index: \"+index+\", Size: \"+size);\r\n }", "private static boolean testGetAllowedValues(boolean a[]) {\r\n return a[0] && a[1] && a[2] && a[3] && !a[4] && a[5] && a[6] && a[7] && !a[8];\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckPositiveFailure() {\n Helper.checkPositive(0, \"obj\", \"method\", LogManager.getLog());\n }", "private boolean isResultadoDadoValido(int resultadoDado) throws Exception {\n if ((resultadoDado > 6) || (resultadoDado < 1)) {\n throw new Exception(\"Invalid die result\");\n }\n return true;\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Range range0 = Range.ofLength(0L);\n String string0 = range0.toString();\n assertEquals(\"[ 0 .. -1 ]/0B\", string0);\n \n Object object0 = new Object();\n boolean boolean0 = range0.isSubRangeOf(range0);\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.complementFrom(linkedList0);\n range1.intersects(range0);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"TGa_,[\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.TGa_,[\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n String string0 = \"]?&0A@\";\n range0.getLength();\n // Undeclared exception!\n try { \n range0.split(9223372032559808565L);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // given length -8589934487 would make range [9223372032559808565 - ? ] beyond max allowed end offset\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private boolean isAppropriated(int[] arr) {\n boolean is_correct = false;\n for (int i : arr) {\n if (i > 9999) {\n is_correct = true;\n } else\n is_correct = false;\n }\n return is_correct;\n }", "private void checkAnnoRateo() {\n\t\tif(req.getRateo().getAnno()>=primaNota.getBilancio().getAnno()){\n\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"L'anno del Rateo deve essere minore dell'anno della prima nota di partenza.\"));\n\t\t}\n\t}", "@Test\n\tpublic void testAddInRange() {\n\t\tInteger result = SimpleCalc.add(3, 5);\n\t\tassertEquals(new Integer(8), result);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateInteger_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegers(10, 0, 10, false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}" ]
[ "0.6007747", "0.5890609", "0.5780357", "0.57658994", "0.57599145", "0.57025915", "0.56595373", "0.56404954", "0.560988", "0.5582571", "0.555105", "0.55505806", "0.55314666", "0.5515112", "0.5502084", "0.54914904", "0.54708445", "0.5451678", "0.54354215", "0.5405738", "0.5404697", "0.54014766", "0.54009104", "0.54004836", "0.5391727", "0.53682023", "0.5337466", "0.53098124", "0.5308825", "0.5306823", "0.53046715", "0.53039736", "0.5302243", "0.5299195", "0.5297454", "0.529052", "0.5286432", "0.5282931", "0.52822596", "0.52789176", "0.5251895", "0.52433354", "0.52426744", "0.5233351", "0.5229987", "0.5225941", "0.52259135", "0.5214569", "0.52019674", "0.5197961", "0.51971287", "0.51929027", "0.5191938", "0.5189034", "0.5185731", "0.5182417", "0.517302", "0.51579857", "0.51540995", "0.514694", "0.5146739", "0.5146016", "0.5140651", "0.5124524", "0.5116621", "0.5107054", "0.5102793", "0.5098548", "0.5096071", "0.50925595", "0.5090332", "0.50902706", "0.508929", "0.5087457", "0.5085675", "0.50848687", "0.5080653", "0.5079949", "0.50783587", "0.50681704", "0.5066835", "0.5065781", "0.50650585", "0.5050234", "0.502549", "0.5025051", "0.50244397", "0.5023593", "0.50190645", "0.50178826", "0.5017623", "0.50158584", "0.50146514", "0.5012472", "0.5008761", "0.50048983", "0.5002798", "0.49995142", "0.4990508", "0.49823612" ]
0.65286475
0
Creates a new FieldAccessFlag with the given name and value.
protected FieldAccessFlag(String name, int value) { this.name = name; this.value = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FieldVisitor visitField(int access,\n String name,\n String desc,\n String signature,\n Object value) {\n Field f = new Field(access, className, name, desc, value);\n fields.verify(f);\n return super.visitField(access, name, desc, signature, value);\n }", "private Field(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public static Field makeAccessible(Class<?> o, String name) throws Exception {\n // Get field instance\n Field f = o.getDeclaredField(name);\n f.setAccessible(true);\n // Remove \"final\" modifier\n Field modifiersField = Field.class.getDeclaredField(\"modifiers\");\n modifiersField.setAccessible(true);\n modifiersField.setInt(f, f.getModifiers() & ~Modifier.FINAL);\n return f;\n }", "public static BitField<FsAccessOption> of(FsAccessOption... options) {\n return 0 == options.length ? NONE : BitField.of(options[0], options);\n }", "static Attribute createAttribute(String name, Field field) {\n\t\tAttribute attribute = new Attribute(name, field);\n\t\tattribute.setKind(Attribute.NONE);\n\t\tattribute.setPreferenceType(Attribute.GAIN);\n\t\treturn attribute;\n\t}", "public Builder setFlag(int value) {\n bitField0_ |= 0x00000400;\n flag_ = value;\n onChanged();\n return this;\n }", "static Attribute createAttribute(String name) {\n\t\treturn createAttribute(name, new IntegerFieldWrapper());\n\t}", "public Parameter(String name, String value, String access) {\n this.name = name;\n this.value = value;\n this.access = access;\n }", "public Field(int value) {\n\n if (isPowerOfTwo(value)) {\n this.value = value;\n } else {\n throw new IllegalArgumentException(\"Value has to be a power of 2\");\n }\n }", "public AbstractKerberosFlags( int value )\n {\n this.value = value;\n }", "public Attribute_New(String _name, String _value)\n {\n name = _name;\n\n List singleAttributList = new ArrayList<String>();\n singleAttributList.add(_value);\n\n }", "public Builder setField0(boolean value) {\n bitField0_ |= 0x00000001;\n field0_ = value;\n onChanged();\n return this;\n }", "public static int setFlag(int field, int pos, boolean value) {\n if(pos < 1 || pos > 32) {\n throw new IllegalArgumentException(\"Pos value is not defined between 1 and 32\");\n }\n\n long flag = (long) Math.pow(2, (pos-1));\n\n if(value) {\n field |= flag;\n } else {\n field &= ~flag;\n }\n return field;\n }", "@Override\n public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {\n return backClassVisitor.visitField(access, name, desc, signature, value);\n }", "public static long setFlag(long field, int pos, boolean value) {\n if(pos < 1 || pos > 64) {\n throw new IllegalArgumentException(\"Pos value is not defined between 1 and 64\");\n }\n\n long flag = (long) Math.pow(2, (pos-1));\n\n if(value) {\n field |= flag;\n } else {\n field &= ~flag;\n }\n return field;\n }", "FieldInstance fieldNamed(String name);", "Builder addAccessibilityFeature(String value);", "public static byte setFlag(byte field, int pos, boolean value) {\n if(pos < 1 || pos > 8) {\n throw new IllegalArgumentException(\"Pos value is not defined between 1 and 8\");\n }\n\n short flag = (short) Math.pow(2, (pos-1));\n\n if(value) {\n field |= flag;\n } else {\n field &= ~flag;\n }\n return field;\n }", "@FromString\n public DataField of(final String name) {\n try {\n return instance(name);\n } catch (final IllegalArgumentException e) {\n ArgumentChecker.notNull(name, \"name\");\n final DataField dataField = DataField.parse(name);\n return addInstance(dataField);\n }\n }", "public void addFlag(String f)\r\n {\r\n\ttry {\r\n\t addFlag(Flag.valueOf(f.toUpperCase()));\r\n\t}\r\n\tcatch(Exception e) {\r\n\t e.printStackTrace();\r\n\t}\r\n }", "public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }", "public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }", "public static short setFlag(short field, int pos, boolean value) {\n if(pos < 1 || pos > 16) {\n throw new IllegalArgumentException(\"Pos value is not defined between 1 and 16\");\n }\n\n int flag = (int) Math.pow(2, (pos-1));\n\n if(value) {\n field |= flag;\n } else {\n field &= ~flag;\n }\n return field;\n }", "private FileType(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "@Function Attr createAttribute(String name);", "public Field createFieldRef(Position pos, Expr receiver, Name name) {\n final Type type = receiver.type();\n X10FieldInstance fi = X10TypeMixin.getProperty(type, name);\n if (null == fi) {\n fi = (X10FieldInstance) type.toClass().fieldNamed(name);\n }\n if (null == fi) return null;\n return createFieldRef(pos, receiver, fi);\n }", "public Field set(String name, boolean open, boolean closable) {\n\t\tthis.closable = closable;\n\t\tsetOpen(open);\n\t\tsetName(name);\n\t\tupdateGrid();\n\t\treturn this;\n\t}", "Date timeField(String name, boolean isDefined, Date value)\n throws InvalidFieldValue;", "protected Attr attr(String name, String value){\n\t\tAttr a = doc.createAttribute(name);\n\t\ta.setValue(value);\n\t\treturn a;\n\t}", "public Builder setLoginFlag(int value) {\n \n loginFlag_ = value;\n onChanged();\n return this;\n }", "public RequestAttribute(String name, String value) {\n this.name = name;\n this.value = value;\n }", "FieldRefType createFieldRefType();", "public Builder setInstantiatePermission(starnamed.x.wasm.v1beta1.Types.AccessConfig value) {\n if (instantiatePermissionBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n instantiatePermission_ = value;\n onChanged();\n } else {\n instantiatePermissionBuilder_.setMessage(value);\n }\n\n return this;\n }", "public AttributeField(Field field){\n this.field = field;\n }", "FieldDefinition createFieldDefinition();", "public ActionChangeCheckBox(String name, Field field, boolean value) {\n\t\tsuper(\"Value (\" + value + \")\");\n\t\tthis.field = field;\n\t\tthis.value = value;\n\t\tthis.oldValue = (boolean) field.getValue();\n\t}", "int enumField(String name, boolean isDefined, int value,\n GPSEnumDefinition definition) throws NullField, InvalidFieldValue;", "public Flag(int x)\n\t{\n super(x);\n\t}", "public void giveFlag(Flag f)\r\n\t{\r\n\t\thasFlag = true;\r\n\t\tflag = f;\r\n\t}", "protected Attribute attribute(final QName name, final String value) {\n return new Attribute() {\n @Override\n public QName getName() {\n return name;\n }\n\n @Override\n public String getValue() {\n return value;\n }\n };\n }", "boolean boolField(String name, boolean isDefined, boolean value)\n throws NullField, InvalidFieldValue;", "@Override\n\tpublic void outAFieldAccessExpr(AFieldAccessExpr node) {\n\t\tType target = nodeTypes.get(node.getTarget());\n\t\tClassAttributes c = topLevelSymbolTable.get(target.getTypeName());\n\t\tVariableAttributes f = c.getField(node.getId().getText()); \n\t\til.append(fi.createGetField(getName(target), node.getId().getText(), getBecelType(f.getType())));\n\t\tunboxIt(f.getType()); \n\t}", "public MappingField createMappingField(String name) throws ModelException {\n MappingField field = (MappingField) getMappingField(name);\n\n if (field == null) {\n List fieldList = getMappingFieldsInternal();\n\n if (!fieldList.contains(field)) {\n try {\n fireVetoableChange(PROP_FIELDS, null, null);\n field = newMappingFieldInstance(name, this);\n fieldList.add(field);\n firePropertyChange(PROP_FIELDS, null, null);\n } catch (PropertyVetoException e) {\n throw new ModelVetoException(e);\n }\n }\n }\n\n return field;\n }", "Position positionField(String name, boolean isDefined, Position value)\n throws InvalidFieldValue;", "public ScopedSymbol(String name, Access access){\r\n\t\tObjects.nonNull(name);\r\n\t\tObjects.nonNull(access);\r\n\t\tthis.name = name;\r\n\t\tthis.access = access;\r\n\t}", "FieldType newFieldType(String id, ValueType valueType, QName name, Scope scope);", "public void initFlag(int val, int i) {\n flagVal = i;\n flag = val;\n }", "public void initFlag(int val, int i) {\n flagVal = i;\n flag = val;\n }", "FieldType newFieldType(ValueType valueType, QName name, Scope scope);", "public Field(String name, String type, VisibleDeclaration.visibility vis)\n {\n super(name, type, vis);\n }", "public j$a m18306a(String name, boolean value) {\n return m18292b(name, String.valueOf(value));\n }", "public XmlAttributeInfo (String name, XmlTextInfo value)\r\n {\r\n _name = name;\r\n _value = value;\r\n }", "public static Collection<FieldAccessFlag> getFlags()\n\t{\n\t\treturn Lists.newArrayList(PUBLIC, PRIVATE, PROTECTED, STATIC, FINAL, VOLATILE, TRANSIENT, ENUM,\n\t\t\tSYNTHETIC);\n\t}", "public XmlAttributeInfo (String name, XmlSpecialForm form)\r\n {\r\n _name = name;\r\n _value = new XmlTextInfo(form);\r\n }", "JApiModifier<AccessModifier> getAccessModifier();", "public Builder permissionFlag(final String flagPermission, String... specs) {\n return flag(input -> requiringPermission(new FlagElement(Text.of(input), null), flagPermission), specs);\n }", "public Value.Builder setAktif(boolean value) {\n validate(fields()[6], value);\n this.aktif = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "public Flag() {\n }", "public void setFlag( KerberosFlag flag )\n {\n int pos = MAX_SIZE - 1 - flag.getOrdinal();\n value |= 1 << pos;\n }", "public void setIvaFlag(String value) {\n setAttributeInternal(IVAFLAG, value);\n }", "DialogField createBooleanField( final Composite parent,\r\n final String text,\r\n final String name ) {\r\n BooleanDialogField result = new BooleanDialogField( parent, text );\r\n result.addDialogFieldListener( new IDialogFieldListener() {\r\n public void infoChanged( final Object newInfo ) {\r\n boolean selected = ( ( Boolean )newInfo ).booleanValue();\r\n getPreferenceStore().setValue( name, selected );\r\n }\r\n } );\r\n result.setInfo( getFromStore( name ) );\r\n return result;\r\n }", "public Builder setAuthAccountFlags(int value) {\n bitField0_ |= 0x00000200;\n authAccountFlags_ = value;\n onChanged();\n return this;\n }", "public static Field getAccess(Field field)\n {\n getAccess((AccessibleObject) field);\n if (Modifier.isFinal(field.getModifiers()))\n {\n try\n {\n Field modifiersField = Field.class.getDeclaredField(\"modifiers\");\n getAccess(modifiersField);\n modifiersField.setInt(field, field.getModifiers() & ~ Modifier.FINAL);\n }\n catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e)\n {\n throw new IllegalArgumentException(\"That shouldn't happend (0)\");\n }\n }\n return field;\n }", "public Flag()\n {\n super(\"Flag\");\n }", "public Cookie create_cookie(String name, String value){\n Cookie cookie = new Cookie(name,value);\n cookie.setHttpOnly(true);\n cookie.setMaxAge(-cookieExpiration);\n cookie.setPath(\"/\");\n return cookie;\n }", "Builder addAccessibilityFeature(Text value);", "public XmlAttributeInfo (String name)\r\n {\r\n this(name,XmlSpecialForm.value());\r\n }", "private boolean makeFieldAccessible(Field f)\n {\n // See: https://stackoverflow.com/questions/46454995/#58834966\n Method getModule;\n try\n {\n getModule = Class.class.getMethod(\"getModule\");\n }\n catch (NoSuchMethodException e)\n {\n // We are on Java 8\n getModule = null;\n }\n if (getModule != null)\n {\n try\n {\n Object thisModule = getModule.invoke(this.getClass());\n Method isNamed = thisModule.getClass().getMethod(\"isNamed\");\n if (!(boolean) isNamed.invoke(thisModule))\n {\n Class fieldClass = f.getDeclaringClass().getClass();\n Object fieldModule = getModule.invoke(fieldClass);\n Method addOpens = fieldModule.getClass().getMethod(\n \"addOpens\", String.class, thisModule.getClass());\n Method getPackageName = fieldClass.getMethod(\"getPackageName\");\n addOpens.invoke(fieldModule, getPackageName.invoke(fieldClass), thisModule);\n }\n }\n catch (Throwable t)\n {\n if (t instanceof InvocationTargetException)\n {\n InvocationTargetException e = (InvocationTargetException) t;\n if (e.getCause() != null\n && e.getCause().getClass().getName().endsWith(\"IllegalCallerException\"))\n {\n if (outputLogger != null)\n {\n outputLogger.debug(\n PROCESS_ATTRIBUTE_CHANGE_MESSAGE + e.getCause().getMessage(),\n this.getClass().getName());\n }\n t = null;\n }\n }\n if (t != null)\n {\n throw new CargoException(\"Cannot set field accessibility for [\" + f + \"]\", t);\n }\n return false;\n }\n }\n try\n {\n f.setAccessible(true);\n return true;\n }\n catch (Throwable t)\n {\n if (t.getClass().getName().endsWith(\"InaccessibleObjectException\"))\n {\n if (outputLogger != null)\n {\n outputLogger.debug(\n PROCESS_ATTRIBUTE_CHANGE_MESSAGE + t.getMessage(),\n this.getClass().getName());\n }\n t = null;\n }\n if (t != null)\n {\n throw new CargoException(\"Cannot set field accessibility for [\" + f + \"]\", t);\n }\n return false;\n }\n }", "public DataRecord(Long id, String name, Boolean visible, String value) {\n super(DataTable.DATA);\n\n set(0, id);\n set(1, name);\n set(2, visible);\n set(3, value);\n }", "public void setAttrib(String name, String value);", "ObjectField createObjectField();", "public j$a m18303a(String name, int value) {\n return m18292b(name, String.valueOf(value));\n }", "public static void attribute(String name, boolean value) {\n openAttribute(name); Log.write(value); closeAttribute();\n }", "public AccessControlField(Map<Long, String> permissions) {\n this(permissions, null);\n }", "public void setAccess(int nAccess)\n {\n ensureLoaded();\n m_flags.setAccess(nAccess);\n setModified(true);\n }", "public void setFlag(int which, boolean value) {\n if (value) {\n flags |= (1 << which); // set flag\n } else {\n flags &= ~(1 << which); // clear flag\n }\n }", "public FieldPredicate withName(String name) {\n this.name = name;\n return this;\n }", "@Override\n public void put(String name, boolean value) {\n emulatedFields.put(name, value);\n }", "Builder addAccessibilityControl(String value);", "public void setAccessibleName(String name) {\n // Not supported\n }", "public BooleanFieldEditor makeNewBooleanField(\n PreferencePage page, PreferencesTab tab,\n IPreferencesService service,\n String level, String key, String text, String toolTip,\n Composite parent,\n boolean isEnabled, boolean isEditable,\n boolean emptyValueAllowed, boolean emptyValue, boolean isRemovable)\n {\n Composite fieldHolder = new Composite(parent, SWT.NONE); \n fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\n BooleanFieldEditor field = new BooleanFieldEditor(page, tab, service, level, key, text, fieldHolder);\n\n field.setToolTipText(toolTip);\n if (level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() != null) {\n setField(field, fieldHolder);\n addBooleanPropertyChangeListeners(service, level, field, key, fieldHolder);\n } else {\n setField(field, fieldHolder);\n addBooleanPropertyChangeListeners(service, level, field, key, fieldHolder);\n }\n field.getChangeControl().setEnabled(isEnabled);\n // boolean controls have no setEditable() method\n\n // also cannot be empty\n //field.setEmptyValueAllowed(false);\n\n if (level == null) field.setRemovable(false);\n else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false);\n else field.setRemovable(isRemovable);\n\n initializeField(field, page);\n return field;\n }", "private JCVariableDecl makeAttributeListField(DiagnosticPosition diagPos, List<AttributeInfo> attrInfos) {\n ListBuffer<JCExpression> attrs = ListBuffer.lb();\n \n for (AttributeInfo ai : attrInfos) {\n if (ai.needsCloning()) {\n attrs.append(make.at(diagPos).Ident(ai.getName()));\n }\n }\n \n return make.at(diagPos).VarDef(make.Modifiers(Flags.PRIVATE), \n defs.attributesFieldName, \n make.TypeArray( toJava.makeTypeTree(abstractVariableType, diagPos) ), \n make.NewArray(toJava.makeTypeTree(abstractVariableType, diagPos), \n List.<JCExpression>nil(), attrs.toList()));\n }", "public void setFlag(RecordFlagEnum flag);", "public FieldInstruction setFieldName(String name) {\n return setField(getFieldDeclarerName(), name, getFieldTypeName());\n }", "public EditFieldParameter(String name, String value, boolean editable)\r\n\t{\r\n\t\tsuper(name);\r\n\t\tsetBorder(new EmptyBorder(2,0,2,0));\r\n\r\n\t\t// Constructs the text field\r\n\t\ttextField.setEditable(editable);\r\n\t\ttextField.setText(value);\r\n\t\ttextField.setFont(Consts.PARAMETER_EDIT_FONT);\r\n\t\tadd(textField);\r\n\t}", "FieldType createFieldType();", "public j$a m18302a(String name, float value) {\n return m18292b(name, String.valueOf(value));\n }", "public QuerySequence is(String fName, Boolean fValue) {\n child.add(new QueryChain(new IsBooleanFragmentFactory(fName), new QueryParameter(getFieldAlias(), fValue)));\n return getParent();\n }", "Field() {\n value = 0;\n }", "SchemaBuilder withFeature(String name, Boolean value);", "public CheckBox(String name, String value) {\n \t\tsuper();\n \t\tsetName(name);\n \t\tsetContent(value);\n \t\tsetChecked(false);\n \t\tsetInputType(INPUT_TYPE_CHECKBOX);\n \t}", "private DataType(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "@IgnoreForbiddenApisErrors(reason = \"SecurityManager is deprecated in JDK17\")\n\tprivate static Field getAccessible(Field original) {\n\t\tSecurityManager sm = System.getSecurityManager();\n\t\tif ( sm != null ) {\n\t\t\tsm.checkPermission( HibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS );\n\t\t}\n\n\t\tClass<?> clazz = original.getDeclaringClass();\n\n\t\treturn run( GetDeclaredField.andMakeAccessible( clazz, original.getName() ) );\n\t}", "Builder addName(Text value);", "public Builder setField1536(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1536_ = value;\n onChanged();\n return this;\n }", "Builder addAccessibilityAPI(String value);", "public void setreadFlag(Boolean value) {\r\n setAttributeInternal(READFLAG, value);\r\n }", "public Builder valueFlag(CommandElement value, String... specs) {\n return flag(input -> new FlagElement(Text.of(input), value), specs);\n }", "private boolean bindNewVariable(String name, Obj value) {\n if (name.equals(\"_\")) return true;\n \n // Bind the variable.\n return mScope.define(mIsMutable, name, value);\n }", "public LPDMODOMAttribute(String name, String value) {\n super(name, value);\n }" ]
[ "0.54275", "0.5250351", "0.5239819", "0.51748174", "0.51689965", "0.5167626", "0.5163932", "0.5124091", "0.50904804", "0.5043787", "0.50180787", "0.49475124", "0.49333283", "0.49236247", "0.48574197", "0.48451152", "0.4817695", "0.48130512", "0.47774506", "0.4777444", "0.4755636", "0.4755636", "0.4746029", "0.47339013", "0.4731179", "0.47240353", "0.47213814", "0.47155666", "0.47150636", "0.4709221", "0.4705198", "0.46603936", "0.46551067", "0.46297732", "0.46255553", "0.46183124", "0.46089503", "0.46049327", "0.46041802", "0.45990598", "0.45944253", "0.45826048", "0.4577153", "0.45491022", "0.4540214", "0.45370552", "0.453471", "0.453471", "0.45309857", "0.4529263", "0.4519227", "0.4509498", "0.44979626", "0.44883722", "0.44830093", "0.4482262", "0.44690672", "0.44632655", "0.4447057", "0.44418678", "0.44313097", "0.44244418", "0.44033274", "0.43957943", "0.4395606", "0.4395409", "0.43708923", "0.43689418", "0.43629754", "0.43620333", "0.43618053", "0.43520916", "0.43503386", "0.4340584", "0.4336613", "0.43235567", "0.43222427", "0.4319665", "0.43119904", "0.43061477", "0.43022713", "0.43002802", "0.42952138", "0.42931876", "0.4290745", "0.42902246", "0.4280145", "0.4276839", "0.4271136", "0.42671072", "0.4267066", "0.4264425", "0.42615408", "0.4258055", "0.42474666", "0.42392227", "0.4236498", "0.4231664", "0.4224086", "0.42176685" ]
0.7866837
0
Returns all possible FieldAccessFlags.
public static Collection<FieldAccessFlag> getFlags() { return Lists.newArrayList(PUBLIC, PRIVATE, PROTECTED, STATIC, FINAL, VOLATILE, TRANSIENT, ENUM, SYNTHETIC); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAccessFlags() {\n return access_flags;\n }", "public Set<Field> getFields() {\r\n \t\t// We will only consider private fields in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredFields(), source.getFields());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getFields());\r\n \t}", "public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }", "public int getFlags();", "public int getFlags();", "public FieldDeclaration[] getFields() {\n return m_classBuilder.getFields();\n }", "com.google.protobuf.FieldMask getFieldMask();", "public Enumeration getFields()\n {\n ensureLoaded();\n return m_tblField.elements();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDExposureField[] getFields();", "com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder();", "public static Field[] getAllFields (Class c)\n\t{\n\t\tList l = new ArrayList();\n\t\taddDeclaredFields(l, c);\n\t\t\n\t\tField[] fields = new Field[l.size()];\n\t\tfields = (Field[]) l.toArray(fields);\n\t\treturn fields;\n\t}", "long getFlags();", "public DBField[] getFields()\n {\n // Note: this method is called frequently\n if (!this.fieldArrayReady) {\n // optimize access to field array\n synchronized (this.fieldMap) {\n if (!this.fieldArrayReady) { // test again inside lock\n this.fieldArray = this.fieldMap.valueArray(DBField.class);\n this.fieldArrayReady = true;\n }\n }\n } \n return this.fieldArray;\n }", "public abstract Set<ResolvedFieldDeclaration> getDeclaredFields();", "public long getFlags() {\n }", "public static BitField<FsAccessOption> of(FsAccessOption... options) {\n return 0 == options.length ? NONE : BitField.of(options[0], options);\n }", "public static Field getAccess(Field field)\n {\n getAccess((AccessibleObject) field);\n if (Modifier.isFinal(field.getModifiers()))\n {\n try\n {\n Field modifiersField = Field.class.getDeclaredField(\"modifiers\");\n getAccess(modifiersField);\n modifiersField.setInt(field, field.getModifiers() & ~ Modifier.FINAL);\n }\n catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e)\n {\n throw new IllegalArgumentException(\"That shouldn't happend (0)\");\n }\n }\n return field;\n }", "public List<ResolvedFieldDeclaration> getAllFieldsVisibleToInheritors() {\n List<ResolvedFieldDeclaration> res = new LinkedList<>(this.getDeclaredFields().stream().filter(f -> f.accessSpecifier() != AccessSpecifier.PRIVATE).collect(Collectors.toList()));\n getDirectAncestors().forEach(a -> res.addAll(a.getAllFieldsVisibleToInheritors()));\n return res;\n }", "List<Field> getFields();", "public @Flags int getFlags() {\n return mFlags;\n }", "public static EnumSet<AccessFlag> fromMask(final int mask) {\r\n final EnumSet<AccessFlag> result = \r\n EnumSet.noneOf(AccessFlag.class);\r\n for (final AccessFlag flag : AccessFlag.values()) {\r\n if ((flag.value & mask) != 0) {\r\n result.add(flag);\r\n }\r\n }\r\n return result;\r\n }", "public MappingField[] getMappingFields() {\n List myFields = getMappingFieldsInternal();\n return (MappingField[]) myFields.toArray(\n new MappingField[myFields.size()]);\n }", "public int getAccess()\n {\n ensureLoaded();\n return m_flags.getAccess();\n }", "public FieldDescriptor[] getFields() {\n int size = attributeDescriptors.size();\n size += elementDescriptors.size();\n if (contentDescriptor != null) ++size;\n\n FieldDescriptor[] fields = new FieldDescriptor[size];\n int c = 0;\n for (int i = 0; i < attributeDescriptors.size(); i++)\n fields[c++] = (FieldDescriptor) attributeDescriptors.get(i);\n\n for (int i = 0; i < elementDescriptors.size(); i++)\n fields[c++] = (FieldDescriptor) elementDescriptors.get(i);\n\n if (contentDescriptor != null)\n fields[c] = contentDescriptor;\n\n return fields;\n }", "public int getFlags() {\n return flags;\n }", "@Override\n\tpublic int getFlags() {\n\t\treturn heldObj.getFlags();\n\t}", "public byte[] getFlags() {\n return flags;\n }", "IntsRef getFlags();", "public int getFlags() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 156);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 124);\n\t\t}\n\t}", "int getAuthAccountFlags();", "public ArrayList<GOlrField> getFields() {\n\n ArrayList<GOlrField> collection = new ArrayList<GOlrField>();\n\n // Plonk them all in to our bookkeeping.\n for (GOlrField field : unique_fields.values()) {\n collection.add(field);\n }\n\n return collection;\n }", "public BitField getBitField(){\n \treturn bitField;\n }", "@Override\n public java.util.List<Field> getFieldsList() {\n return fields_;\n }", "public EAdList<EAdField<?>> getFields() {\r\n\t\treturn fields;\r\n\t}", "java.util.List<Field>\n getFieldsList();", "public String[] getAllFilledAnnotationFields();", "private static Field[] retrieveAllFields(final Object object) {\r\n\t\tField[] fieldsArray = null;\r\n\r\n\t\t// - Retrieve fields array from cache if exists.\r\n\t\tif (KerAnnotation.fieldsCache.containsKey(object.getClass())) {\r\n\t\t\tfieldsArray = KerAnnotation.fieldsCache.get(object.getClass());\r\n\t\t}\r\n\t\t// - Else get fields and cache them.\r\n\t\telse {\r\n\t\t\t// - Aggregate all annotated fields (declared, inherited, etc.).\r\n\t\t\tfinal Set<Field> fields = new HashSet<Field>();\r\n\r\n\t\t\tfor (final Field field : object.getClass().getFields()) {\r\n\t\t\t\tif (field.getAnnotations().length > 0) {\r\n\t\t\t\t\tfields.add(field);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (final Field field : object.getClass().getDeclaredFields()) {\r\n\t\t\t\tif (field.getAnnotations().length > 0) {\r\n\t\t\t\t\tfields.add(field);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// - Convert set to array.\r\n\t\t\tfieldsArray = fields.toArray(new Field[0]);\r\n\r\n\t\t\t// - Cache array.\r\n\t\t\tKerAnnotation.fieldsCache.put(object.getClass(), fieldsArray);\r\n\t\t}\r\n\r\n\t\treturn fieldsArray;\r\n\t}", "ISourceField[] getFields();", "List<FieldRestrictions> fieldRestrictions();", "public Set<FieldInfo> getKeyFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_keys);\n }", "public Permission[] getPermissionsField() {\n\treturn super.getPermissions(null);\n }", "Fields fields();", "public int getFlags() {\n Object value = library.getObject(entries, FLAGS);\n if (value instanceof Number) {\n return ((Number) value).intValue();\n }\n return 0;\n }", "public short getFlags() {\n\treturn flags;\n }", "public ArrayList<Flag> getFlags()\r\n {\r\n\tif(flags.isEmpty()) {\r\n\t flags.add(Flag.NONE);\r\n\t}\r\n\treturn new ArrayList<Flag>(flags);\r\n }", "@Override\n public java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList() {\n return fields_;\n }", "@Override\n public Field getFields(int index) {\n return fields_.get(index);\n }", "@Override public final DeclContext$Fields $DeclContext$Fields() { return DeclContext$Flds; }", "public StructFieldElements getStructFieldAccess() {\r\n\t\treturn pStructField;\r\n\t}", "public Field[] getKeyFields();", "synchronized public Set<String> getFields() {\n return Collections.unmodifiableSet(new HashSet<>(fields));\n }", "@Test\n public void getFeatureFlagsTest() throws ApiException {\n String projectKey = null;\n String env = null;\n String tag = null;\n FeatureFlags response = api.getFeatureFlags(projectKey, env, tag);\n\n // TODO: test validations\n }", "public Set getAccessPathEdgeFields() {\n if (accessPathEdges == null) return Collections.EMPTY_SET;\n return accessPathEdges.keySet();\n }", "EnumSet<ViewExecutionFlags> getFlags();", "public String getFlags() {\r\n \t\treturn flags;\r\n \t}", "java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList();", "public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadPersonnelIdentification())\n\t\t\tpersonnel_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCentreDiagTraitDescription())\n\t\t\tcdt_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationRegionApprobation())\n\t\t\tapprouveeRegionFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationGtcApprobation())\n\t\t\tapprouveeGTCFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadDistrictSanteDescription())\n\t\t\tdistrictsante_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}", "java.lang.String getFields();", "public static boolean canAccessFieldsDirectly(){\n return false; //TODO codavaj!!\n }", "public Vector getAttributeFields() {\n\treturn attributeFields;\n }", "public List<AliasedField> getFields() {\r\n return fields;\r\n }", "@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" GAZOID, GAZFLD, GAZPVN, GAZTYP, GAZCLN, GAZCLS \";\n\t\treturn fields;\n\t}", "public Map<String, AllowableFieldEntry> getFieldMap() {\n return fieldMap;\n }", "public List<Field<T>> getFields()\r\n/* 63: */ {\r\n/* 64:84 */ return this.fields;\r\n/* 65: */ }", "public org.apache.axis.types.UnsignedInt getFlags() {\n return flags;\n }", "public List<AccountingLineViewField> getFields() {\n return fields;\n }", "public static String[] getBasicFields() {\n\t\t\tList<String> basicFields = new ArrayList<>();\n\t\t\t\n\t\t\tfor(SearchField field : SearchField.values()) {\n\t\t\t\tbasicFields.add(field.field + \".basic\");\n\t\t\t}\n\t\t\t\n\t\t\treturn basicFields.toArray(new String[basicFields.size()]);\n\t\t}", "public int getAuthAccountFlags() {\n return authAccountFlags_;\n }", "public Map<String, Object> getFields() {\n\t\treturn fields;\n\t}", "public KeyMask getKeyMask() {\r\n\t\treturn fieldKeyMask;\r\n\t}", "@Override\n public FieldOrBuilder getFieldsOrBuilder(\n int index) {\n return fields_.get(index);\n }", "public int getFileFlags() { return fileFlags; }", "public static Field[] getAllFields(Class forClass) {\r\n\t\tfinal List<Field> fields = new ArrayList<Field>();\r\n\t\tClass aktClass = forClass;\r\n\t\twhile (!aktClass.equals(Object.class)) {\r\n\t\t\tField[] tmp = aktClass.getDeclaredFields();\r\n\t\t\tfor (Field akt : tmp) {\r\n\t\t\t\tfields.add(akt);\r\n\t\t\t}\r\n\t\t\taktClass = aktClass.getSuperclass();\r\n\t\t}\r\n\t\treturn fields.toArray(new Field[fields.size()]);\r\n\t}", "private List getMappingFieldsInternal() {\n if (fields == null) {\n fields = new ArrayList();\n }\n\n return fields;\n }", "public Map<String, String> getFields() {\n return fields;\n }", "private static HashSet<Field> getAllFields(Class<?> cls) {\n // First, let's get all the super classes.\n HashSet<Class<?>> ancestors = getInstrumentedAncestors(cls);\n\n // Then, let's get all the fields of these classes.\n HashSet<Field> allFields = new HashSet<>();\n for (Class<?> ancestor : ancestors) {\n Collections.addAll(allFields, ancestor.getDeclaredFields());\n }\n return allFields;\n }", "ImmutableList<SchemaOrgType> getAccessibilityFeatureList();", "public ModbusAccess getAccess() {\r\n\t\treturn access;\r\n\t}", "public List<Field> iterateThroughAllFields() {\n\n List<Field> listOfFields = new ArrayList<Field>(fields.length * fields.length);\n // TODO: n**m complexity\n for (int i = 0; i < this.fields.length; i++) {\n for (int j = 0; j < this.fields.length; j++) {\n listOfFields.add(this.fields[i][j]);\n }\n }\n return listOfFields;\n }", "public DBField[] getKeyFields()\n {\n return this.priKeys; // should never be null\n }", "public java.util.List<Field> getFieldsList() {\n if (fieldsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(fields_);\n } else {\n return fieldsBuilder_.getMessageList();\n }\n }", "public HashMap<String, String> getFields() {\r\n \t\treturn fields;\r\n \t}", "int getModifiers();", "int getModifiers();", "public int getAuthAccountFlags() {\n return authAccountFlags_;\n }", "public int getAccess() {\n\t\treturn access;\n\t}", "public TIFFField[] getFields() {\n return fields;\n }", "com.google.protobuf.ByteString\n getFieldsBytes();", "private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }", "public List<Integer> getFreeFields() {\n List<Integer> freeFields = new ArrayList<>();\n for (int i = 1; i <= 9; i++) {\n if (getAt(i) == 0) {\n freeFields.add(i);\n }\n }\n return freeFields;\n }", "List<FieldNode> getFields() {\n return this.classNode.fields;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic List getFields(){\n\t\treturn targetClass.fields;\n\t}", "private Map<String,Field> getAllFields(Class clazz) {\n return this.getAllFields(clazz, false);\n }", "public List<String> getIndexedFields() {\n\t\t\tList<String> indexedFields = new ArrayList<>();\n\t\t\t\n\t\t\tindexedFields.add(field);\n\t\t\tindexedFields.add(field + \".folded\");\n\t\t\t\n\t\t\treturn indexedFields;\n\t\t}", "public java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList() {\n if (fieldsBuilder_ != null) {\n return fieldsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(fields_);\n }\n }", "public FieldLens getFieldLens() {\n return _mode.fieldLens();\n }", "protected Vector getUnmappedFields() {\r\n Vector fields = new Vector(1);\r\n if (isStoredInCache()) {\r\n fields.addElement(getWriteLockField());\r\n }\r\n return fields;\r\n }", "Field getFields(int index);", "public int getFlags() {\n return ByteUtils.toUnsignedShort(flags);\n }", "public List<ChunkData> getAccess() {\n return access;\n }" ]
[ "0.71113783", "0.66042125", "0.6147699", "0.6107978", "0.6107978", "0.6030945", "0.6001765", "0.5938815", "0.58930075", "0.58079493", "0.5807102", "0.57971776", "0.5756166", "0.57093996", "0.5702061", "0.56688684", "0.56564176", "0.5651163", "0.5649618", "0.56400245", "0.5602789", "0.5538969", "0.5532825", "0.5518694", "0.5512916", "0.5509116", "0.55060285", "0.54943305", "0.5468089", "0.54622096", "0.5452622", "0.5389654", "0.5374456", "0.53552204", "0.5346428", "0.5342765", "0.53420746", "0.53319424", "0.53233945", "0.5290263", "0.5289081", "0.52765244", "0.5272436", "0.5264362", "0.52315134", "0.5225427", "0.5208972", "0.519787", "0.51958144", "0.51606405", "0.5158327", "0.51559037", "0.5151904", "0.51415545", "0.5131117", "0.5123037", "0.51173186", "0.51164204", "0.51067144", "0.5092454", "0.50899243", "0.5086924", "0.50859845", "0.50840837", "0.50814766", "0.5062352", "0.50412506", "0.50372887", "0.50182223", "0.5010782", "0.50096935", "0.5007718", "0.500685", "0.4999869", "0.49936807", "0.498601", "0.49837396", "0.49796617", "0.49775362", "0.49717197", "0.4965556", "0.4961079", "0.495835", "0.495835", "0.49445453", "0.49334142", "0.49262837", "0.49247092", "0.49207973", "0.49200302", "0.4917281", "0.4907241", "0.49045116", "0.4902528", "0.48997605", "0.48973796", "0.48953152", "0.48925745", "0.48902923", "0.48895034" ]
0.81275547
0
Returns the name used to represent the flag in Java source code. For example, "public", "protected", etc ...
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFlagMethodName() {\n return m_flagMethodName;\n }", "public void setFlagMethodName(String name) {\n m_flagMethodName = name;\n }", "String getFlag() {\n return String.format(\"-T%d\", this.value);\n }", "public String getFlags() {\r\n \t\treturn flags;\r\n \t}", "String getSpareFlag();", "public String getFeatureFlagString() {\n return featureFlagString;\n }", "public String getFlaginfo() {\n return flaginfo;\n }", "java.lang.String getCodeName();", "int getFlag();", "String getJavaFieldName();", "@NonNls\n String getDebugName();", "@NonNls\n String getDebugName();", "public String getOutputFlag();", "public String getUseFlag() {\n return useFlag;\n }", "String getShortName();", "@Nullable\n public Set<NameFlag> getFlags() {\n return flags;\n }", "@VTID(17)\n java.lang.String getName();", "@Override\n public int getFlag() {\n return flag_;\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "public String getIsFlag() {\r\n return isFlag;\r\n }", "public String getToolFlags() throws BuildException ;", "@VTID(7)\r\n java.lang.String name();", "private String getGetMethodName() {\n assert name != null;\n if (field != null && (field.getType() == Boolean.class\n || \"boolean\".equals(field.getType().getName()))) {\n return \"is\" + upperFirstChar(name);\n }\n return \"get\" + upperFirstChar(name);\n }", "@Override\n public int getFlag() {\n return flag_;\n }", "public String getLocalFlag() {\n return (String)getAttributeInternal(LOCALFLAG);\n }", "@Override\n\tpublic String getFeatureName() {\n\t\treturn this.name();\n\t}", "public java.lang.String getName();", "String getName() ;", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();" ]
[ "0.7179086", "0.6296468", "0.6229729", "0.61131126", "0.60534436", "0.6050962", "0.59711236", "0.5966644", "0.5932875", "0.5874997", "0.5802879", "0.5802879", "0.570563", "0.57005525", "0.5694048", "0.5690475", "0.5686009", "0.5674492", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5673252", "0.5666683", "0.5661767", "0.56613976", "0.5652853", "0.56402916", "0.5637802", "0.5630308", "0.5609978", "0.5587758", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869", "0.5586869" ]
0.0
-1
Returns the value used to represent the flag in a Java class file.
public int getValue() { return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getFlag();", "public Integer getFLAG() {\n return FLAG;\n }", "public int getFlag()\n {\n return flag;\n }", "String getFlag() {\n return String.format(\"-T%d\", this.value);\n }", "public boolean getClassFlag() {\n return m_ClassFlag;\n }", "@Override\n public int getFlag() {\n return flag_;\n }", "@Override\n public int getFlag() {\n return flag_;\n }", "public int getFlags() {\n Object value = library.getObject(entries, FLAGS);\n if (value instanceof Number) {\n return ((Number) value).intValue();\n }\n return 0;\n }", "public String getFlaginfo() {\n return flaginfo;\n }", "public String getFlagMethodName() {\n return m_flagMethodName;\n }", "public String getOutputFlag();", "public String getCheckFlag() {\r\n return checkFlag;\r\n }", "public String getCheckFlag() {\n return checkFlag;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 473,\n FQN=\"llvm::Module::getCodeViewFlag\", NM=\"_ZNK4llvm6Module15getCodeViewFlagEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZNK4llvm6Module15getCodeViewFlagEv\")\n //</editor-fold>\n public /*uint*/int getCodeViewFlag() /*const*/ {\n ConstantAsMetadata /*P*/ Val = cast_or_null_ConstantAsMetadata(getModuleFlag(new StringRef(/*KEEP_STR*/\"CodeView\")));\n if (!(Val != null)) {\n return 0;\n }\n return $ulong2uint(cast_ConstantInt(Val.getValue()).getZExtValue());\n }", "public Integer getDefaultFlag() {\n return defaultFlag;\n }", "public int getRawFlag() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"0811c831-ddd9-4df1-b31c-c5d631e39389\");\n return rawFlag;\n }", "public short getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readShort(__io__address + 6);\n\t\t} else {\n\t\t\treturn __io__block.readShort(__io__address + 6);\n\t\t}\n\t}", "public Boolean getFlag() {\n return flag;\n }", "public long getFlags() {\n }", "public Character getCurrentFlag() {\n return currentFlag;\n }", "public boolean getFlag(){\n\t\treturn flag;\n\t}", "public String getIsFlag() {\r\n return isFlag;\r\n }", "public String getUseFlag() {\n return useFlag;\n }", "int getFlagImage() {\n return this.flagImage;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 323,\n FQN=\"llvm::Module::getModuleFlag\", NM=\"_ZNK4llvm6Module13getModuleFlagENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZNK4llvm6Module13getModuleFlagENS_9StringRefE\")\n //</editor-fold>\n public Metadata /*P*/ getModuleFlag(StringRef Key) /*const*/ {\n SmallVector<Module.ModuleFlagEntry> ModuleFlags/*J*/= new SmallVector<Module.ModuleFlagEntry>(8, new Module.ModuleFlagEntry());\n getModuleFlagsMetadata(ModuleFlags);\n for (final /*const*/ ModuleFlagEntry /*&*/ MFE : ModuleFlags) {\n if ($eq_StringRef(/*NO_COPY*/Key, MFE.Key.getString())) {\n return MFE.Val;\n }\n }\n return null;\n }", "public String getFlags() {\r\n \t\treturn flags;\r\n \t}", "public boolean getFlag() {\n\t\treturn flag;\n\t}", "long getFlags();", "String getSpareFlag();", "public abstract int flags();", "public int getFlags();", "public int getFlags();", "public int getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 20);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 12);\n\t\t}\n\t}", "public int getFlagsNumber ()\r\n {\r\n return flagsNumber;\r\n }", "public @Flags int getFlags() {\n return mFlags;\n }", "public short getFlags() {\n\treturn flags;\n }", "public Integer getdocverificationflag() {\n return (Integer) getAttributeInternal(DOCVERIFICATIONFLAG);\n }", "public String getFeatureFlagString() {\n return featureFlagString;\n }", "public int getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 4);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 4);\n\t\t}\n\t}", "public int getFileFlags() { return fileFlags; }", "char parseFlag(String rawFlag) {\n return parseFlags(rawFlag)[0];\n }", "public java.lang.String getJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String getActiveflag() {\n return (String)getAttributeInternal(ACTIVEFLAG);\n }", "public RecordFlagEnum getFlag();", "public int getConstant() {\n\t\treturn magicConstant;\n\t}", "int getFeatureValue();", "protected final int getStatusByte() {\r\n return ((this.carryFlag ? 0x01 : 0) + (this.zeroFlag ? 0x02 : 0) + (this.interruptFlag ? 0x04 : 0) + (this.decimalFlag ? 0x08 : 0) + (this.breakFlag ? 0x10 : 0) + 0x20 + (this.overflowFlag ? 0x40 : 0) + (this.signFlag ? 0x80 : 0));\r\n }", "int getIntFromBitFlag(int flag) {\r\n\t\tswitch (flag) {\r\n\t\tcase 1:\r\n\t\t\treturn 1;\r\n\t\tcase 2:\r\n\t\t\treturn 2;\r\n\t\tcase 3:\r\n\t\t\treturn 4;\r\n\t\tcase 4:\r\n\t\t\treturn 8;\r\n\t\tcase 5:\r\n\t\t\treturn 16;\r\n\t\tcase 6:\r\n\t\t\treturn 32;\r\n\t\tcase 7:\r\n\t\t\treturn 64;\r\n\t\tcase 8:\r\n\t\t\treturn 128;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"No flag specified in BaseRobot.getIntFromBitFlag\");\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public static Keywords getFlag(String s) {\n \tKeywords flag = flags.get(s.toLowerCase());\n \tif(flag == null) {\n \t\treturn Keywords.ERROR;\n \t}\n \treturn flag;\n }", "public String getClassCode() {\n\t\treturn classCode;\n\t}", "public java.lang.String getClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CLASSCODE$30);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public ClassConstant getClassConstant()\n {\n ensureLoaded();\n return m_clzName;\n }", "private static int getFlagValue (Shape shape)\r\n {\r\n switch (shape) {\r\n case FLAG_1:\r\n case FLAG_1_UP:\r\n return 1;\r\n\r\n case FLAG_2:\r\n case FLAG_2_UP:\r\n return 2;\r\n\r\n case FLAG_3:\r\n case FLAG_3_UP:\r\n return 3;\r\n\r\n case FLAG_4:\r\n case FLAG_4_UP:\r\n return 4;\r\n\r\n case FLAG_5:\r\n case FLAG_5_UP:\r\n return 5;\r\n }\r\n\r\n logger.error(\"Illegal flag shape: {}\", shape);\r\n\r\n return 0;\r\n }", "public Integer getCorrectflag() {\n return correctflag;\n }", "public int getToolFlag() {\r\n return toolFlag;\r\n }", "ClassVariable getClassVariable();", "public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }", "int getGlobalJitLevelValue();", "public int value() { return mode; }", "String getConstant();", "public Byte getShowFlag() {\n return showFlag;\n }", "public int getTrueValue()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start getTrueValue Method ***************/\n\n // Return true value\n return trueValue;\n\n }", "public void setFlag(Integer flag) { this.flag = flag; }", "public int getFlags() {\n return ByteUtils.toUnsignedShort(flags);\n }", "public int getFlags() {\n return flags;\n }", "public String getActiveFlag() {\n return (String) getAttributeInternal(ACTIVEFLAG);\n }", "public Byte getModFlag() {\n return modFlag;\n }", "public String getLocalFlag() {\n return (String)getAttributeInternal(LOCALFLAG);\n }", "java.lang.String getConstantValue();", "public Coding classValue() {\n return getObject(Coding.class, FhirPropertyNames.PROPERTY_CLASS);\n }", "public Coding classValue() {\n return getObject(Coding.class, FhirPropertyNames.PROPERTY_CLASS);\n }", "public String getJava() {\n return null; //To change body of implemented methods use File | Settings | File Templates.\n }", "public Integer getUserFlags() {\r\n return userFlags;\r\n }", "public static DataType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase CLASS_NAME: return CLASS_NAME_LITERAL;\n\t\t\tcase METHOD_NAME: return METHOD_NAME_LITERAL;\n\t\t\tcase METHOD_SIG: return METHOD_SIG_LITERAL;\n\t\t\tcase THIS_OBJECT: return THIS_OBJECT_LITERAL;\n\t\t\tcase ARGS: return ARGS_LITERAL;\n\t\t\tcase RETURNED_OBJECT: return RETURNED_OBJECT_LITERAL;\n\t\t\tcase IS_FINALLY: return IS_FINALLY_LITERAL;\n\t\t\tcase EXCEPTION_OBJECT: return EXCEPTION_OBJECT_LITERAL;\n\t\t\tcase STATIC_FIELD: return STATIC_FIELD_LITERAL;\n\t\t\tcase CLASS_SOURCE_FILE: return CLASS_SOURCE_FILE_LITERAL;\n\t\t\tcase METHOD_NAMES: return METHOD_NAMES_LITERAL;\n\t\t\tcase METHOD_LINE_TABLES: return METHOD_LINE_TABLES_LITERAL;\n\t\t\tcase METHOD_NUMBER: return METHOD_NUMBER_LITERAL;\n\t\t\tcase EXECUTABLE_UNIT_NUMBER: return EXECUTABLE_UNIT_NUMBER_LITERAL;\n\t\t\tcase PREVIOUS_UNIT_NUMBER: return PREVIOUS_UNIT_NUMBER_LITERAL;\n\t\t}\n\t\treturn null;\n\t}", "public int getBit(int pos) {\r\n\t\treturn flagBits[pos];\r\n\t\t\r\n\t}", "public String getValidflag() {\n\t\treturn validflag;\n\t}", "public String getCompAccomFlag() {\n return (String)getAttributeInternal(COMPACCOMFLAG);\n }", "public String getApprovedFlag() {\r\n return (String) getAttributeInternal(APPROVEDFLAG);\r\n }", "public String getValidflag() {\n return validflag;\n }", "public String getValidflag() {\n return validflag;\n }", "@Field(11) \n\tpublic byte CombOffsetFlag() {\n\t\treturn this.io.getByteField(this, 11);\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Constants.h\", line = 1234,\n FQN=\"llvm::UndefValue::classof\", NM=\"_ZN4llvm10UndefValue7classofEPKNS_5ValueE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Constants.cpp -nm=_ZN4llvm10UndefValue7classofEPKNS_5ValueE\")\n //</editor-fold>\n public static boolean classof(/*const*/ Value /*P*/ V) {\n return V.getValueID() == ValueTy.UndefValueVal.getValue();\n }", "public ResourceFileFeatureValue resourceFileFeatureValue() {\n _initialize();\n return resourceFileFeatureValue;\n }", "ForumFlag getFlag();", "public String getPackagedJava();", "public Flag()\n {\n super(\"Flag\");\n }", "int getOptLevelValue();", "public boolean get(Flag flag) {\n return bits.get(flag.getId());\n }", "private String getFlagValue(String flag, String defaultValue){\n \treturn (flag == null) ? defaultValue : flag;\n }", "public char flags_GET()\n { return (char)((char) get_bytes(data, 0, 1)); }", "String constant();", "public String getSignFlag() {\n return signFlag;\n }", "int getCodeValue();", "public boolean getFlag() {\r\n\t\treturn (value.getInt() != 0);\r\n\t}", "public String classFlagTipText() {\n return \"If set to TRUE, lists the cluster as an extra attribute.\";\n }", "public static int getBit(boolean value) {\n return value ? Constants.BIT_TRUE : Constants.BIT_FALSE;\n }", "String getJavaFieldName();", "public String getFabConst() {\n return (String)getAttributeInternal(FABCONST);\n }", "public long getClassVersion() {\n \t\treturn classVersion;\n \t}", "public String getChangedflag() {\n return (String) getAttributeInternal(CHANGEDFLAG);\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }" ]
[ "0.63519084", "0.6340455", "0.61765075", "0.60893303", "0.5939958", "0.5883051", "0.58156866", "0.58090806", "0.5738948", "0.5713693", "0.5698474", "0.5670556", "0.566885", "0.56419235", "0.56331676", "0.56326836", "0.56025374", "0.55763566", "0.5557601", "0.5554418", "0.5529852", "0.5516224", "0.5515132", "0.5490497", "0.5476638", "0.5466399", "0.5442341", "0.5436792", "0.5428466", "0.5418973", "0.5387246", "0.5387246", "0.5378337", "0.5369174", "0.5353814", "0.5349476", "0.53440964", "0.53403586", "0.5329501", "0.5329321", "0.53125393", "0.5297351", "0.52953905", "0.5272807", "0.5271306", "0.5261055", "0.52506244", "0.5249601", "0.5246165", "0.5245365", "0.5234632", "0.5228057", "0.5226953", "0.52137494", "0.51989764", "0.51890683", "0.5188636", "0.5187947", "0.51766336", "0.5150323", "0.5138776", "0.51333165", "0.51195043", "0.5106029", "0.5102243", "0.50952005", "0.50922155", "0.5085256", "0.50820965", "0.5067954", "0.5060551", "0.5053279", "0.5048599", "0.5033146", "0.50159603", "0.50084895", "0.5005469", "0.5003297", "0.49975193", "0.49975193", "0.49970394", "0.4961076", "0.49604774", "0.49496973", "0.4947434", "0.49473533", "0.4945244", "0.4940421", "0.49350366", "0.49263588", "0.49245328", "0.49210027", "0.4915576", "0.49148753", "0.49070144", "0.4890836", "0.488125", "0.48782355", "0.4875435", "0.48731482", "0.4868417" ]
0.0
-1
Methods to Check if the property is INVALID.
boolean isEnvironmentInvalid() { return StringUtils.isBlank(environment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isInvalid() {\n\t\treturn invalid;\n\t}", "public boolean wasInvalid() {\n return this.invalid;\n }", "@Override\n\t\tpublic boolean isInvalid() {\n\t\t\treturn false;\n\t\t}", "public Integer getIsInvalid() {\n return isInvalid;\n }", "Boolean getIsValid();", "public void setInvalid();", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "public boolean isInvalid() {\n\t\treturn Double.isNaN(x) || Double.isNaN(y) || Double.isNaN(z);\n\t}", "@Override\n\t\tpublic void validate() throws ValidationError {\n\t\t\tif (newValueOfPropertyToChange < 0) {\n\t\t\t\tthrow new TestFailure(\"propertyToChange is not ok\");\n\t\t\t}\n\t\t}", "public boolean isPropertyMissing() {\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\t}", "public boolean isValid() {\n\t\treturn false;\n\t}", "public boolean isValidated() throws Exception\r\n {\n return false;\r\n }", "private void assertInvalid(Object obj, String expectedProperty, String expectedErrMsg, Object expectedValue){\n //run validator on car object and store the resulting violations in a collection\n Set<ConstraintViolation<Object>> constraintViolations = validator.validate( obj );\n\n //count how many violations - SHOULD ONLY BE 1\n assertEquals( 1, constraintViolations.size() );\n\n //get first violation from constraintViolations collection\n ConstraintViolation<Object> violation = constraintViolations.iterator().next();\n\n //ensure that expected property has the violation\n assertEquals( expectedProperty, violation.getPropertyPath().toString() );\n\n //ensure error message matches what is expected\n assertEquals( expectedErrMsg, violation.getMessage() );\n\n //ensure the invalid value is what was set\n assertEquals( expectedValue, violation.getInvalidValue() );\n }", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "@java.lang.Override\n public boolean getValid() {\n return valid_;\n }", "public boolean wasValid() {\n return !wasInvalid();\n }", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "@java.lang.Override\n public boolean getValid() {\n return valid_;\n }", "public SELF isInvalid() {\n validationError();\n return myself;\n }", "public boolean hasErr() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isValid()\n\t{\n\t\treturn false;\n\t}", "public void verifyNoMatching(AcProperty e)\n {\n }", "public boolean hasErr() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "void validateProperties() {\n super.validateProperties();\n validatePropertySet(\"token\", getToken());\n }", "public boolean valid() {\n return valid;\n }", "public boolean isNoLongerValid() {\n return !this.isAlwaysValid();\n }", "@Test\n\tpublic void testValidateInvalidWrongType() {\n\t\tRapidBean bean = createTestBean(\"Bl�mel\", \"Martin\", \"19641014\");\n\t\tPropertyCollection prop = this.createCollectionProperty(\n\t\t\t\t\"<property name=\\\"test\\\"\" + \" targettype=\\\"org.rapidbeans.test.TestBean\\\"\" + \" />\");\n\t\ttry {\n\t\t\tprop.validate(bean);\n\t\t\tAssert.fail(\"expected ValidationException\");\n\t\t} catch (ValidationException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t}", "public boolean isValid() {\n return true;\n }", "public void check() {\n\t\tif (!hasAnimVal) {\n\t\t\tif (baseVal == null) {\n\t\t\t\tbaseVal = new BaseSVGPointList();\n\t\t\t}\n\t\t\tbaseVal.revalidate();\n\t\t\tif (baseVal.missing) {\n\t\t\t\tthrow new LiveAttributeException(element, localName, LiveAttributeException.ERR_ATTRIBUTE_MISSING,\n\t\t\t\t\t\tnull);\n\t\t\t}\n\t\t\tif (baseVal.malformed) {\n\t\t\t\tthrow new LiveAttributeException(element, localName, LiveAttributeException.ERR_ATTRIBUTE_MALFORMED,\n\t\t\t\t\t\tbaseVal.getValueAsString());\n\t\t\t}\n\t\t}\n\t}", "public void validate() {\n\t\tthis.invalidated = false;\n\t}", "boolean getValid();", "public boolean isValid() {\n return true;\n }", "public boolean isValid() {\n return true;\n }", "private boolean isValid() throws InvalidStateException{\n if (this.homeTeam == null || this.visitingTeam == null){\n return false;\n }else{\n return true;\n }\n }", "public boolean hasValidPoint() {\n return mPoint.x != 0 || mPoint.y != 0;\n }", "public boolean isValid() {\n return message == null;\n }", "public boolean isValid()\r\n {\r\n //Override this method in MediaItem object\r\n return getSemanticObject().getBooleanProperty(swb_valid,false);\r\n }", "public String getIsValid() {\n return isValid;\n }", "@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }", "@Override\n\tpublic boolean validObject() {\n\t\treturn valid;\n\t}", "protected void checkValidity(Epml epml) {\n\t}", "public boolean isValid()\n {\n return valid;\n }", "public Boolean valid() {\n\t\treturn this.getMeasuredBy()!=null && this.getMeasuredBy().valid();\n\t}", "public boolean getValidity();", "public boolean isValid() {\n return _id != null && !_id.isEmpty() &&\n _name != null && !_name.isEmpty() &&\n _created != null && !_created.isEmpty();\n }", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "public boolean isValid() {\n return valid;\n }", "public boolean isValid() {\n return valid;\n }", "public boolean isValid() {\n return valid;\n }", "public boolean isValid() {\n return instance != null;\n }", "public boolean isValid() {\n return valid;\n }", "private boolean isInvalid(JTextField campo) {\n return campo.getText().isEmpty();\n }", "public Boolean valid() {\n return valid;\n }", "public boolean hasErrorInfo() {\n return fieldSetFlags()[4];\n }", "@Test(expected=AssertionError.class)\n\tpublic void testPassInvalidToSettersAddress() {\n\t\tbeanTester.testSetterForField(\"invalid\");\n\t}", "public boolean hasError() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean valid(Object obj) {\n return !validator.valid(obj);\n }", "public static void validateProperty(RuleTemplateProperty ruleTemplateProperty) throws TemplateManagerException { //todo: conversion null pointer exception\n if (ruleTemplateProperty.getDefaultValue() == null) {\n // todo: throw exception\n }\n if (ruleTemplateProperty.getType().equals(\"option\") && (ruleTemplateProperty.getOptions() == null || ruleTemplateProperty.getOptions().size() < 1)) {\n // todo: throw exception\n }\n }", "public boolean hasError() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasError() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean validate() {\n if (value == null || currencyCode == null) {\n return false;\n }\n return true;\n }", "public boolean isCValueValid();", "public boolean isValid(){\n\t\treturn true;\n\t}", "private static void checkValidity(boolean valid) throws InvalidExpression\r\n {\r\n if(!valid)\r\n {\r\n throw new InvalidExpression(\"The expression entered is not valid\");\r\n }\r\n }", "public boolean hasError() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public Boolean validateBoundaryFields(Property property, String field, RequestInfo requestInfo)\n\t\t\tthrows InvalidPropertyBoundaryException {\n\n\t\tPropertyLocation propertyLocation = property.getBoundary();\n\t\tLong id;\n if (field.equalsIgnoreCase(env.getProperty(\"revenue.boundary\"))) {\n\t\t\tid = propertyLocation.getRevenueBoundary().getId();\n\t\t} else if (field.equalsIgnoreCase(env.getProperty(\"location.boundary\"))) {\n\t\t\tid = propertyLocation.getLocationBoundary().getId();\n\t\t} else {\n\t\t\tid = propertyLocation.getAdminBoundary().getId();\n\t\t}\n return boundaryRepository.isBoundaryExists(property, requestInfo, id);\n\t\t\n\t}", "public boolean isValidItem() {\n return validItem;\n }", "public boolean isValid() {\n\t\treturn valid;\n\t}", "public boolean isValid()\n {\n return valid;\n }", "@Test(expected=AssertionError.class)\n\tpublic void testPassInvalidFieldToGettersAddress() {\n\t\tbeanTester.testGetterForField(\"invalid\");\n\t}", "private boolean validPropertyExceptions(Method paramMethod) {\n/* 492 */ Class[] arrayOfClass = paramMethod.getExceptionTypes();\n/* */ \n/* 494 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 495 */ Class clazz = arrayOfClass[b];\n/* */ \n/* 497 */ if (isCheckedException(clazz) && !isRemoteException(clazz)) {\n/* 498 */ return false;\n/* */ }\n/* */ } \n/* 501 */ return true;\n/* */ }", "public boolean isValid(){\n\t\treturn valid;\n\t}", "public boolean isValid() {\n // TODO: Question 2.2.\n \n return false;\n }", "@Override\n public boolean isLenientProperties() {\n return true;\n }", "public boolean hasError() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasError() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasErrorMessage() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "boolean valid() {\n boolean valid = true;\n\n if (!isAgencyLogoPathValid()) {\n valid = false;\n }\n if (!isMemFieldValid()) {\n valid = false;\n }\n if (!isLogNumFieldValid()) {\n valid = false;\n }\n\n return valid;\n }", "protected void validate() throws Exception{\t\n\t\tsuper.validate();\n\t\tvalidateProperty(PROPERTY_KEY_USERNAME);\n\t}", "private void assert_validPID(int pid) throws IllegalArgumentException{\n\t\tif(!validPID(pid)){\n\t\t\tthrow new IllegalArgumentException(\"Tried to get a property from layer '\"+ name\n\t\t\t\t\t+\"' with an invalid property ID: \"+pid);\n\t\t}\n\t}", "public boolean hasErrorMessage() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public boolean isInputValid()\n {\n String[] values = getFieldValues();\n if(values[0].length() > 0 || values[1].length() > 0 || values[2].length() > 0)\n return true;\n else\n return false;\n }", "boolean getPossiblyBad();", "public boolean isValid() {\n \t\treturn valid;\n \t}", "public boolean hasProperty() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "boolean checkValidity();", "public boolean isValid() {\r\n/* */ try {\r\n/* 326 */ validate();\r\n/* 327 */ } catch (ValidationException vex) {\r\n/* 328 */ return false;\r\n/* */ } \r\n/* 330 */ return true;\r\n/* */ }", "protected boolean isValidating() {\n return (mValidator != null);\n }", "public boolean isValid() {\n boolean isvalid = true;\n\n if (java.lang.Double.isInfinite(x) || java.lang.Double.isNaN(x) || java.lang.Double.isInfinite(y) || java.lang.Double.isNaN(y) || java.lang.Double.isInfinite(width) || java.lang.Double.isNaN(width) || java.lang.Double.isInfinite(height)\n || java.lang.Double.isNaN(height)) {\n isvalid = false;\n }\n\n return isvalid;\n }", "public String getInvalidName() {\n return invalidName;\n }", "public boolean isDataValid() {\r\n return validData;\r\n }", "protected boolean isValid() {\n \t\treturn valid;\n \t}", "public Date getInvalidDate() {\n return invalidDate;\n }", "protected boolean validateProperties() throws IOException, Throwable {\n return (disableDNS() &&\n rebootAndWait(\"all\") &&\n changeProps() &&\n enableDNS() &&\n rebootAndWait(\"all\"));\n }" ]
[ "0.7163342", "0.6755404", "0.6742115", "0.6682884", "0.6492848", "0.64349335", "0.64011395", "0.6266327", "0.62555367", "0.61358565", "0.61353433", "0.61313146", "0.61015743", "0.6088631", "0.6088631", "0.6088631", "0.60682803", "0.6055246", "0.60535264", "0.6042677", "0.6018087", "0.60089487", "0.599786", "0.59893906", "0.59850925", "0.5954449", "0.5943673", "0.5868014", "0.5864902", "0.5862059", "0.585682", "0.58553666", "0.58514225", "0.5846842", "0.5845906", "0.5843515", "0.5843515", "0.58364147", "0.5833707", "0.5831347", "0.58259434", "0.5804373", "0.57941025", "0.5766113", "0.5763057", "0.57625633", "0.5761043", "0.5752367", "0.57430565", "0.5736415", "0.5733206", "0.5733206", "0.5733206", "0.57325584", "0.5728786", "0.5723106", "0.5720229", "0.571132", "0.57031804", "0.57028246", "0.570256", "0.56980413", "0.56925166", "0.56925166", "0.5687501", "0.56827134", "0.5682019", "0.56775886", "0.5677009", "0.5676407", "0.5675428", "0.56732047", "0.56726396", "0.56714773", "0.56676084", "0.5665613", "0.5661797", "0.56616414", "0.5661476", "0.5661476", "0.56604064", "0.56550324", "0.5654277", "0.5652704", "0.5649561", "0.56448525", "0.56448525", "0.56448525", "0.5644631", "0.5637503", "0.5633081", "0.5631463", "0.56299084", "0.5629495", "0.56251496", "0.56210613", "0.56046593", "0.5603833", "0.55988806", "0.5596731", "0.55851513" ]
0.0
-1
Methods to Check if the property is Valid.
boolean isApiKeyValid() { return StringUtils.isNotBlank(apiKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Boolean getIsValid();", "@java.lang.Override\n public boolean getValid() {\n return valid_;\n }", "@java.lang.Override\n public boolean getValid() {\n return valid_;\n }", "public boolean isValid() {\n\t\treturn valid;\n\t}", "public boolean isValid() {\n return valid;\n }", "public boolean isValid() {\n return valid;\n }", "public boolean isValid() {\n return valid;\n }", "public boolean isValid()\n {\n return valid;\n }", "public boolean isValid(){\n\t\treturn valid;\n\t}", "public boolean isValid() {\n return true;\n }", "public boolean isValid() {\n return true;\n }", "public boolean isValid() {\n return valid;\n }", "boolean getValid();", "public boolean isValid()\n {\n return valid;\n }", "public boolean isValid() {\n return true;\n }", "public boolean isValid() {\n \t\treturn valid;\n \t}", "public boolean isValid() {\r\n\t\treturn isValid;\r\n\t}", "public boolean isValid() {\n \t\treturn fValid;\n \t}", "public boolean isValid(){\n\t\treturn true;\n\t}", "public boolean isValid() {\n\t\treturn(m_valid);\n\t}", "public boolean isValid(){\r\n\t\t\r\n\t\t// TODO\r\n\t\t\r\n\t\treturn true;\r\n\t}", "protected boolean isValid() {\n \t\treturn valid;\n \t}", "public boolean isValid();", "public boolean isValid();", "public boolean isValid();", "public boolean isValid();", "public boolean isValid();", "public boolean isValid() {\n return isValid;\n }", "public boolean isValid() {\n return isValid;\n }", "public boolean valid() {\n return valid;\n }", "public boolean isValid()\n\t{\n\t\treturn false;\n\t}", "public boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validObject() {\n\t\treturn valid;\n\t}", "public Boolean getValid() {\n\t\treturn valid;\n\t}", "protected boolean isValidating() {\n return (mValidator != null);\n }", "public Boolean valid() {\n return valid;\n }", "protected boolean isValid()\r\n {\r\n \treturn true;\r\n }", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "public Boolean valid() {\n\t\treturn this.getMeasuredBy()!=null && this.getMeasuredBy().valid();\n\t}", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "public boolean isValid() {\n return instance != null;\n }", "public boolean isValid()\n {\n synchronized (lock)\n {\n return valid;\n }\n }", "public boolean wasValid() {\n return !wasInvalid();\n }", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "public synchronized boolean isValid() {\n\n\t\treturn isBaseClassValid() && isRangeValid() && super.isValid();\n\t}", "public boolean isValid() {\n // TODO: Question 2.2.\n \n return false;\n }", "boolean checkValidity();", "boolean valid() {\n boolean valid = true;\n\n if (!isAgencyLogoPathValid()) {\n valid = false;\n }\n if (!isMemFieldValid()) {\n valid = false;\n }\n if (!isLogNumFieldValid()) {\n valid = false;\n }\n\n return valid;\n }", "public boolean getValidity();", "public boolean isValid()\r\n {\r\n //Override this method in MediaItem object\r\n return getSemanticObject().getBooleanProperty(swb_valid,false);\r\n }", "public boolean isValid() {\n return this.validate().isEmpty();\n }", "public String getIsValid() {\n return isValid;\n }", "public boolean validate() {\n return true;\n }", "public boolean validate() {\n return true;\n }", "public boolean isValid() {\r\n\treturn bValid;\r\n}", "void checkValid();", "public boolean isCValueValid();", "public boolean isValidated(){\n return getValidatedFlag();\n }", "public boolean isValidated() throws Exception\r\n {\n return false;\r\n }", "public boolean isValid()\r\n {\r\n try {\r\n validate();\r\n }\r\n catch (org.exolab.castor.xml.ValidationException vex) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isValid()\r\n {\r\n try {\r\n validate();\r\n }\r\n catch (org.exolab.castor.xml.ValidationException vex) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isValid()\r\n {\r\n try {\r\n validate();\r\n }\r\n catch (org.exolab.castor.xml.ValidationException vex) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isValid()\r\n {\r\n try {\r\n validate();\r\n }\r\n catch (org.exolab.castor.xml.ValidationException vex) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isValid()\r\n {\r\n try {\r\n validate();\r\n }\r\n catch (org.exolab.castor.xml.ValidationException vex) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean validate() {\n if (value == null || currencyCode == null) {\n return false;\n }\n return true;\n }", "public boolean isValid()\r\n {\r\n \treturn this.vp.data != null;\r\n }", "public boolean isValid() {\r\n/* */ try {\r\n/* 326 */ validate();\r\n/* 327 */ } catch (ValidationException vex) {\r\n/* 328 */ return false;\r\n/* */ } \r\n/* 330 */ return true;\r\n/* */ }", "protected abstract boolean isValid();", "public boolean isValid() {\n try {\n validate();\n } catch (org.exolab.castor.xml.ValidationException vex) {\n return false;\n }\n return true;\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "public boolean isValid()\n {\n try {\n validate();\n }\n catch (org.exolab.castor.xml.ValidationException vex) {\n return false;\n }\n return true;\n }", "public boolean isValid()\n {\n try {\n validate();\n }\n catch (org.exolab.castor.xml.ValidationException vex) {\n return false;\n }\n return true;\n }", "public boolean validate(){\n return true;\n }", "@Override\n\t\tpublic void validate() throws ValidationError {\n\t\t\tif (newValueOfPropertyToChange < 0) {\n\t\t\t\tthrow new TestFailure(\"propertyToChange is not ok\");\n\t\t\t}\n\t\t}", "public boolean hasValidValues() {\r\n\t\treturn hasValidValues;\r\n\t}", "@ApiModelProperty(value = \"Boolean flag used for UI to tell whether all Steps associated with this Flow are valid, making the Flow valid\")\n public Boolean isIsValid() {\n return isValid;\n }", "public boolean isDataValid() {\r\n return validData;\r\n }", "@Override\n public boolean validate() throws ValidationException\n {\n boolean isValid = super.validate();\n return checkAAField() && isValid;\n }", "private boolean isInputValid() {\n return true;\n }", "public abstract boolean isValid();", "public abstract boolean isValid();", "public abstract boolean isValid();", "boolean isValid();", "boolean isValid();", "boolean isValid();", "boolean isValid();", "boolean isValid();", "public boolean isValid ( ) {\n\t\treturn extract ( handle -> handle.isValid ( ) );\n\t}", "public boolean isValid() {\n return !TextUtils.isEmpty(getId())\n && !TextUtils.isEmpty(getName())\n && getControlFilter() != null;\n }", "public boolean isValid() {\n return _id != null && !_id.isEmpty() &&\n _name != null && !_name.isEmpty() &&\n _created != null && !_created.isEmpty();\n }", "protected abstract boolean isInputValid();", "public boolean valid(Object obj) {\n return !validator.valid(obj);\n }", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }" ]
[ "0.7499342", "0.7494278", "0.74695945", "0.7325819", "0.73056704", "0.73056704", "0.73056704", "0.7301821", "0.7296235", "0.729216", "0.729216", "0.72844434", "0.72788364", "0.7278756", "0.7257676", "0.72450405", "0.7199956", "0.71809566", "0.7174432", "0.7168927", "0.7162165", "0.7156554", "0.7153009", "0.7153009", "0.7153009", "0.7153009", "0.7153009", "0.7137645", "0.7137645", "0.71267205", "0.7118456", "0.7099321", "0.7076705", "0.7026471", "0.701822", "0.6989107", "0.6968633", "0.6939445", "0.6908709", "0.69006824", "0.6895441", "0.6895441", "0.6895441", "0.68917865", "0.6885428", "0.6868273", "0.685632", "0.68348515", "0.6829294", "0.68290704", "0.68283594", "0.6811744", "0.6805545", "0.6801235", "0.67939526", "0.67808074", "0.67652535", "0.67652535", "0.67546886", "0.672773", "0.6727243", "0.6713149", "0.66961616", "0.6690965", "0.6690965", "0.6690965", "0.6690965", "0.6690965", "0.668492", "0.6682212", "0.666971", "0.66687214", "0.664737", "0.66469234", "0.66469234", "0.66469234", "0.6627339", "0.6627339", "0.6617981", "0.65999883", "0.6592304", "0.65918773", "0.6586966", "0.6571439", "0.65681434", "0.6554061", "0.6554061", "0.6554061", "0.65536773", "0.65536773", "0.65536773", "0.65536773", "0.65536773", "0.6541523", "0.6528181", "0.6502957", "0.6499549", "0.6497705", "0.6483279", "0.6483279", "0.6477611" ]
0.0
-1
remove old Node System.out.println("removing old: " + myName + CLASSTYPE + " from: " + myPref.absolutePath());
public void persist(final int num) { myPref.remove(myName + CLASSTYPE); myName = String.valueOf(num); myPref.put(myName + CLASSTYPE, getClass().getSimpleName()); // System.out.println("saved: " + myName + getClass().getSimpleName() + " to: " + myPref.absolutePath()); extraPersist(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeNode(NodeKey key);", "public void onRemoveNode(Node node) {\n\t}", "void removeNode(Entity entity) {\n\t\tProcessing.nodeSet.remove(entity);\n\t\tProcessing.friendMap.remove(entity);\n\n\t\tSystem.out.println(\"the person was successfully removed from the network.\");\n\t}", "void removeHasNodeID(Integer oldHasNodeID);", "void removeHasNodeSettings(NodeSettings oldHasNodeSettings);", "public void cutNode ()\n {\n copyNode();\n deleteNode();\n }", "private void deleteNode(Node n) {\n n.next.pre = n.pre;\n n.pre.next = n.next;\n }", "public boolean removeNode(Node n);", "private void removeNode(DLinkedNode node){\n DLinkedNode pre = node.pre;\n DLinkedNode post = node.post;\n\n pre.post = post;\n post.pre = pre;\n }", "public void deleteNode ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n ConfigTreeNode parent = (ConfigTreeNode)node.getParent();\n int index = parent.getIndex(node);\n ((DefaultTreeModel)_tree.getModel()).removeNodeFromParent(node);\n int ccount = parent.getChildCount();\n node = (ccount > 0) ?\n (ConfigTreeNode)parent.getChildAt(Math.min(index, ccount - 1)) : parent;\n if (node != _tree.getModel().getRoot()) {\n _tree.setSelectionPath(new TreePath(node.getPath()));\n }\n DirtyGroupManager.setDirty(group, true);\n }", "private void removeNode(DLinkedNode node) {\n\t\t\tDLinkedNode pre = node.pre;\n\t\t\tDLinkedNode post = node.post;\n\n\t\t\tpre.post = post;\n\t\t\tpost.pre = pre;\n\t\t}", "public abstract void removedFromWidgetTree();", "public void removeChild(WSLNode node) {children.removeElement(node);}", "public String eraseNode() {\n\n String assist = lastIn.info;\n lastIn = lastIn.next;\n size--;\n return assist;\n }", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "@Override\n\tpublic void remove(DuNode s) {\n\t\t\n\t}", "private void deleteFixup(Node<K, V> x) {\n\t\t\n\t}", "public void removeNode(Node<E> node) {\n super.removeNode(node);\n addNodeToCache(node);\n }", "public void remove() {\n removeNode(this);\n }", "public void removeNode (int id)\r\n {\r\n uNodes.remove(id); //hard remove; See undo/redo/History.java\r\n }", "private void removeNode(DNode node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }", "private void removeNode(DLinkedNode node){\n\t\tDLinkedNode prev = node.prev;\n\t\tDLinkedNode next = node.next;\n\n\t\tprev.next = next;\n\t\tnext.prev = prev;\n\t}", "public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }", "void deleteNode(ZVNode node);", "private E removeNode(Node n) {\n \tassert (n != sentinel);\n \tn.succ.pred = n.pred;\n \tn.pred.succ = n.succ;\n \tsize--;\n \treturn n.data;\n }", "static void deleteNode(Node node){\n\t\tif(node.next==null){\r\n\t\t\tnode=null;\r\n\t\t}\r\n\t\tnode.data=node.next.data;\r\n\t\tnode.next=node.next.next;\r\n\t}", "private void removeFromList(ListNode node) {\n\t ListNode savedPrev = node.prev;\n\t ListNode savedNext = node.next;\n\n\t savedPrev.next = savedNext;\n\t savedNext.prev = savedPrev;\n\t }", "public abstract void removeChild(Node node);", "public void removeNode()\n\t{\n\t\tif (parent != null)\n\t\t\tparent.removeChild(this);\n\t}", "void removeLabel(Object oldLabel);", "void removeLabel(Object oldLabel);", "private void removeNode(Node<E> node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }", "private void deleteNode(Node node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }", "void arbitraryRemove(Nodefh node){\n\t\n\t\tif(node.Parent.Child == node){\n\t\t\tif(node.Right != null && node.Right != node){\n\t\t\t\tnode.Parent.Child = node.Right;\n\t\t\t\tif(node.Left!=null && node.Left != node){\n\t\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnode.Right.Left = node.Right;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnode.Parent.Child = null;\n\t\t\t\tnode.Parent = null;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(node.Left != null && node.Left != node){\n\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t}\n\t\t\tnode.Parent = null;\n\n\t\t}\n\t\tif(node.Child!=null){\n\t\t\tNodefh temp = node.Child;\n\t\t\tif(node.Child.Right!=null){\n\t\t\t\ttemp = node.Child.Right;\n\t\t\t}\n\t\t\tfhInsert(node.Child);\n\t\t\twhile(temp!=node.Child.Right){\n\t\t\t\tfhInsert(temp);\n\t\t\t\ttemp = temp.Right;\n\t\t\t}\n\n\t\t}\n\n\t}", "public void deleteNode(int key){\n\t\t//System.out.println(\" in delete Node \");\n\t\tNode delNode = search(key);\n\t\tif(delNode != nil){\n\t\t\t//System.out.println(\" del \" + delNode.id);\n\t\t\tdelete(delNode);\n\t\t}else{\n\t\t\tSystem.out.println(\" Node not in RB Tree\");\n\t\t}\n\t}", "private void delete(Node next) {\n\t\t\n\t}", "public void remove () { this.setAsDown(); n.remove(); }", "public void deleteNode(Node n){\n\t\tn.item = n.next.item;\n\t\tNode temp = n.next.next;\n\t\t//delete(n.next);\n\t\tn.next = temp;\n\t\t\n\t\t\n\t}", "public void removeNode(Node p_node) {\n\t\tnodes.remove(p_node);\n\t}", "public void deleteNode (NodeId id) throws IOException\n\t{\n\t}", "private void removeNode(Node node){\n\n if (node.pre == null) {\n this.head = node.next;\n } else {\n node.pre.next = node.next;\n }\n\n if (node.next == null) {\n this.end = node.pre;\n } else {\n node.next.pre = node.pre;\n } \n }", "SNode removeStr(String str);", "public static void delete(Nodelink node){\n\n Nodelink temp = node.next;\n node = null;\n\n node = temp;\n\n }", "protected void removeNode( String workspaceName,\n NodeKey key,\n NodeKey parentKey,\n Path path,\n Name primaryType,\n Set<Name> mixinTypes ) {\n\n }", "public void deleteNode(String node) {\n nodeRepository.delete(new Node(node));\n }", "boolean removeNode(N node);", "@Override\r\n\tpublic void redo() \r\n\t\t{\n\t\twasRemoved = parent.removeChild(child);\r\n\t\tif (wasRemoved) \r\n\t\t\t{\r\n\t\t\tremoveArcs(sourceArcs);\r\n\t\t\tremoveArcs(targetArcs);\r\n\t\t\t}\r\n\t\t}", "public void removeFromPane(Node node) {\n pane.getChildren().remove(node);\n }", "public void delete(Node node){\n\t\t//System.out.println(\" in delete\");\n\t Node tempNode=node;\n\t Node other;\n\t String checkColour = tempNode.colour;\n\t if(node.left==nil){\n\t \tother=node.right;\n\t transferLink(node,node.right);\n\t }\n\t else if(node.right==nil){\n\t \tother=node.left;\n\t transferLink(node,node.left);\n\t }\n\t else{\n\t \ttempNode=node.right;\n\t while(tempNode.left!=nil)\n\t \ttempNode=tempNode.left;\n\t checkColour=tempNode.colour;\n\t other=tempNode.right;\n\t if(tempNode.parent==node)\n\t \tother.parent=tempNode;\n\t else{\n\t \ttransferLink(tempNode,tempNode.right);\n\t \ttempNode.right=node.right;\n\t \ttempNode.right.parent=tempNode;\n\t }\n\t transferLink(node,tempNode);\n\t tempNode.left=node.left;\n\t tempNode.left.parent=tempNode;\n\t tempNode.colour=node.colour;\n\t }\n\t //if the node to be deleted has back color we caused a violation and is needed to be fixed\n\t if(checkColour==\"Black\")\n\t \tfixViolationDelete(other);\n\t}", "private T remove(Node<T> rm_node) {\n //if(node.previous == null) return removeFirst(); //If its a first node to remove.\n //if(node.next == null) return removeLast(); //If it's last node to remove.\n\n rm_node.next.previous = rm_node.previous; //pointing deleting nodes next element to deleting nodes prev. 3 <--- 4 ---> 5\n rm_node.previous.next = rm_node.next; //pointing deleting nodes prev element to deleting nodes next. deleting 4\n\n T data = rm_node.data; //to return deleted node data.\n\n rm_node.data = null;\n rm_node = rm_node.previous = rm_node.next = null; //Clearing node\n --size;\n\n return data;\n }", "public void removeNode(NodeBINE node) {\n statistic.log(Type.REMOVED_NODES);\n if (removedNodeIds.contains(node.getId())) {\n System.err.println(\"Node: \" + node.getId() + \" already removed\");\n } else {\n removedNodeIds.add(node.getId());\n //storeNode(node);\n }\n nodes.remove(node.getId());\n }", "public void delete() {\n this.root = null;\n }", "public void removeNode(N node)\r\n/* 71: */ {\r\n/* 72:135 */ assert (checkRep());\r\n/* 73:137 */ for (N endNode : getSuccessors(node)) {\r\n/* 74:138 */ ((Map)this.map.get(endNode)).remove(node);\r\n/* 75: */ }\r\n/* 76:140 */ this.map.remove(node);\r\n/* 77: */ }", "public void removeNode(Integer nodeID) throws IOException, XMLStreamException {\n if (this.IPmap.containsKey(nodeID)) {\n\n this.IPmap.remove(nodeID);\n this.fileOwnerMap.remove(nodeID);\n if (this.IPmap.size() > 1) {\n //writeToXML();\n for (Map.Entry<Integer, String> entry : IPmap.entrySet()) {\n System.out.println(\"Key: \" + entry.getKey() + \". Value: \" + entry.getValue());\n }\n }\n System.out.printf(\"Node removed\");\n } else System.out.println(\"Node not in system.\");\n }", "@DISPID(2)\n\t// = 0x2. The runtime will prefer the VTID if present\n\t@VTID(8)\n\tvoid removeChild(@MarshalAs(NativeType.VARIANT) java.lang.Object node);", "private void remove(Node node) {\n Node next = node.next;\n Node previous = node.previous;\n previous.next = next;\n next.previous = previous;\n }", "public void delete(String scholl_node) {\n db.delete(Value.TABLE_SCHOLLS, Value.COLUMN_NODE + \" = ?\",\n new String[] { String.valueOf(scholl_node) });\n }", "void nodeRemoveProperty( long nodeId, int propertyKey );", "public void deleteNode(TreePath path) {\n \t\tSpatial node = (Spatial) path.getLastPathComponent();\n \t\ttreeModel.deleteNode(node);\n \t\trepaint();\n \t}", "public static void deleteNode(int nodeData){\n }", "public boolean removeNode(DAGNode node) {\r\n\t\treturn false;\r\n\t}", "public void deleteNode(ListNode node) {\n node.val = node.next.val;\n node.next = node.next.next;\n }", "public void deleteNode(ListNode node) {\n node.val = node.next.val;\n node.next = node.next.next;\n }", "public void removeConceptLabel(ConceptLabel lbl) {\n\t\tSystem.out.println(\"removing \"+lbl+\" ..\");\n\t\t\n\t\tlbl.setDeleted(true);\n\t\t// tokens.remove(lbl);\n\t\t// System.out.println(\"- \"+tokens);\n\t}", "public void deallocateNode(){\n this.processId = NO_PROCESS;\n this.full = false;\n }", "public void removeFromWhish(String user, int code){\n NodoAvl tmp = searchNode(user);\n tmp.whish.deleteNode(code);\n }", "@PortedFrom(file = \"Taxonomy.h\", name = \"removeNode\")\n public void removeNode(TaxonomyVertex node) {\n graph.remove(node);\n }", "private void removeNode(AVLNode<T, U> node){\n\t\tAVLNode<T, U> newNode = null;\n\t\t\n\t\tif(node.getLeft() == null && node.getRight() == null){\n\t\t\t//If the node is a leaf, I delete it and I recompute \n\t\t\t//the heights and check the balance starting from its parent\n\t\t\tnewNode = node.getParent();\n\t\t\tthis.transplant(node, null);\n\t\t}else if(node.getLeft() == null){\n\t\t\tnewNode = node.getRight();\n\t\t\tthis.transplant(node, newNode);\n\t\t}else if(node.getRight() == null){\n\t\t\tnewNode = node.getLeft();\n\t\t\tthis.transplant(node, newNode);\n\t\t}else{\n\t\t\tnewNode = getMinimum(node.getRight());\n\t\t\tif(newNode.getParent() != node){\n\t\t\t\tthis.transplant(newNode, newNode.getRight());\n\t\t\t\tnewNode.setRight(node.getRight());\n\t\t\t\tnewNode.getRight().setParent(newNode);\n\t\t\t}\n\t\t\tthis.transplant(node, newNode);\n\t\t\tnewNode.setLeft(node.getLeft());\n\t\t\tnewNode.getLeft().setParent(newNode);\n\t\t}\n\t\tcomputeHeights(newNode);\n\t\tbalanceTree(newNode);\n\t}", "@Override\n\tpublic void nodeRemoved(TGGraph graph, TGNode node) {\n gLogger.log(TGLogger.TGLevel.Debug, \"Node is removed\");\n removedList.put(((AbstractEntity) node).getVirtualId(), node);\n\t}", "public void remove(Node n){\n Node before = n.prev, after = n.next;\n before.next = after;\n after.prev = before;\n }", "void deleteTree(TreeNode node) \n {\n root = null; \n }", "public void delete(Node ntd) {\n if (ntd == null) {\n System.out.println(\"No node to delete\");\n } else {\n ntd.data = ntd.next.data;\n ntd.next = ntd.next.next;\n }\n }", "public void remove(Node node) {\n\t\tNode cloneNode = node;\n\t\tint index = indexOf(cloneNode.block);\n\t\tif (index != (-1)){\n\t\t\tgetNode(index - 1).next = cloneNode.next;\n\t\t\tgetNode(index + 1).previous = cloneNode.previous;\n\t\t\tsize--;\n\t\t\t\n\t\t}\n\t}", "public void remove () {}", "@Override\n protected boolean removeChanceNode() {\n\n Node candidateToReduce;\n Node candidateToRemove;\n Node nodeToRemove;\n String operation;\n int i;\n NodeList children;\n Node valueNodeToReduce;\n\n NodeList chancesID;\n boolean removed = false;\n Node nodeUtil = null;\n\n\n\n\n // Obtain the value node \n\n //sv = ((IDWithSVNodes) diag).getTerminalValueNode();\n\n //diag.save(\"debug-mediastinet.elv\");\n\n //List of chance nodes in the diagram\n chancesID = diag.getNodesOfKind(Node.CHANCE);\n\n for (i = 0; (i < chancesID.size()) && removed == false; i++) {\n\n candidateToRemove = chancesID.elementAt(i);\n\n //Check if the candidaToRemove can be removed\n if (isRemovableChance(candidateToRemove)) {\n\n nodeToRemove = candidateToRemove;\n children = nodeToRemove.getChildrenNodes();\n //Reduce value nodes if it's necessary\n\n if (children.size() > 1) {\n //We have to reduce\n candidateToReduce = getCandidateValueNodeToReduceForChanceNode(nodeToRemove);\n\n //valueNodeToReduce =\tobtainValueNodeToReduce(reachableParents);\n valueNodeToReduce = obtainValueNodeToReduce(nodeToRemove, candidateToReduce);\n ReductionAndEvalID.reduceNode(\n (IDWithSVNodes) diag,\n valueNodeToReduce);\n nodeUtil = valueNodeToReduce;\n operation = \"Reduce: \" + nodeUtil.getName() + \" to eliminate: \" + nodeToRemove.getName();\n System.out.println(operation);\n statistics.addOperation(operation);\n\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException ex) {\n Logger.getLogger(ArcReversalSV.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n //The chance has only one child (utility)\n nodeUtil = children.elementAt(0);\n\n }\n\n\n String auxName = candidateToRemove.getName();\n operation = \"Chance node removal: \" + auxName;\n System.out.println(operation);\n statistics.addOperation(operation);\n\n //Add the name of the node to 'orderOfElimination'\n ((PropagationStatisticsID) statistics).addNameToOrderOfElimination(auxName);\n\n // The relation of the utility node is modified. In this \n // case the parents of the node to remove will be parents \n // of the utility node \n\n modifyUtilityRelation(nodeUtil, nodeToRemove, true);\n\n // Calculate the new expected utility \n getExpectedUtility(nodeUtil, nodeToRemove);\n\n // The node is deleted \n\n diag.removeNodeOnly(nodeToRemove);\n\n//\t\t\t\tStore the size of the diagram\n\n statistics.addSize(diag.calculateSizeOfPotentials());\n\n statistics.addTime(crono.getTime());\n\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException ex) {\n Logger.getLogger(ArcReversalSV.class.getName()).log(Level.SEVERE, null, ex);\n }\n // Set removed \n removed = true;\n\n }\n }//for\n return removed;\n }", "public void clear( CachedNode node );", "public void removeCurrent( )\n {\n // Implemented by student.\n }", "protected void openRemove(AlssLrtaSearchNode node)\n {\n //If not null\n if(node!=null)\n {\n //If the node exists in open\n AlssLrtaSearchNode alsn = this.open_id.get(node.getNode().getId());\n if(alsn == null)\n return;\n //Remove the node from open_time\n MaAlssLrtaSearchNode maNode = (MaAlssLrtaSearchNode)node;\n Map<Integer,AlssLrtaSearchNode> set = this.open_time.get(node.getNode().getId());\n set.remove(maNode.getTime());\n\n //If this node was the last one in the map\n if(set.size() ==0) {\n this.open_time.remove(node.getNode().getId());\n //Remove from others\n super.openRemove(node);\n return;\n }\n\n\n //If the node is the node of the open_id - replace it\n if(((MaAlssLrtaSearchNode)alsn).getTime() == ((MaAlssLrtaSearchNode)node).getTime())\n {\n //Remove from others\n super.openRemove(node);\n\n for(AlssLrtaSearchNode node2: set.values())\n {\n this.open_id.put(node2.getNode().getId(),node2);\n return;\n }\n\n }\n super.openRemoveNoId(node);\n\n }\n\n }", "void remove(String label) throws IOException;", "public static Node delete (BST bst, String name){\n\t\tNode bstRoot = bst.getRoot();\n\t\tNode deletedNode = findByName(bstRoot, name); // The node to be removed from the bst.\n\t\tNode substituteNode = floorOrCeiling(deletedNode); // The substitute node for the removed one.\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nThe node to be deleted:\");\n\t\tSystem.out.println(deletedNode);\n\n\t\tSystem.out.println(\"\\nThe substitute for the deleted node:\");\n\t\tSystem.out.println(substituteNode);\n\t\t\n\t\t/* If the node to be removed is an external node, which has no children nodes,\n\t\t then there is no need for the substitute node. Thus, we can simply set the nodes\n\t\t that point to the external nodes to null to remove the node.\n\t\t*/\n\t\tif ((deletedNode.getRight()==null)&&(deletedNode.getLeft()==null)){\n\t\t\tif(deletedNode.getName().compareTo(deletedNode.getParent().getName())<0)\n\t\t\t\tdeletedNode.getParent().setLeft(null);\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(null);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\treturn bstRoot;\n\t\t}\n\t\t\n\t\t/* If the node to be removed is not a root node, we'll apply the general approach.\n\t\t*/\n\t\tif (deletedNode.getParent()!=null){\n\n\t\t\t/* If the name of the parent node of the substitute node precedes the one of the substitute,\n\t\t\t * then, set the right child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\t\t\t\n\t\t\t\tif(substituteNode == deletedNode.getRight())\n\t\t\t\t\tsubstituteNode.getParent().setRight(substituteNode.getRight());\n\t\t\t\telse\t\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\t\n\t\t\t/* If the name of the parent node of the substitute node succeeds the one of the substitute,\n\t\t\t * then, set the left child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\telse\n\t\t\t\tif(substituteNode == deletedNode.getLeft())\n\t\t\t\t\tsubstituteNode.getParent().setLeft(substituteNode.getLeft());\n\t\t\t\telse\n\t\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t\n\t\t\t/* If the name of the parent node of the deleted node succeed the one of the substitute,\n\t\t\t * then, set substitute node as the left child of the parent node of the deleted node.\n\t\t\t * Otherwise, set the substitute to the right child.\n\t\t\t */\n\t\t\tif(deletedNode.getParent().getName().compareTo(substituteNode.getName())>0)\n\t\t\t\tdeletedNode.getParent().setLeft(substituteNode);\n\t\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(substituteNode);\t\t\t\n\t\t\t\n\n\t\t\t/* Duplicates the binding that the deleted node previously had.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\tsubstituteNode.setParent(deletedNode.getParent());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t */\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t}\t\n\t\t/* If the node to be removed is a root node, we'll approach a bit differently.\n\t\t*/\t\t\t\n\t\telse{\n\t\t\t/* Sets the child node of the parent of the substitute one to null.\n\t\t\t*/\t\t\t\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\telse\n\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t/* Duplicates the binding that the deleted node previously had without setting the parent node.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t*/\t\t\t\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\t\n\t\t\t\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\t\t\t\n\t\t\treturn substituteNode;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\n\n\t\treturn bstRoot;\n\t\t\n\t}", "public void wsdelete_node(String name) throws HibernateException \r\n\t\t\t\t{ \r\n\t\t\t\t\tNode node_del = null; \r\n\t\t\t\t\tString i=null;\r\n\t\t\t\t\tlong id_node=0;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t try \r\n\t\t\t\t\t { \r\n\t\t\t\t\t iniciaOperacion(); \r\n\r\n\t\t\t\t\t i= sesion.createQuery(\"SELECT u.id_node FROM Node u WHERE u.node_name ='\"+name+\"'\").uniqueResult().toString();\r\n\t\t\t\t\t \t //una vez encontrado el id del user puedo buscarlo\r\n\t\t\t\t\t \t id_node= Integer.parseInt(i);\r\n\t\t\t\t\t \t node_del = (Node) sesion.get(Node.class, id_node); \t \r\n\t\t\t\t\t sesion.delete(node_del); //le pasamos todo el objeto a eliminar\r\n\t\t\t\t\t tx.commit(); \r\n\t\t\t\t\t } catch (HibernateException he) \r\n\t\t\t\t\t { \r\n\t\t\t\t\t manejaExcepcion(he); \r\n\t\t\t\t\t throw he; \r\n\t\t\t\t\t } finally \r\n\t\t\t\t\t { \r\n\t\t\t\t\t sesion.close(); \r\n\t\t\t\t\t } \r\n\t\t\t\t\t }", "public NodeInformation unRegisterNode(NodeName nodeName) throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n nodeCatalog.removeNode(nodeInformation);\n \n return nodeInformation;\n }", "void removeStartingHadithNo(Object oldStartingHadithNo);", "public void delete(SplayNode n) {\n\t\t this.splay(n);\n\n\t\t SplayTree leftSubtree = new SplayTree();\n\t\t leftSubtree.root = this.root.left;\n\t\t if(leftSubtree.root != null)\n\t\t leftSubtree.root.parent = null;\n\n\t\t SplayTree rightSubtree = new SplayTree();\n\t\t rightSubtree.root = this.root.right;\n\t\t if(rightSubtree.root != null)\n\t\t rightSubtree.root.parent = null;\n\n\t\t if(leftSubtree.root != null) {\n\t\t \tSplayNode m = leftSubtree.maximum(leftSubtree.root);\n\t\t leftSubtree.splay(m);\n\t\t leftSubtree.root.right = rightSubtree.root;\n\t\t this.root = leftSubtree.root;\n\t\t }\n\t\t else {\n\t\t this.root = rightSubtree.root;\n\t\t }\n\t\t }", "private boolean removeNode(NeuralNode node) {\r\n\t\treturn innerNodes.remove(node);\r\n\t}", "public void remove() {\n\t}", "public void remove() {\n\t}", "protected void textLeafRemoved(MutationEvent evt) throws MelodyException {\r\n\t\tsuper.textLeafRemoved(evt);\r\n\t\t// the changed node\r\n\t\tText t = (Text) evt.getTarget();\r\n\t\t// its parent element\r\n\t\tElement e = (Element) t.getParentNode();\r\n\t\tDUNID edunid = DUNIDDocHelper.getDUNID(e);\r\n\t\t// Modify the DUNIDDoc\r\n\t\tElement eori = getOwnerDUNIDDoc(e).getElement(edunid);\r\n\t\t// It is assume that the Element is a leaf, so getFirstChild is OK\r\n\t\teori.removeChild(eori.getFirstChild());\r\n\t\t// Modify the targets descriptor\r\n\t\tif (!areTargetsFiltersDefined()) {\r\n\t\t\t/*\r\n\t\t\t * If there is no targets filters defined, there's no need to modify\r\n\t\t\t * the targets descriptor.\r\n\t\t\t */\r\n\t\t\treturn;\r\n\t\t}\r\n\t\teori = getTargetsDescriptor().getElement(edunid);\r\n\t\tif (eori != null) { // changed node is in the targets descriptor\r\n\t\t\t// It is assume that the Element is a leaf, so getFirstChild is OK\r\n\t\t\teori.removeChild(eori.getFirstChild());\r\n\t\t}\r\n\t}", "protected void notifyChildRemoval(FONode node) {\n //nop\n }", "public void removeFromParent();", "public void CLOSE ()\r\n\t{\r\n\t\tif (Path.size()!=0){\r\n\t\tActualNode=Path.get(Path.size()-1);\r\n\t\tPath.remove(Path.size()-1);\r\n\t\t}\r\n\t}", "public void removeNode(int index)\n {\n ListNode nodeBefore = findIndexNode(index - 1);\n nodeBefore.setNext(nodeBefore.getNext().getNext());\n size--;\n }", "public void remove(String key) {\n \ttmp = getNode(key);\n \tif (tmp == null) {\n \t\treturn;\n \t} else {\n \t\tif (first.getKey() == key) {\n \t\t\tfirst = first.getNext();\n \t\t\tif (first == null) {\n \t\t\t\tlen--;\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tfirst.setPrev(null);\n \t\t} else if (last.getKey() == key) {\n \t\t\tlast = last.getPrev();\n \t\t\tlast.setNext(null);\n \t\t\tif (last.getKey() == first.getKey()) {\n \t\t\t\tlast = null;\n \t\t\t}\n \t\t} else {\n \t\t\tNode tmp1 = tmp.getNext();\n \t\t\tNode tmp2 = tmp.getPrev();\n \t\t\ttmp1.setPrev(tmp2);\n \t\t\ttmp2.setNext(tmp1);\n \t\t}\n \tlen--;\n \t}\n }", "@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}", "@Override\n public synchronized boolean deleteNode(Node n){\n if((n.getNodes().size() > 0)) {\n return false;\n }\n //delete all node-tags\n for(Tag t : n.getTags()){\n removeNodeTag(n,t);\n }\n boolean dbResult = dbHandler.deleteNode(n.getID());\n if(dbResult) {\n this.allNodes.remove(n);\n return true;\n }\n else {\n return false;\n }\n }", "public void removed()\n {\n if (prev == null) {\n IBSPColChecker.setNodeForShape(shape, next);\n }\n else {\n prev.next = next;\n }\n\n if (next != null) {\n next.prev = prev;\n }\n }", "private Node delete(Order ord2) {\n\t\treturn null;\n\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();" ]
[ "0.6431503", "0.63756496", "0.6193894", "0.6145357", "0.61280125", "0.6084062", "0.60667485", "0.60659915", "0.60610557", "0.6041235", "0.6036841", "0.5979225", "0.59639716", "0.5951191", "0.59510314", "0.5945771", "0.5929983", "0.59210664", "0.59157467", "0.59137744", "0.59120476", "0.59117144", "0.58997345", "0.58693737", "0.58457893", "0.5844897", "0.5828823", "0.5822932", "0.58028555", "0.5790491", "0.5790491", "0.57849693", "0.5780874", "0.5777443", "0.5771409", "0.57647336", "0.5755634", "0.5744647", "0.5733311", "0.57315814", "0.5730622", "0.5722879", "0.57179505", "0.57072765", "0.5702771", "0.5694159", "0.56872576", "0.56771976", "0.56763864", "0.56729245", "0.5669909", "0.5653456", "0.5650682", "0.5625897", "0.56187904", "0.5609478", "0.5604863", "0.55918366", "0.557718", "0.55679005", "0.5567605", "0.55666846", "0.55666846", "0.5566212", "0.55644053", "0.556301", "0.5556789", "0.5555021", "0.5550169", "0.5547136", "0.5539753", "0.5535756", "0.5533435", "0.5527505", "0.5525489", "0.55243385", "0.55234283", "0.55156904", "0.5506537", "0.55027264", "0.55011433", "0.5480165", "0.5478516", "0.54713154", "0.54660857", "0.5458084", "0.5458084", "0.54499567", "0.5446604", "0.54409903", "0.5438996", "0.54351145", "0.5431586", "0.5428373", "0.54264355", "0.5424584", "0.5424524", "0.5417377", "0.5417377", "0.5417377", "0.5417377" ]
0.0
-1
/ Moderator Control (Adminonly)
@RequestMapping(value = "/memberships/uris/**/moderate", method = RequestMethod.POST) public ModelAndView moderate_uri_access(HttpServletRequest request, @RequestParam("moderator") String email) throws Exception { checkAdmin(request); String moderatedUri = substringBetween(request.getRequestURI(), "/memberships/uris", "/moderate"); setModerator(new ModeratedItem(moderatedUri, email)); return new ModelAndView(new OkResponseView()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean isModoAdmin() {\r\n\t\treturn this.modoAdmin;\r\n\t}", "public boolean Admin() {\n\t\tif (choiceAdmin.getSelectedIndex() == 0 || choiceAdmin.getSelectedIndex() == 2) {\n\t\t\tlblCorreoDelAdministrador.setVisible(true);\n\t\t\ttextField.setVisible(true);\n\t\t\tadmin = 0;\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlblCorreoDelAdministrador.setVisible(false);\n\t\t\ttextField.setVisible(false);\n\t\t\tadmin = 1;\n\t\t\treturn true;\n\t\t}\n\t}", "void enableMod();", "public boolean isAdmin();", "public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }", "boolean isAdmin();", "void admin() {\n\t\tSystem.out.println(\"i am from admin\");\n\t}", "public static void ulogujSeKaoAdmin() {\r\n\t\tprikazIProveraSifre(-2, 'a');\r\n\t}", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "public void setAdmin(boolean value) {\r\n this.admin = value;\r\n }", "boolean isAdminDirect() {\n return isAdministrator;\n }", "@Override\n protected String requiredPostPermission() {\n return \"admin\";\n }", "@Override\n\tpublic void modifierUser(User c) {\n\t\t\n\t}", "java.lang.String getAdmin();", "static public int getADMIN() {\n return 1;\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}", "java.lang.String getNewAdmin();", "public boolean isAdmin()\n {\n return admin;\n }", "public boolean isAdmin()\n {\n return admin;\n }", "void disableMod();", "public boolean asAdmin() {\n\t\treturn asAdmin;\n\t}", "@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tAdmin();\n\t\t\t}", "public void invertAdminStatus() {\n this.isAdmin = !(this.isAdmin);\n }", "public boolean asAdmin() {\n\t\t\treturn asAdmin;\n\t\t}", "public interface ModController {\r\n\r\n /**\r\n * Do something to enable the mod this controller is designed for properly.\r\n */\r\n void enableMod();\r\n\r\n /**\r\n * Do something to disable the mod this controller is designed for properly.\r\n */\r\n void disableMod();\r\n\r\n}", "public admin() {\n\t\tsuper();\n\t}", "public void verDatosAdministrador()\r\n\t{\r\n\t\tcrearadmin = new CrearAdministrador(this);\r\n\t\tcrearadmin.setVisible(true);\r\n\t}", "public boolean isAdmin() {\r\n return admin;\r\n }", "private void checkAdminOrModerator(HttpServletRequest request, String uri)\n throws ForbiddenAccessException, ResourceNotFoundException {\n if (isAdministrator(request)) {\n return;\n }\n\n ModeratedItem moderatedItem = getModeratedItem(uri);\n if (moderatedItem == null) {\n throw new ResourceNotFoundException(uri);\n }\n\n String loggedInUser = getLoggedInUserEmail(request);\n if (moderatedItem.isModerator(loggedInUser)) {\n return;\n }\n\n throw new ForbiddenAccessException(loggedInUser);\n }", "public boolean systemAdminOnly()\n {\n return false;\n }", "public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }", "public void setAdmin( boolean admin )\n {\n this.admin = admin;\n }", "public boolean isAdmin() {\n return admin;\n }", "public void setAdmin(int admin) {\n this.admin = admin;\n }", "private void conmuteFields() {\r\n\t\ttxPassword.setEditable(!txPassword.isEditable());\r\n\t\ttxUsuario.setEditable(!txUsuario.isEditable());\r\n\t\tcheckAdmin.setDisable(!checkAdmin.isDisable());\r\n\t\tcheckTPV.setDisable(!checkTPV.isDisable());\r\n\t}", "void ensureAdminAccess() {\n Account currentAccount = SecurityContextHolder.getContext().getAccount();\n if (!currentAccount.isAdmin()) {\n throw new IllegalStateException(\"Permission denied.\");\n }\n }", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "@Override\n\tpublic boolean isAdmin() {\n\t\treturn isOnline() && bukkitPlayer.hasPermission(Permission.ADMIN_NODE);\n\t}", "public void genMutants(ModifierList mod) {\r\n\t\tif (mod.contains(ModifierList.PRIVATE)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PUBLIC);\r\n\r\n\t\t} else if (mod.contains(ModifierList.PROTECTED)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PUBLIC);\r\n\t\t} else if (mod.contains(ModifierList.PUBLIC)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PROTECTED);\r\n\t\t} else { // Friendly\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PUBLIC);\r\n\t\t}\r\n\t}", "public boolean getAllowModifications() {\n return true;\n }", "public void defender(){setModopelea(1);}", "public boolean Admin(int admin) {\n this.flag = admin;\n if (admin == 1) {\n flag = 1;\n return true;\n } else {\n flag = 0;\n return false;\n }\n }", "private void habilitarCamposModif() {\n\n listarPromotoresModif();\n //limpiarListaCrear();\n }", "public boolean isIsAdmin() {\r\n return isAdmin;\r\n }", "public static void main(String[] args) {\n\t\n\tAccesingModifiers.hello();//heryerden accessable \n\tAccesingModifiers.hello1();\n\tAccesingModifiers.hello2();\n\t\n\t//AccesingModifiers.hello3(); not acceptable since permission is set to private\n\t\n}", "@Override\n\tpublic boolean modify(Administrateur admin) {\n\t\ttry\n\t\t{\n\t\t\topenCurrentSessionWithTransaction();\n\t\t\tgetCurrentSession().update(admin);\n\t\t\tcloseCurrentSessionWithTransaction();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean canDo (Player player, Type type, boolean isAdmin){\r\n\t\tif (isAdmin || isOwner(player.getName()))\r\n\t\t\treturn true;\r\n\t\t\r\n\t\tif (!isMember(player.getName()))\r\n\t\t\treturn false; \r\n\t\t\r\n\t\tswitch (type) {\r\n\t\t\tcase ADD:\r\n\t\t\tcase GET:\r\n\t\t\t\treturn true;\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t}", "public Modify() {\n initComponents();\n }", "public adminUsuarios() {\n initComponents();\n showUsuarios();\n }", "private void controladorAdmin(Controlador controlador){\n this.contAdminUsuarios = controlador.getAdminUsuarios();\n inicioAdmin.setControlAdminUsuarios(contAdminUsuarios);\n \n this.contAdminConfig = controlador.getAdminConfig();\n inicioAdmin.setControlAdminConfig(contAdminConfig);\n \n this.contAdminProyectosGuardar = controlador.getAdminProyectosGuardar();\n inicioAdmin.setControlAdminGuardar(contAdminProyectosGuardar);\n }", "public boolean getIsAdmin() {\n return isAdmin;\n }", "public String getPermissionAdmin() {\n return permissionAdmin;\n }", "@Override\n\tpublic int admin_modify(BoardVO obj) {\n\t\treturn 0;\n\t}", "public MainFrameAdmin() {\n\t\tsuper(\"Stock Xtreme: Administrador\");\n\t}", "public int getUserModificationPermission() {\n return permission;\n }", "public void askModification() {\n\t\t\n\t\n\t}", "public void setAdmin(boolean admin) {\n this.admin = admin;\n }", "@Override\n\t\t\tpublic void modifier(Catalogue catalogue) {\n\t\t\t\t\n\t\t\t}", "public void habilitaPanel() {\n\t\t// contentPane.setEnabled(true);\n\t\tpanelPrincipal.setEnabled(true);\n\t\tpanelBotones.setEnabled(true);\n\t\tboton1Jugador.setEnabled(true);\n\t\tbotonJuegoRed.setEnabled(true);\n\t\tbotonEditar.setEnabled(true);\n\t\tbotonDemo.setEnabled(true);\n\t\tbotonReglas.setEnabled(true);\n\t\tbotonAyuda.setEnabled(true);\n\t\tbotonRecibir.setEnabled(true);\n\t\tbotonEnviar.setEnabled(true);\n\t\tbotonDescargaSobre.setEnabled(true);\n\t\tbotonSalir.setEnabled(true);\n\t\tlabelFondo.setEnabled(true);\n\t\tlabelDibujo.setEnabled(true);\n\n\t}", "private void edit() {\n\n\t}", "public SetPermission() {\n initComponents();\n }", "public void toggleMod(){\r\n this.enabled = !this.enabled;\r\n this.onToggle();\r\n if(this.enabled)\r\n this.onEnable();\r\n else\r\n this.onDisable();\r\n }", "void sendAdminCommandLocked(String action, int reqPolicy, int userHandle, Bundle adminExtras) {\n final DevicePolicyData policy = getUserData(userHandle);\n final int count = policy.mAdminList.size();\n for (int i = 0; i < count; i++) {\n final ActiveAdmin admin = policy.mAdminList.get(i);\n if (admin.info.usesPolicy(reqPolicy)) {\n sendAdminCommandLocked(admin, action, adminExtras, null);\n }\n }\n }", "private void initAccess() {\n\t\tif (!Users.doesCurrentUserHaveAccess(Users.ACCESS_CLASS_BEGINNING_DATA_ENTRY) &&\n\t\t\t\t!this.getParentEditor().getNewRecord() &&\n\t\t\t\t!referenceNewPatron) {\n\t\t\treadOnly = true;\n\t\t\tsetFormToReadOnly();\n\t\t\t//research purpose\n\t\t\taddResearchPurpose.setEnabled(false);\n\t\t\tremoveResearchPurpose.setEnabled(false);\n\t\t\t//subject buttons\n\t\t\taddSubject.setEnabled(false);\n\t\t\tremoveSubject.setEnabled(false);\n\t\t\t//name buttons\n\t\t\taddName.setEnabled(false);\n\t\t\tremoveName.setEnabled(false);\n\t\t\teditNameRelationshipButton.setEnabled(false);\n // resource button\n addResourceButton.setEnabled(false);\n removeResourceButton.setEnabled(false);\n\t\t}\n\t}", "boolean makeAdmin(User user);", "public int getAdmin() {\n return admin;\n }", "public Integer getIsadmin() {\r\n return isadmin;\r\n }", "AdministrativeControl administrativeControl();", "AdministrativeControl administrativeControl();", "static void setNotEdit(){isEditing=false;}", "void checkAdmin() throws HsqlException {\n Trace.check(isAdmin(), Trace.ACCESS_IS_DENIED);\n }", "@Override\n\tpublic void setAccessModifier(AccessModifier modifier) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void setIsadmin(Integer isadmin) {\r\n this.isadmin = isadmin;\r\n }", "public void setEditAuthUserContentAdmin(final boolean val) {\n editAuthUserType |= UserAuth.contentAdminUser;\n }", "public boolean changeAdmin() {\n\t\tString username = Inputs.getUserInput(\"Enter username:\");\n\t\tint pin = InputsValidator.getPinInput(\"Enter pin ( XXXX ) :\");\n\n\t\tif (adminDao.changeAdmin(username, pin)) {\n\t\t\tSystem.out.println(\"Admin changed! Username: \" + username + \"; pin: \" + pin);\n\t\t\tAdminMenu.getAdminMenu();\n\t\t\treturn true;\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\t\t\tAdminMenu.getAdminMenu();\n\t\t\treturn false;\n\t\t}\n\t}", "public adminmenu() throws IOException, ClassNotFoundException {\r\n this.input = new Scanner(System.in);\r\n this.adminPage(); // Calling the Mentioned Function\r\n }", "@Override\r\n\tpublic boolean getAddAdmin(Admins ad) {\n\t\treturn adi.addAdmin(ad);\r\n\t}", "public formAdmin() {\n initComponents();\n setExtendedState(MAXIMIZED_BOTH);\n initForm();\n }", "private boolean isAdmin() {\n\t\tString name = (String) session.getAttribute(\"name\");\n\t\tif (name.equals(ADMIN)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void performDirectEdit() {\n\t}", "private void setearOpcionesMenuAdministracion()\r\n\t{\r\n\t\tArrayList<FormularioVO> lstFormsMenuAdmin = new ArrayList<FormularioVO>();\r\n\t\t\r\n\t\t/*Buscamos los Formulairos correspondientes a este TAB*/\r\n\t\tfor (FormularioVO formularioVO : this.permisos.getLstPermisos().values()) {\r\n\t\t\t\r\n\t\t\tif(formularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_USUARIO)\r\n\t\t\t\t|| formularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_GRUPO))\r\n\t\t\t{\r\n\t\t\t\tlstFormsMenuAdmin.add(formularioVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/*Si hay formularios para el tab*/\r\n\t\tif(lstFormsMenuAdmin.size()> 0)\r\n\t\t{\r\n\t\t\t//TODO\r\n\t\t\t//this.tabAdministracion = new VerticalLayout();\r\n\t\t\t//this.tabAdministracion.setMargin(true);\r\n\t\t\t\r\n\t\t\tthis.lbAdministracion.setVisible(true);\r\n\t\t\tthis.layoutMenu.addComponent(this.lbAdministracion);\r\n\t\t\t\r\n\t\t\tfor (FormularioVO formularioVO : lstFormsMenuAdmin) {\r\n\t\t\t\t\r\n\t\t\t\tswitch(formularioVO.getCodigo())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_USUARIO : \r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_USUARIO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarUserButton();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.userButton);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_GRUPO :\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_GRUPO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarGrupoButton();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.gruposButton);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//TODO\r\n\t\t\t//this.acordion.addTab(tabAdministracion, \"Administración\", null);\r\n\t\t\t\r\n\t\t}\r\n\t\t//TODO\r\n\t\t//acordion.setHeight(\"75%\"); /*Seteamos alto del accordion*/\r\n\t}", "public static void add() {\n Application.currentUserCan( 1 );\n render();\n }", "@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew Admin_Screen();\n\t\t\t\tADCL.setVisible(false);\n\t\t\t}", "public boolean publicAdmin() {\n try {\n return getConfig().getPublicAdmin();\n } catch (Throwable t) {\n t.printStackTrace();\n return false;\n }\n }", "private void btnAdministrarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "protected abstract void iniciarModo();", "public PanelControl() {\r\n initComponents();\r\n VersionEImageIcon versionEImageIcon = new VersionEImageIcon();\r\n versionEImageIcon.newColorFromPanel(panelColor);\r\n jLabel1.setText(INFO_LABEL);\r\n Usuario usuarioTipo = Login.getUsuario();\r\n this.administrador = usuarioTipo.isAdmin();\r\n if (!administrador)\r\n {\r\n rangos.setEnabled(false);\r\n controles.setEnabled(false);\r\n alta_usuarios.setEnabled(false);\r\n verificacion.setEnabled(false);\r\n }\r\n }", "public void setModerator(boolean moderator) {\n\t\tthis.moderator = moderator;\n\t}", "public abstract void grantModerator(String nickname);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Alter();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "public void setModifyMan(Integer modifyMan) {\n this.modifyMan = modifyMan;\n }", "public String updatePrivilege() {\r\n\r\n String elementID = this.getParam(\"idElement\");\r\n // If need to add to update list.\r\n boolean needToAdd = false;\r\n\r\n String optin = this.getParam(\"optin\");\r\n String optout = this.getParam(\"optout\");\r\n String view = this.getParam(\"view\");\r\n String read = this.getParam(\"read\");\r\n String update = this.getParam(\"update\");\r\n String administrate = this.getParam(\"administrate\");\r\n\r\n Subject updateSubject = (Subject) this.getAddedItem(elementID);\r\n\r\n if (updateSubject == null) {\r\n updateSubject = (Subject) this.updatedGroups.get(elementID);\r\n if (updateSubject == null) {\r\n Subject aux = (Subject) this.getItem(elementID);\r\n if (aux.getValueFormCol(\"canOptin\") == null) {\r\n aux.addMappingFieldCol(\"canOptin\", ESCOConstantes.FALSE);\r\n }\r\n if (aux.getValueFormCol(\"canOptout\") == null) {\r\n aux.addMappingFieldCol(\"canOptout\", ESCOConstantes.FALSE);\r\n }\r\n updateSubject = (Subject) aux.clone();\r\n this.originalGroups.put(elementID, aux);\r\n needToAdd = true;\r\n }\r\n }\r\n\r\n GroupPrivilegeEnum theRight = updateSubject.getSubjectRight();\r\n\r\n if (theRight == null) {\r\n theRight = GroupPrivilegeEnum.NONE;\r\n }\r\n\r\n if (optin != null) {\r\n // OptIn is true\r\n if (optin.equals(ESCOConstantes.TRUE)) {\r\n // Adding the VIEW privilege\r\n if (theRight.eq(GroupPrivilegeEnum.NONE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n }\r\n }\r\n // Adding the OptIn\r\n updateSubject.addMappingFieldCol(\"canOptin\", Boolean.valueOf(optin.equals(ESCOConstantes.TRUE))\r\n .toString());\r\n }\r\n\r\n if (optout != null) {\r\n // OptOut is true\r\n if (optout.equals(ESCOConstantes.TRUE)) {\r\n // Adding the VIEW privilege\r\n if (theRight.eq(GroupPrivilegeEnum.NONE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n }\r\n }\r\n updateSubject.addMappingFieldCol(\"canOptout\", Boolean.valueOf(optout.equals(ESCOConstantes.TRUE))\r\n .toString());\r\n }\r\n\r\n if (view != null) {\r\n if (view.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.NONE);\r\n updateSubject.setOptin(false);\r\n updateSubject.setOptout(false);\r\n }\r\n }\r\n if (read != null) {\r\n if (read.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.READ);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n }\r\n }\r\n if (update != null) {\r\n if (update.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.UPDATE);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.READ);\r\n }\r\n }\r\n if (administrate != null) {\r\n if (administrate.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.ADMIN);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.UPDATE);\r\n }\r\n }\r\n\r\n // Only one group in the list of group of the members class because\r\n // we add it to convert group to subject.\r\n if (needToAdd) {\r\n this.updatedGroups.put(elementID, updateSubject);\r\n } else {\r\n Sortable theOrignGroup = this.originalGroups.get(elementID);\r\n if (theOrignGroup != null) {\r\n if (theOrignGroup.getValueFormCol(ESCOConstantes.USER_RIGHT_VALUE).toUpperCase().equals(\r\n updateSubject.getValueFormCol(ESCOConstantes.USER_RIGHT_VALUE).toUpperCase())) {\r\n if (theOrignGroup.getValueFormCol(\"canOptin\").toUpperCase().equals(\r\n updateSubject.getValueFormCol(\"canOptin\").toUpperCase())) {\r\n if (theOrignGroup.getValueFormCol(\"canOptout\").toUpperCase().equals(\r\n updateSubject.getValueFormCol(\"canOptout\").toUpperCase())) {\r\n // The updateGroup and origin is same.\r\n this.updatedGroups.remove(elementID);\r\n this.originalGroups.remove(elementID);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Create and return the XML status.\r\n XmlProducer producer = new XmlProducer();\r\n producer.setTarget(new Status(Boolean.TRUE));\r\n producer.setTypesOfTarget(Status.class);\r\n\r\n return this.xmlProducerWrapper.wrap(producer);\r\n }", "public void setModifiers(int mod) {\n int old = this.mod;\n this.mod = mod;\n firePropertyChange (PROP_MODIFIERS, new Integer (old), new Integer (mod));\n }", "public void editOperation() {\n\t\t\r\n\t}", "@Override\n protected String requiredDeletePermission() {\n return \"admin\";\n }", "public String getIsAdmin() {\n return isAdmin;\n }", "public Modification() {\r\n initComponents();\r\n this.setVisible(true);\r\n \r\n \r\n \r\n \r\n \r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew Admin_Screen();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "public void modifierVie(int modificationVie);", "public abstract OwUIAccessRightsModul getEditAccessRightsSubModul(OwObject object_p) throws Exception;" ]
[ "0.66912645", "0.6684301", "0.6592432", "0.6573201", "0.6482833", "0.6477532", "0.64371616", "0.64221984", "0.64055085", "0.640488", "0.63882357", "0.634125", "0.6312663", "0.63098425", "0.6299991", "0.624082", "0.6170042", "0.614739", "0.614739", "0.61293787", "0.61273897", "0.6090833", "0.60451984", "0.6025918", "0.60239494", "0.6020071", "0.60132176", "0.60084885", "0.60028476", "0.5999641", "0.59941447", "0.5971634", "0.5945782", "0.59234065", "0.59158087", "0.59156144", "0.5909258", "0.5908977", "0.5908526", "0.590789", "0.59073377", "0.58973813", "0.58972144", "0.58938795", "0.58807755", "0.58693427", "0.5867927", "0.58659524", "0.5856166", "0.58542186", "0.58450997", "0.584472", "0.58379155", "0.58294016", "0.5818252", "0.5818167", "0.58179796", "0.5813899", "0.58035636", "0.5787837", "0.57832223", "0.57822794", "0.5776053", "0.5766731", "0.57597965", "0.5750374", "0.5744719", "0.5737566", "0.5737566", "0.57354003", "0.57340646", "0.5732136", "0.5715748", "0.57066", "0.56955945", "0.56881046", "0.5668721", "0.566852", "0.5666826", "0.5665004", "0.5658158", "0.5657982", "0.56535196", "0.5644017", "0.56432617", "0.56423193", "0.5641609", "0.5632044", "0.56243175", "0.5621664", "0.5621289", "0.56184244", "0.56137407", "0.5612752", "0.56110203", "0.56033254", "0.56001115", "0.5598743", "0.5594162", "0.55885273", "0.5584093" ]
0.0
-1
/ ModeratedItem URI Control (Admin or Moderator)
@RequestMapping(value = "/memberships/uris", method = RequestMethod.GET) public ModelAndView uris_membership(HttpServletRequest request) throws Exception { if (isAdministrator(request)) { return new ModelAndView(new JsonItemsView()).addObject("json", getItems(getModeratedItems())); } String loggedInUser = getLoggedInUserEmail(request); return new ModelAndView(new JsonItemsView()).addObject("json", getItems(getModeratedItems(loggedInUser))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/memberships/uris/**/moderate\", method = RequestMethod.POST)\n public ModelAndView moderate_uri_access(HttpServletRequest request, @RequestParam(\"moderator\") String email) throws Exception {\n checkAdmin(request);\n String moderatedUri = substringBetween(request.getRequestURI(), \"/memberships/uris\", \"/moderate\");\n setModerator(new ModeratedItem(moderatedUri, email));\n\n return new ModelAndView(new OkResponseView());\n }", "protected void setEditUrl(EditingPolicyHelper policyHelper, ObjectPropertyStatement ops) {\n RequestedAction action = new EditObjPropStmt(ops);\n if ( ! policyHelper.isAuthorizedAction(action) ) {\n return;\n }\n \n if (propertyUri.equals(VitroVocabulary.IND_MAIN_IMAGE)) {\n editUrl = ObjectPropertyTemplateModel.getImageUploadUrl(subjectUri, \"edit\");\n } else {\n ParamMap params = new ParamMap(\n \"subjectUri\", subjectUri,\n \"predicateUri\", propertyUri,\n \"objectUri\", objectUri);\n \n if ( deleteUrl.isEmpty() ) {\n params.put(\"deleteProhibited\", \"prohibited\");\n }\n \n params.putAll(UrlBuilder.getModelParams(vreq));\n \n editUrl = UrlBuilder.getUrl(EDIT_PATH, params);\n } \n }", "public void setLinkItem(String string) {\r\n this.linkItem = string;\r\n }", "public abstract URI getModelURI();", "abstract String getUri();", "public String getURI() {\n/* 95 */ return this.uri;\n/* */ }", "protected void setEditUrls(EditingPolicyHelper policyHelper) {\n if (policyHelper != null) {\n ObjectPropertyStatement ops = new ObjectPropertyStatementImpl(subjectUri, propertyUri, objectUri);\n \n // Do delete url first, since used in building edit url\n setDeleteUrl(policyHelper, ops);\n setEditUrl(policyHelper, ops);\n } \n }", "@Override\r\n\tpublic String getUri() {\n\t\treturn uri;\r\n\t}", "interface UrlModifier {\n\n String createUrl(String url);\n\n }", "public String getUri();", "String getURI();", "String getURI();", "String getURI();", "public abstract URL getFileLink(ChangeSet.Item item) throws IOException;", "public String getUri()\r\n {\r\n return uri;\r\n }", "@Override\n public void setContributionURI(String arg0)\n {\n \n }", "private void checkAdminOrModerator(HttpServletRequest request, String uri)\n throws ForbiddenAccessException, ResourceNotFoundException {\n if (isAdministrator(request)) {\n return;\n }\n\n ModeratedItem moderatedItem = getModeratedItem(uri);\n if (moderatedItem == null) {\n throw new ResourceNotFoundException(uri);\n }\n\n String loggedInUser = getLoggedInUserEmail(request);\n if (moderatedItem.isModerator(loggedInUser)) {\n return;\n }\n\n throw new ForbiddenAccessException(loggedInUser);\n }", "abstract protected URI getSavedMasterUri();", "protected abstract void editItem();", "public abstract String getManipulatorLinkLabel();", "@Override\n public void setContributorURI(String arg0)\n {\n \n }", "public String uri() {\n return this.uri;\n }", "String getUri();", "public MethodLinkBuilderFactory<GamesItemThymeleafController> getItemLink() {\n return itemLink;\n }", "@Override\r\n public String getFriendlyURI() {\r\n return createURI(false, false);\r\n }", "@Override\n public void setIconURI(String arg0)\n {\n \n }", "@Override\n protected void populateItem(final ListItem<String> item) {\n AjaxFallbackLink link = new AjaxFallbackLink(\"link\") {\n\n @Override\n public void onClick(AjaxRequestTarget target) {\n onSlidebarClick(target, item.getModelObject());\n }\n\n };\n Section section = sectionManager.getSection(item.getModelObject());\n link.add(new TransparentWebMarkupContainer(\"icon\").add(AttributeModifier.append(\"class\", \"fa-\" + section.getIcon())));\n\n String key = \"Section.\" + section.getTitle() + \".name\";\n String title = new StringResourceModel(key, null).getString();\n// link.add(new Label(\"label\", title).setRenderBodyOnly(true));\n link.add(new Label(\"label\", title));\n\n item.setOutputMarkupId(true);\n item.add(link);\n\n item.add(new AttributeAppender(\"class\", \"active\") {\n\n @Override\n public boolean isEnabled(Component component) {\n return sectionManager.getSelectedSectionId().equals(item.getModelObject());\n }\n\n }.setSeparator(\" \"));\n }", "void onLinkClicked(@Nullable ContentId itemId);", "public URI getURI()\r\n/* 34: */ {\r\n/* 35:60 */ return this.uri;\r\n/* 36: */ }", "private String getUriForSelf(UriInfo uriInfo,OrderRepresentation ordRep){\r\n\t\tString url = uriInfo.getBaseUriBuilder()\r\n\t\t\t\t\t\t\t.path(OrderResource.class)\r\n\t\t\t\t\t\t\t.path(\"order\")\r\n\t\t\t\t\t\t\t.path(\"Order_ID\" +ordRep.getOrderID())\r\n\t\t\t\t\t\t\t.build()\r\n\t\t\t\t\t\t\t.toString();\r\n\t\treturn url;\r\n\t\t\r\n\t}", "public String getUri() {\n return uri;\n }", "public String getUri() {\r\n\t\treturn uri;\r\n\t}", "Attr getURIAsAttr();", "public URI getAdminURL() {\n return adminURL;\n }", "String getURL(FsItem f);", "private String getUriForAdd(UriInfo uriInfo, OrderRepresentation ordRep) {\r\n\t\tString url = uriInfo.getBaseUriBuilder()\r\n\t\t\t\t.path(OrderResource.class)\r\n\t\t\t\t.path(\"order\")\r\n\t\t\t\t.build()\r\n\t\t\t\t.toString();\r\n\t\treturn url;\r\n\t}", "public String getUri() {\n return uri;\n }", "public String getUri() {\n\t\treturn Uri;\n\t}", "public String getUri() {\n\t\treturn uri;\n\t}", "public String getLink();", "URI getUri();", "String galleryItemIdentity();", "public static String getURI(){\n\t\treturn uri;\n\t}", "public String link() {\n return DevRant.BASE_URL + DevRant.RANT_URL + '/' + getId();\n }", "public\n\t// static\n\tUriComponents showURI(Entity entity) {\n\t\treturn MvcUriComponentsBuilder\n\t\t\t\t.fromMethodCall(MvcUriComponentsBuilder.on(AbstractItemJsonController.class).show(entity))\n\t\t\t\t.buildAndExpand(entity.getId()).encode();\n\t}", "@Override\r\n public String toString() {\r\n return getURI();\r\n }", "@Override\r\n\tpublic void onMaterialItem(HttpRequest request, MaterialItem item) {\n\r\n\t}", "java.lang.String getUri();", "java.lang.String getUri();", "private String getCollectionUri(String uri, boolean isReadGrant) {\n if (!isReadGrant && uri.contains(\"/item/\")) {\n List<String> c = ImejiSPARQL.exec(JenaCustomQueries.selectCollectionIdOfItem(uri), null);\n if (!c.isEmpty()) {\n return c.get(0);\n }\n }\n return uri;\n }", "String getLink();", "void onItemModify(int position, String str);", "private URIs() {\r\n throw new IllegalAccessError();\r\n }", "String getT_modelUri();", "@Override\r\n public String getURI() {\r\n if (uriString == null) {\r\n uriString = createURI();\r\n }\r\n return uriString;\r\n }", "public String getUri() {\n\t\t\treturn uri;\n\t\t}", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "public URI getUri()\n {\n return uri;\n }", "public abstract String getRobotUri();", "String getUri( );", "public String getAliasURI() {\n return uri;\n }", "public interface InternalLinkReferencePropertiesEditionPart {\n\n\t/**\n\t * @return the referencedLink\n\t * \n\t */\n\tpublic EObject getReferencedLink();\n\n\t/**\n\t * Init the referencedLink\n\t * @param settings the combo setting\n\t */\n\tpublic void initReferencedLink(EObjectFlatComboSettings settings);\n\n\t/**\n\t * Defines a new referencedLink\n\t * @param newValue the new referencedLink to set\n\t * \n\t */\n\tpublic void setReferencedLink(EObject newValue);\n\n\t/**\n\t * Defines the button mode\n\t * @param newValue the new mode to set\n\t * \n\t */\n\tpublic void setReferencedLinkButtonMode(ButtonsModeEnum newValue);\n\n\t/**\n\t * Adds the given filter to the referencedLink edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToReferencedLink(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the referencedLink edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToReferencedLink(ViewerFilter filter);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}", "protected ResourceReference getItem()\n\t{\n\t\treturn ITEM;\n\t}", "public abstract String getResUri();", "public URI uri() {\n\t\treturn uri;\n\t}", "public boolean modifyURIArgContent(URLArg urlArg);", "public URI getUri() {\n return this.uri;\n }", "public java.lang.String getUri() {\n return uri;\n }", "public abstract String getURL();", "protected URI getUpdateRedirectURI(String uid, UriInfo uriInfo, String extraPath) {\n\t\tUriBuilder builder = UriBuilder.fromUri(uriInfo.getBaseUri());\n\t\tbuilder.path(\"uid\");\n\t\tbuilder.path(uid);\n\t\tbuilder.path(\"export\").path(\"orcid\").path(extraPath);\n\t\t\n\t\treturn builder.build();\n\t}", "public String getRel() {\r\n return rel;\r\n }", "public URI getUri() {\r\n\t\treturn uri;\r\n\t}", "public interface IURI {\n String MIMETYPE_NAME = \"vnd.android.cursor.item/name\";\n String MIMETYPE_EMAIL = \"vnd.android.cursor.item/email_v2\";\n String MIMETYPE_ADDRESS = \"vnd.android.cursor.item/postal-address_v2\";\n String MIMETYPE_PHONE = \"vnd.android.cursor.item/phone_v2\";\n\n}", "public ImportedURIElements getImportedURIAccess() {\n\t\treturn pImportedURI;\n\t}", "public Uri mo1612a() {\r\n return Contacts.CONTENT_URI;\r\n }", "@JsonProperty()\n\tpublic abstract String getURI();", "protected String uri(String path) {\n return baseURI + '/' + path;\n }", "public URI getURI()\r\n/* 36: */ {\r\n/* 37:64 */ return this.httpRequest.getURI();\r\n/* 38: */ }", "public URI getId();", "public URI getId();", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getGroupId()) {\n case MENU_ROUTES:\n \t if (!item.isChecked())\n \t\t webView.loadUrl(\"javascript:loadRoute(\" + item.getItemId() + \")\");\n default:\n if (item.isChecked()) item.setChecked(false);\n else {\n item.setChecked(true);\n }\n return super.onOptionsItemSelected(item);\n }\n }", "public URI getURI()\n {\n return extensionURI;\n }", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "public abstract String getUserAvatarUrl(T itemVO);", "@Property String getDocumentURI();", "protected boolean isReadOnlyURI(URI uri)\n {\n if (uri.isArchive())\n {\n return isReadOnlyURI(URI.createURI(uri.authority()));\n }\n \n return !uri.isPlatformResource() && (uri.isRelative() || !uri.isFile());\n }", "IconUris iconUris();", "Uri mo1686a();", "public boolean isNameCustom(String itemName)\n {\n boolean custom = itemName != null && !itemName.equalsIgnoreCase(getResourceProperties().getProperty(ResourceProperties.PROP_DISPLAY_NAME));\n \n // if custom by logic above, check for url resources that were added as new resources by Lessons\n // the item name for urls added this way will have a protocol prefix (ie. https://)\n // if the protocol prefix does not appear, consider this to be custom\n if (custom && URL_RESOURCE_TYPE.equals(getResourceType()))\n {\n custom = itemName != null && !itemName.matches(URL_HAS_PROTOCOL_REGEX);\n }\n \n return custom;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n final int id = item.getItemId();\n int gid = item.getGroupId();\n\n //noinspection SimplifiableIfStatement\n if (gid == R.id.group_history) {\n // history\n WebView v = currentWeb();\n if( v != null ) {\n if (id == 0) {\n v.reload();\n }\n else if( v.canGoBackOrForward( id )) {\n setIcon(item.getIcon());\n setTitle(item.getTitle().toString());\n v.goBackOrForward(id);\n }\n }\n // currentWeb().loadUrl(item.getTitle().toString());\n // setTitle(url);\n // setIcon(item.getIcon());\n return true;\n }\n else if (gid == R.id.group_video) {\n List<VideoItem> vl = (List<VideoItem>) currentWeb().getTag(R.id.videoList);\n if( vl != null ) {\n openExternal( vl.get(id).url, vl.get(id).type );\n }\n }\n else if (id == R.id.pages) {\n View anchor = null ;\n int resId = getResources().getIdentifier(\"action_bar_container\", \"id\", \"android\");\n if( resId > 0) {\n anchor = findViewById(resId) ;\n }\n selectPage(anchor);\n return true;\n } else if (id == R.id.bookmarks) {\n View anchor = null ;\n int resId = getResources().getIdentifier(\"action_bar_container\", \"id\", \"android\");\n if( resId > 0) {\n anchor = findViewById(resId) ;\n }\n selectBookmarks(anchor);\n return true;\n }\n else if (id == R.id.close_page) {\n closeWeb();\n return true;\n }\n else if (id == R.id.new_page) {\n newWeb(null);\n return true;\n }\n else if (id == R.id.fullscreen) {\n m_fullscreen = !m_fullscreen;\n setFullscreen();\n return true;\n }\n else if (id == R.id.noimage) {\n currentWeb().getSettings().setLoadsImagesAutomatically(item.isChecked());\n setSitePref() ;\n currentWeb().reload();\n return true;\n }\n else if (id == R.id.disablejavascript) {\n currentWeb().getSettings().setJavaScriptEnabled(item.isChecked());\n setSitePref() ;\n currentWeb().reload();\n return true;\n }\n else if( id == R.id.history) {\n SubMenu mhis = item.getSubMenu();\n if( mhis != null ) {\n WebView webview = currentWeb();\n WebBackForwardList wfl = webview.copyBackForwardList();\n mhis.removeGroup(R.id.group_history);\n int curIdx = wfl.getCurrentIndex();\n for (int m = wfl.getSize() - 1; m >= 0; m--) {\n WebHistoryItem whi = wfl.getItemAtIndex(m);\n if (whi != null) {\n String title = whi.getTitle() ;\n if( title == null ) {\n title = whi.getUrl();\n }\n if( m==curIdx) {\n title = \"* \"+title ;\n }\n MenuItem mi = mhis.add(R.id.group_history, m - curIdx, 0, title);\n mi.setIcon(iconFromBitmap(whi.getFavicon()));\n }\n }\n }\n }\n else if (id == R.id.openinother) {\n openExternal( currentWeb().getUrl() ) ;\n return true;\n }\n else if (id == R.id.cleardata) {\n clearData();\n return true;\n }\n else if (id == R.id.openvideo) {\n SubMenu mvid = item.getSubMenu();\n if( mvid != null ) {\n mvid.removeGroup(R.id.group_video);\n List<VideoItem> vl = (List<VideoItem>) currentWeb().getTag(R.id.videoList);\n if( vl != null )\n for( int v = 0 ; v<vl.size(); v++ ) {\n try {\n URL url = new URL(vl.get(v).url);\n String s = url.getHost() + url.getPath() ;\n int l = s.length();\n if( l > 30 ) {\n s = s.substring(0,15) + \"..\" + s.substring( l-12 );\n }\n mvid.add(R.id.group_video, v, 0, s);\n }\n catch (Exception e) {\n Log.d(\"openVideo\", e.getMessage());\n }\n }\n }\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "public interface RepairItemActionHandler extends ItemActionHandler<RepairItem> {\n\n boolean onItemLongClick(RepairItem repairItem);\n\n}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_graph) {\n Intent i = new Intent(this, GraphActivity.class);\n\n String idRow = uri.getLastPathSegment();\n Uri driveUri = Uri.parse(MyCycloComputrContentProvider.CONTENT_URI_POINT + \"/\" + idRow);\n i.putExtra(MyCycloComputrContentProvider.CONTENT_ITEM_TYPE2, driveUri);\n\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public static String getURI() {\n return uri;\n }", "public String getURI(int index) {\n/* 96 */ String ns = this.m_dh.getNamespaceOfNode(this.m_attrs.item(index));\n/* 97 */ if (null == ns)\n/* 98 */ ns = \"\"; \n/* 99 */ return ns;\n/* */ }", "public String getPhysicalURI()\n {\n return physicalURI;\n }", "public URI uri() {\n return uri;\n }", "public void referToSpecialist(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\tpublic ThematicItem changeItem(ThematicItem item) {\n\t\treturn repository.changeItem(item);\n\t}", "@Override\n public URI getId() {\n return id;\n }", "public CharSequence getItemImageUrl() {\n return item_image_url;\n }", "public URI getUri() {\n\t\treturn uri;\n\t}" ]
[ "0.5920378", "0.5738549", "0.57058716", "0.5660255", "0.5480616", "0.5463289", "0.5454953", "0.54259837", "0.5413341", "0.53675556", "0.5348536", "0.5348536", "0.5348536", "0.5318354", "0.53006315", "0.5298374", "0.5282452", "0.52815384", "0.52666587", "0.5249223", "0.5248658", "0.52408916", "0.52391845", "0.5235475", "0.52108365", "0.5207332", "0.51986194", "0.519731", "0.5196372", "0.51906425", "0.518925", "0.5175319", "0.5174417", "0.51646084", "0.5159052", "0.5126335", "0.5098938", "0.50979716", "0.50968707", "0.50799423", "0.5056331", "0.5048287", "0.5034027", "0.50279194", "0.5023465", "0.50219643", "0.5017909", "0.5016978", "0.5016978", "0.5015213", "0.50001144", "0.49945512", "0.49828404", "0.49755627", "0.4963015", "0.4939118", "0.49112108", "0.49055922", "0.48970246", "0.48953503", "0.48876816", "0.48870888", "0.4874276", "0.48673666", "0.48648715", "0.48542362", "0.48471585", "0.48463327", "0.48411518", "0.4838559", "0.48382795", "0.4836944", "0.4836839", "0.481998", "0.48185566", "0.48177904", "0.48173198", "0.48171884", "0.48077992", "0.48077992", "0.48040473", "0.48031306", "0.4802173", "0.48006788", "0.47901762", "0.47874093", "0.47848877", "0.47825018", "0.47755787", "0.4774125", "0.47715664", "0.47683647", "0.47677076", "0.4766006", "0.47631007", "0.4761024", "0.4748258", "0.4744528", "0.47432843", "0.4740314", "0.47363976" ]
0.0
-1
/ Applicants / Private Methods
private void checkAdminOrModerator(HttpServletRequest request, String uri) throws ForbiddenAccessException, ResourceNotFoundException { if (isAdministrator(request)) { return; } ModeratedItem moderatedItem = getModeratedItem(uri); if (moderatedItem == null) { throw new ResourceNotFoundException(uri); } String loggedInUser = getLoggedInUserEmail(request); if (moderatedItem.isModerator(loggedInUser)) { return; } throw new ForbiddenAccessException(loggedInUser); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void credite() {\n\t\t\n\t}", "private void addApplicationsPermissionsToRegistry() throws APIManagementException {\n Registry tenantGovReg = getRegistry();\n String permissionResourcePath = CarbonConstants.UI_PERMISSION_NAME + RegistryConstants.PATH_SEPARATOR + APPLICATION_ROOT_PERMISSION;\n try {\n if (!tenantGovReg.resourceExists(permissionResourcePath)) {\n String loggedInUser = CarbonContext.getThreadLocalCarbonContext().getUsername();\n UserRealm realm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();\n // Logged in user is not authorized to create the permission.\n // Temporarily change the user to the admin for creating the permission\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(realm.getRealmConfiguration().getAdminUserName());\n tenantGovReg = CarbonContext.getThreadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);\n Collection appRootNode = tenantGovReg.newCollection();\n appRootNode.setProperty(\"name\", \"Applications\");\n tenantGovReg.put(permissionResourcePath, appRootNode);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(loggedInUser);\n }\n } catch (org.wso2.carbon.user.core.UserStoreException e) {\n throw new APIManagementException(\"Error while reading user store information.\", e);\n } catch (org.wso2.carbon.registry.api.RegistryException e) {\n throw new APIManagementException(\"Error while creating new permission in registry\", e);\n }\n }", "private void authorize() {\r\n\r\n\t}", "private Aspirations() {}", "private void init() {\r\n\t\t// administration\r\n\t\taddPrivilege(CharsetAction.class, User.ROLE_ADMINISTRATOR);\r\n\t\taddPrivilege(LanguageAction.class, User.ROLE_ADMINISTRATOR);\r\n\t\t\r\n\t\t// dictionary management\r\n\t\taddPrivilege(AddApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(AddDictLanguageAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(AddLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(ChangeApplicationVersionAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ChangeDictVersionAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateApplicationBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateOrAddApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateProductAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateProductReleaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(DeleteLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverAppDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateDictLanguageAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveApplicationBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveDictLanguageAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveProductAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveProductBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateDictAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateDictLanguageAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateLabelAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateLabelStatusAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ImportTranslationDetailsAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\r\n\t\taddPrivilege(UpdateLabelRefAndTranslationsAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(GlossaryAction.class, User.ROLE_ADMINISTRATOR);\r\n\r\n\r\n\t\t// translation management\r\n\t\taddPrivilege(UpdateStatusAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateTranslationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\t\r\n\t\t// task management\r\n\t\taddPrivilege(ApplyTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CloseTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ReceiveTaskFilesAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t}", "public abstract void createAccessPoints(IApplicationContext context);", "@Transactional(readOnly = true)\n\t@Override\n\tpublic List<Object[]> getApplicants() {\n\t\treturn dao.getApplicants();\n\t}", "List<ApplicantDetailsResponse> getAllApplicants() throws ServiceException;", "AdminApplication getApplication();", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "public String prepareToAddApplication() {\r\n\t\tSystem.out.println(\"aaa\");\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry {\r\n\t\t\tuserRole = (Employee) request.getSession().getAttribute(\"user\");\r\n\t\t\tif(userRole.isApprover()){\r\n\t\t\t\tallapprover = ied.getApproversForApproveer(userRole.getEmpName());\r\n\t\t\t\talladmin = ied.getAllAdmins();\r\n\t\t\t\treturn \"prepare_approver_success\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tallapprover = ied.getAllApprovers();\r\n\t\t\talladmin = ied.getAllAdmins();\r\n\t\t return \"success\";\r\n\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"error\";\r\n\t }\r\n\t}", "private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }", "GlobalAuthorizationConfigurationBuilder authorization();", "public LinkedIntegrationRuntimeRbacAuthorization() {}", "protected void getApps(){\n DBPermissions db =new DBPermissions();\n this.apps=db.getApps();\n db.close();\n }", "Account apply();", "@Override\n public void onPermissionGranted() {\n }", "ApplicationId appId();", "Appinfo createAppinfo();", "public interface ApplicantService {\r\n\r\n\t/**\r\n\t * Adds a new application or updates an existing application.\r\n\t * \r\n\t * @param addApplicantRequest\r\n\t * @return\r\n\t * @throws ServiceException\r\n\t */\r\n\tApplicantDetailsResponse addOrUpdateApplicant(AddApplicantRequest addApplicantRequest) throws ServiceException;\r\n\r\n\t/**\r\n\t * Gets applicant details along with application details by applicant id.\r\n\t * \r\n\t * @param employeeId\r\n\t * @return\r\n\t * @throws ServiceException\r\n\t */\r\n\tApplicantDetailsResponse getApplicantDetailsById(Integer employeeId) throws ServiceException;\r\n\r\n\t/**\r\n\t * Deletes applicant by its given applicant id.\r\n\t * \r\n\t * @param applicantId\r\n\t */\r\n\tvoid deleteApplicantById(Integer applicantId);\r\n\r\n\t/**\r\n\t * Gets all applicants present.\r\n\t * \r\n\t * @return\r\n\t * @throws ServiceException\r\n\t */\r\n\tList<ApplicantDetailsResponse> getAllApplicants() throws ServiceException;\r\n\r\n\t/**\r\n\t * Gets all applicants by given years of experience and skill.\r\n\t * \r\n\t * @param skill\r\n\t * @param yearsOfExperience\r\n\t * @return\r\n\t * @throws ServiceException\r\n\t */\r\n\tList<ApplicantDetailsResponse> getAllApplicantsByYearsOfExperienceAndSkill(String skill, Integer yearsOfExperience)\r\n\t\t\tthrows ServiceException;\r\n\r\n\t/**\r\n\t * Gets all jobs by given years of experience and skill.\r\n\t * \r\n\t * @param skill\r\n\t * @param yearsOfExperience\r\n\t * @return\r\n\t * @throws ServiceException\r\n\t */\r\n\tList<JobDetailsResponse> getAllJobByYearsOfExperienceAndSkill(String skill, Integer yearsOfExperience)\r\n\t\t\tthrows ServiceException;\r\n\r\n\t/**\r\n\t * Enables applicant to apply for the given job id.\r\n\t * \r\n\t * @param applicantId\r\n\t * @param jobId\r\n\t * @return\r\n\t * @throws ServiceException\r\n\t */\r\n\tApplicantDetailsResponse applyJob(Integer applicantId, Integer jobId) throws ServiceException;\r\n\r\n}", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "public void referToSocialServices(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n public void onPermissionGranted() {\n }", "private AliasAction() {\n\n\t}", "protected final void runAsAdmin() {\n authenticationTestingUtil.grantAdminAuthority( this.applicationContext );\n }", "void ensureAdminAccess() {\n Account currentAccount = SecurityContextHolder.getContext().getAccount();\n if (!currentAccount.isAdmin()) {\n throw new IllegalStateException(\"Permission denied.\");\n }\n }", "@Override\n public OAuthApplicationInfo createApplication(OAuthAppRequest oauthAppRequest) throws APIManagementException {\n OAuthApplicationInfo oAuthApplicationInfo = oauthAppRequest.getOAuthApplicationInfo();\n\n // Subscriber's name should be passed as a parameter, since it's under the subscriber the OAuth App is created.\n String userId = (String) oAuthApplicationInfo.getParameter(ApplicationConstants.\n OAUTH_CLIENT_USERNAME);\n String applicationName = oAuthApplicationInfo.getClientName();\n String keyType = (String) oAuthApplicationInfo.getParameter(ApplicationConstants.APP_KEY_TYPE);\n String callBackURL = (String) oAuthApplicationInfo.getParameter(ApplicationConstants.APP_CALLBACK_URL);\n if (keyType != null) {\n applicationName = applicationName + '_' + keyType;\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to create OAuth application :\" + applicationName);\n }\n\n String tokenScope = (String) oAuthApplicationInfo.getParameter(\"tokenScope\");\n String[] tokenScopes = new String[1];\n tokenScopes[0] = tokenScope;\n\n org.wso2.carbon.apimgt.api.model.xsd.OAuthApplicationInfo info = null;\n\n try {\n org.wso2.carbon.apimgt.api.model.xsd.OAuthApplicationInfo applicationToCreate =\n new org.wso2.carbon.apimgt.api.model.xsd.OAuthApplicationInfo();\n applicationToCreate.setIsSaasApplication(oAuthApplicationInfo.getIsSaasApplication());\n applicationToCreate.setCallBackURL(callBackURL);\n applicationToCreate.setClientName(applicationName);\n applicationToCreate.setAppOwner(userId);\n applicationToCreate.setJsonString(oAuthApplicationInfo.getJsonString());\n applicationToCreate.setTokenType(oAuthApplicationInfo.getTokenType());\n info = createOAuthApplicationbyApplicationInfo(applicationToCreate);\n } catch (Exception e) {\n handleException(\"Can not create OAuth application : \" + applicationName, e);\n } \n\n if (info == null || info.getJsonString() == null) {\n handleException(\"OAuth app does not contains required data : \" + applicationName,\n new APIManagementException(\"OAuth app does not contains required data\"));\n }\n\n oAuthApplicationInfo.addParameter(\"tokenScope\", tokenScopes);\n oAuthApplicationInfo.setClientName(info.getClientName());\n oAuthApplicationInfo.setClientId(info.getClientId());\n oAuthApplicationInfo.setCallBackURL(info.getCallBackURL());\n oAuthApplicationInfo.setClientSecret(info.getClientSecret());\n oAuthApplicationInfo.setIsSaasApplication(info.getIsSaasApplication());\n\n try {\n JSONObject jsonObject = new JSONObject(info.getJsonString());\n\n if (jsonObject.has(ApplicationConstants.\n OAUTH_REDIRECT_URIS)) {\n oAuthApplicationInfo.addParameter(ApplicationConstants.\n OAUTH_REDIRECT_URIS, jsonObject.get(ApplicationConstants.OAUTH_REDIRECT_URIS));\n }\n\n if (jsonObject.has(ApplicationConstants.OAUTH_CLIENT_NAME)) {\n oAuthApplicationInfo.addParameter(ApplicationConstants.\n OAUTH_CLIENT_NAME, jsonObject.get(ApplicationConstants.OAUTH_CLIENT_NAME));\n }\n\n if (jsonObject.has(ApplicationConstants.OAUTH_CLIENT_GRANT)) {\n oAuthApplicationInfo.addParameter(ApplicationConstants.\n OAUTH_CLIENT_GRANT, jsonObject.get(ApplicationConstants.OAUTH_CLIENT_GRANT));\n }\n } catch (JSONException e) {\n handleException(\"Can not retrieve information of the created OAuth application\", e);\n }\n\n return oAuthApplicationInfo;\n\n }", "@Override\n public void onGranted() {\n }", "public void consulterCatalog() {\n\t\t\n\t}", "@Override\n protected String requiredPostPermission() {\n return \"admin\";\n }", "public abstract boolean addRunAs(ServiceSecurity serviceSecurity, SecurityContext securityContext);", "public void addMSCAdminToPR(ApprovalRequest ar, Approvable lic) {\r\n\t\tLog.customer.debug(\"%s ::: addMSCAdminToPR - %s\", className, lic);\r\n\t\tProcureLineItemCollection plic = (ProcureLineItemCollection) lic;\r\n\t\tString TaxRole = \"MSC Administrator\";\r\n\t\tString TaxReason = \"Tax Reason\";\r\n\t\tboolean flag1 = true;\r\n\t\tObject obj = Role.getRole(TaxRole);\r\n\t\t// plic.setFieldValue(\"ProjectID\",\"F\");\r\n\t\tLog.customer.debug(\"%s ::: isMSCAdminRequired - plic bfore create %s\",\r\n\t\t\t\tclassName, plic.toString());\r\n\t\tApprovalRequest approvalrequest1 = ApprovalRequest.create(plic,\r\n\t\t\t\t((ariba.user.core.Approver) (obj)), flag1, \"RuleReasons\",\r\n\t\t\t\tTaxReason);\r\n\t\tLog.customer.debug(\"%s ::: approvalrequest1 got activated- %s\",\r\n\t\t\t\tclassName);\r\n\r\n\t\tBaseVector basevector1 = plic.getApprovalRequests();\r\n\t\tLog.customer.debug(\"%s ::: basevector1 got activated- %s\", className);\r\n\r\n\t\tBaseVector basevector2 = approvalrequest1.getDependencies();\r\n\t\tLog.customer.debug(\"%s ::: basevector2 got activated- %s\", className);\r\n\r\n\t\tbasevector2.add(0, ar);\r\n\t\tLog.customer.debug(\"%s ::: ar added to basevector2 %s\", className);\r\n\r\n\t\tapprovalrequest1.setFieldValue(\"Dependencies\", basevector2);\r\n\t\tar.setState(2);\r\n\t\tLog.customer.debug(\"%s ::: ar.setState- %s\", className);\r\n\r\n\t\tar.updateLastModified();\r\n\t\tLog.customer.debug(\"%s ::: ar.updatelastmodified- %s\", className);\r\n\r\n\t\tbasevector1.removeAll(ar);\r\n\t\tLog.customer.debug(\"%s ::: basevecotr1 .removeall %s\", className);\r\n\r\n\t\tbasevector1.add(0, approvalrequest1);\r\n\t\tLog.customer.debug(\"%s ::: basevector1 .add- %s\", className);\r\n\r\n\t\tplic.setApprovalRequests(basevector1);\r\n\t\tLog.customer.debug(\"%s ::: ir .setApprovalRequests got activated- %s\",\r\n\t\t\t\tclassName);\r\n\r\n\t\tjava.util.List list = ListUtil.list();\r\n\t\tjava.util.Map map = MapUtil.map();\r\n\t\tboolean flag6 = approvalrequest1.activate(list, map);\r\n\r\n\t\tLog.customer.debug(\"%s ::: New TaxAR Activated - %s\", className);\r\n\t\tLog.customer.debug(\"%s ::: State (AFTER): %s\", className);\r\n\t\tLog.customer.debug(\"%s ::: Approved By: %s\", className);\r\n\r\n\t}", "protected abstract void applyPrinciple();", "@Override\n\tpublic void apply( final ApplyFn fn ) throws AccessDeniedException;", "public void viewApplicants() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(dev_GSP_CLICKER)).click();\n\t\tdriver.findElement(By.xpath(dev_GSP_CONDITIONALLYAPPROVE)).click();\n\t\tThread.sleep(1000);\n\t\tWebElement promowz = driver.findElement(By.xpath(dev_GSP_CAPPROVEREASON));\n\t\tpromowz.sendKeys(\"c\");\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(By.xpath(dev_GSP_CAPPROVEBUTTON)).click();\n\t\tAssert.assertTrue(\"Successfully conditionally approved!\", elementUtil.isElementAvailabe(dev_GSP_CAPPROVESUCCESS));\n\t\tlogger.info(\"Passed conditionally approved\");\n\t\t\n\t}", "@Transactional\n\t@Override\n\tpublic List<ApplicantModel> viewAllApplicants() {\n\t\treturn applicantRepo.findAll().stream().map(course -> parser.parse(course))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "void enableSecurity();", "@Override\n\tprotected void createEditPolicies()\n\t{\n\t\t\n\t}", "@Override\r\n protected String appSecret() {\r\n return \"\";\r\n }", "private PermissionHelper() {}", "@Test\n public void testAdminCanSeeOtherUserApplication() throws Exception {\n Set<Id> appIds = ImmutableSet.of(Id.valueOf(5000));\n User user = User.builder()\n .withId(Id.valueOf(5000))\n .withApplicationIds(appIds)\n .withRole(Role.ADMIN)\n .build();\n UserAwareQueryContext context = new UserAwareQueryContext(ApplicationSources.defaults(), \n ActiveAnnotations.standard(),\n Optional.of(user));\n UserAwareQuery<Application> query = UserAwareQuery.singleQuery(Id.valueOf(6000), context);\n UserAwareQueryResult<Application> result = executor.execute(query);\n assertFalse(result.isListResult());\n assertEquals(result.getOnlyResource().getId(), Id.valueOf(6000));\n }", "@Override\n protected void appStart() {\n }", "private AppAuth() {\n }", "@Override\n public void onGranted() {\n }", "@Override\n public void onGranted() {\n }", "@Override\n protected void onPlusClientRevokeAccess() {\n }", "@Override\n protected void onPlusClientRevokeAccess() {\n }", "public String admit() {\n\n Applicants applicants = new Applicants(\"Daniel\", \"Okoro\", 17, \"male\", 70);\n System.out.println(applicants.admitted());\n return applicants.admitted();\n }", "@Test\n public void testCanSeeOwnApplication() throws Exception {\n Set<Id> appIds = ImmutableSet.of(Id.valueOf(5000));\n User user = User.builder()\n .withId(Id.valueOf(5000))\n .withApplicationIds(appIds)\n .withRole(Role.REGULAR)\n .build();\n UserAwareQueryContext context = new UserAwareQueryContext(ApplicationSources.defaults(), \n ActiveAnnotations.standard(),\n Optional.of(user));\n UserAwareQuery<Application> query = UserAwareQuery.singleQuery(Id.valueOf(5000), context);\n UserAwareQueryResult<Application> result = executor.execute(query);\n assertFalse(result.isListResult());\n assertEquals(result.getOnlyResource().getId(), Id.valueOf(5000));\n }", "public interface SysPermissionService {\n}", "public void checkAuthority() {\n }", "Authorizor createAuthorizor();", "@Test\n void getAllClientIdWithAccess_gaeAdmin() {\n AuthenticatedRegistrarAccessor registrarAccessor =\n new AuthenticatedRegistrarAccessor(\n GAE_ADMIN, ADMIN_CLIENT_ID, SUPPORT_GROUP, lazyGroupsConnection);\n\n assertThat(registrarAccessor.getAllClientIdWithRoles())\n .containsExactly(\n CLIENT_ID_WITH_CONTACT, ADMIN,\n CLIENT_ID_WITH_CONTACT, OWNER,\n\n REAL_CLIENT_ID_WITHOUT_CONTACT, ADMIN,\n\n OTE_CLIENT_ID_WITHOUT_CONTACT, ADMIN,\n OTE_CLIENT_ID_WITHOUT_CONTACT, OWNER,\n\n ADMIN_CLIENT_ID, ADMIN,\n ADMIN_CLIENT_ID, OWNER);\n verifyNoInteractions(lazyGroupsConnection);\n }", "private void createUsersAndApplications() throws Exception {\n UserManagementUtils.signupUser(USER_ONE, PASSWORD, FIRST_NAME, ORGANIZATION);\n //signup of user two\n UserManagementUtils.signupUser(USER_TWO, PASSWORD, FIRST_NAME, ORGANIZATION);\n\n restAPIStoreClientUser1 = new RestAPIStoreImpl(USER_ONE, PASSWORD, SUPER_TENANT_DOMAIN, storeURLHttps);\n restAPIStoreClientUser2 = new RestAPIStoreImpl(USER_TWO, PASSWORD, SUPER_TENANT_DOMAIN, storeURLHttps);\n\n // Create Application for user one\n HttpResponse appCreationResponse1 = restAPIStoreClientUser1.createApplication(APPLICATION_NAME,\n \"App created by user1\", APIMIntegrationConstants.APPLICATION_TIER.UNLIMITED,\n ApplicationDTO.TokenTypeEnum.JWT);\n userOneApplicationId = appCreationResponse1.getData();\n\n // Create Application for user two\n HttpResponse appCreationResponse2 = restAPIStoreClientUser2.createApplication(APPLICATION_NAME,\n \"App created by user2\", APIMIntegrationConstants.APPLICATION_TIER.UNLIMITED,\n ApplicationDTO.TokenTypeEnum.JWT);\n userTwoApplicationId = appCreationResponse2.getData();\n\n HttpResponse appCreationResponse3 = restAPIStoreClientUser1.createApplicationWithOrganization(SHARED_APPLICATION_NAME,\n \"App created by user1\", APIMIntegrationConstants.APPLICATION_TIER.UNLIMITED,\n ApplicationDTO.TokenTypeEnum.JWT, groups);\n userOneSharedApplicationId = appCreationResponse3.getData();\n }", "public static void main(String[] args) throws Exception {\n // Create an authorized API client\n PlusDomains service = authenticate();\n File file = new java.io.File(SERVICE_ACCOUNT_PKCS12_FILE_PATH);\n System.out.println(\"file Can Read :: \"+ file.canRead());\n \n System.out.println(\"service :: \"+service);\n System.out.println(\"service Activity :: \"+ service.activities());\n // Set the user's ID to 'me': requires the plus.me scope\n String userId = \"me\";\n String msg = \"Happy Monday! #caseofthemondays\";\n\n System.out.println(\"Inserting activity\");\n\n // Create the audience of the post\n PlusDomainsAclentryResource res = new PlusDomainsAclentryResource();\n // Share to the domain\n res.setType(\"domain\");\n\n List<PlusDomainsAclentryResource> aclEntries = new ArrayList<PlusDomainsAclentryResource>();\n aclEntries.add(res);\n\n Acl acl = new Acl();\n acl.setItems(aclEntries);\n // Required, this does the domain restriction\n acl.setDomainRestricted(true);\n\n Activity activity = new Activity()\n .setObject(new Activity.PlusDomainsObject().setOriginalContent(msg))\n .setAccess(acl);\n\n activity = service.activities().insert(userId, activity).execute();\n\n System.out.println(activity);\n }", "public void authorizeTransaction() {}", "void permissionGranted(int requestCode);", "@PreAuthorize(\"hasRole('ADMIN')\")\n public ProductDto retrieveAuthorizedProducts() { \n return new ProductDto(\"1\", \"iPhone\", 999.99f);\n }", "public void onPermissionGranted() {\n\n }", "private void buildAdmin()\n {\n User admin = userServiceImpl.getUserByUsername(adminUsername);\n try\n {\n //If the application is started for the first time (e.g., the admin is not in the DB)\n if(admin==null)\n { \n \t registerUserService.save(adminUsername,password,Role.Admin); \n }\n //if the application has previously been started (e.g., the admin is already present in the DB)\n else\n {\n \t //Do nothing!! \n }\n \n //Always add this retails when started the application.\n \n \tCountry mexico = new Country();\n \tmexico.setCountryId(1);\n \tmexico.setCountryName(\"México\");\n\t\t\tmexico.setCurrency(\"Peso MXN\");\n\t\t\tmexico.setNickname(\"MX\");\n\t\t\taddCountryService.saveCountry(mexico);\t\n\t\t\t\n\t\t\t\n\t\t\tCountry usa = new Country();\n\t\t\tusa.setCountryId(2);\n\t\t\tusa.setCountryName(\"United States\");\n\t\t\tusa.setCurrency(\"USD\");\n\t\t\tusa.setNickname(\"US\");\n\t\t\taddCountryService.saveCountry(usa);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail1 = new Retail();\n\t\t\tretail1.setRetailId(1);\n\t\t\tretail1.setRetailName(\"Amazon\");\n\t\t\tretail1.setCrawlerName(\"Amazon\");\n\t\t\tretail1.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail1);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail2 = new Retail();\n\t\t\tretail2.setRetailId(2);\n\t\t\tretail2.setRetailName(\"Arome\");\n\t\t\tretail2.setCrawlerName(\"Arome\");\n\t\t\tretail2.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail2);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail3 = new Retail();\n\t\t\tretail3.setRetailId(3);\n\t\t\tretail3.setRetailName(\"Chedraui\");\n\t\t\tretail3.setCrawlerName(\"Chedraui\");\n\t\t\tretail3.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail3);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail4 = new Retail();\n\t\t\tretail4.setRetailId(4);\n\t\t\tretail4.setRetailName(\"Laeuropea\");\n\t\t\tretail4.setCrawlerName(\"Laeuropea\");\n\t\t\tretail4.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail4);\n\t\t\t\n\t\t\tRetail retail5 = new Retail();\n\t\t\tretail5.setRetailId(5);\n\t\t\tretail5.setRetailName(\"Linio\");\n\t\t\tretail5.setCrawlerName(\"Linio\");\n\t\t\tretail5.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail5);\n\t\t\t\n\t\t\tRetail retail6 = new Retail();\n\t\t\tretail6.setRetailId(6);\n\t\t\tretail6.setRetailName(\"Liverpool\");\n\t\t\tretail6.setCrawlerName(\"Liverpool\");\n\t\t\tretail6.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail6);\n\t\t\t\n\t\t\tRetail retail7 = new Retail();\n\t\t\tretail7.setRetailId(7);\n\t\t\tretail7.setRetailName(\"MercadoLibre\");\n\t\t\tretail7.setCrawlerName(\"MercadoLibre\");\n\t\t\tretail7.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail7);\n\t\t\t\n\t\t\tRetail retail8 = new Retail();\n\t\t\tretail8.setRetailId(8);\n\t\t\tretail8.setRetailName(\"NutritionDepot\");\n\t\t\tretail8.setCrawlerName(\"NutritionDepot\");\n\t\t\tretail8.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail8);\n\t\t\t\n\t\t\tRetail retail9 = new Retail();\n\t\t\tretail9.setRetailId(9);\n\t\t\tretail9.setRetailName(\"Osom\");\n\t\t\tretail9.setCrawlerName(\"Osom\");\n\t\t\tretail9.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail9);\n\t\t\t\n\t\t\tRetail retail10 = new Retail();\n\t\t\tretail10.setRetailId(10);\n\t\t\tretail10.setRetailName(\"PerfumesMexico\");\n\t\t\tretail10.setCrawlerName(\"PerfumesMexico\");\n\t\t\tretail10.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail10);\n\t\t\t\n\t\t\tRetail retail11 = new Retail();\n\t\t\tretail11.setRetailId(11);\n\t\t\tretail11.setRetailName(\"PerfumesOnline\");\n\t\t\tretail11.setCrawlerName(\"PerfumesOnline\");\n\t\t\tretail11.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail11);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail12 = new Retail();\n\t\t\tretail12.setRetailId(12);\n\t\t\tretail12.setRetailName(\"Prissa\");\n\t\t\tretail12.setCrawlerName(\"Prissa\");\n\t\t\tretail12.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail12);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tRetail retail13 = new Retail();\n\t\t\tretail13.setRetailId(13);\n\t\t\tretail13.setRetailName(\"Sanborns\");\n\t\t\tretail13.setCrawlerName(\"Sanborns\");\n\t\t\tretail13.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail13);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail14 = new Retail();\n\t\t\tretail14.setRetailId(14);\n\t\t\tretail14.setRetailName(\"Soriana\");\n\t\t\tretail14.setCrawlerName(\"Soriana\");\n\t\t\tretail14.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail14);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail15 = new Retail();\n\t\t\tretail15.setRetailId(15);\n\t\t\tretail15.setRetailName(\"SuperWalmart\");\n\t\t\tretail15.setCrawlerName(\"SuperWalmart\");\n\t\t\tretail15.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail15);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail16 = new Retail();\n\t\t\tretail16.setRetailId(16);\n\t\t\tretail16.setRetailName(\"SuplementosFitness\");\n\t\t\tretail16.setCrawlerName(\"SuplementosFitness\");\n\t\t\tretail16.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail16);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tRetail retail17 = new Retail();\n\t\t\tretail17.setRetailId(17);\n\t\t\tretail17.setRetailName(\"Walmart\");\n\t\t\tretail17.setCrawlerName(\"Walmart\");\n\t\t\tretail17.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail17);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n System.out.println(\"Errors occurred during initialization. System verification is required.\");\n }\n }", "Account apply(Context context);", "public interface payCertAM extends ApplicationModule {\r\n void createNewCertification();\r\n\r\n void refreshCertification();\r\n}", "protected void onAfterCreateApplication() {\n\n\t}", "private boolean isAuthorized() {\n return true;\n }", "ApplicantDetailsResponse addOrUpdateApplicant(AddApplicantRequest addApplicantRequest) throws ServiceException;", "public int getTenantId() { return tenantId; }", "public void AddToAccountInfo();", "public contrustor(){\r\n\t}", "short appId();", "@Override\n public boolean hasPermission(Permission permission) {\n // FacesContext context = FacesContext.getCurrentInstance();\n String imp = (String)ADFContext.getCurrent().getSessionScope().get(\"isImpersonationOn\");\n// String imp = (String)context.getExternalContext().getSessionMap().get(\"isImpersonationOn\");\n if(imp == null || !imp.equals(\"Y\")){\n return super.hasPermission(permission);\n }\n else{\n return true;\n \n }\n \n }", "AdminConsole createAdminConsole();", "@Override\r\n\tpublic void list_private() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_private();\r\n\t\t}\r\n\t}", "@Override\npublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t// TODO Auto-generated method stub\n\treturn null;\n}", "protected abstract String getAuthorization();", "abstract public void getPermission();", "@Test\n public void testAccessControlIsOnlyCheckedWhenNoProdDeploymentExists() {\n List<Host> hosts = createHosts(18, \"6.0.0\");\n\n List<ModelFactory> modelFactories = List.of(createHostedModelFactory(Version.fromString(\"6.0.0\")),\n createHostedModelFactory(Version.fromString(\"6.1.0\")),\n createHostedModelFactory(Version.fromString(\"6.2.0\")));\n\n DeployTester tester = createTester(hosts, modelFactories, prodZone, Clock.systemUTC());\n ApplicationId applicationId = tester.applicationId();\n // Deploy with oldest version\n tester.deployApp(\"src/test/apps/hosted/\", \"6.0.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n\n // Deploy with version that does not exist on hosts and with app package that has no write access control,\n // validation of access control should not be done, since the app is already deployed in prod\n tester.deployApp(\"src/test/apps/hosted-no-write-access-control\", \"6.1.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n }", "public void syncApprovedApplicantsFromErp() {\n\t\tList<String> allErpCodes = applicationDao.getAllProcessedApplicationFileNos();\r\n\t\t// List<String> allErpCodes = Arrays.asList(\"C/20293\", \"C/20292\",\r\n\t\t// \"C/20390\");\r\n\t\tList<ApplicationSyncPayLoad> syncedApplicants = new ArrayList<>();\r\n\t\tint successCounter = 0;\r\n\t\tint totalToBeSynced = 0;\r\n\t\tif (!allErpCodes.isEmpty()) {\r\n\t\t\ttotalToBeSynced = allErpCodes.size();\r\n\t\t\tJSONArray mJSONArray = new JSONArray(allErpCodes);\r\n\r\n\t\t\t// Send this to ERP\r\n\t\t\ttry {\r\n\t\t\t\tString results = postErpCodesToERP(mJSONArray);\r\n\t\t\t\tif (results.equals(\"null\")) {\r\n\t\t\t\t\tlogger.error(\" ===>>><<<< === NO REPLY FROM ERP ===>><<<>>== \");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJSONArray jo = null;\r\n\t\t\t\t\tjo = new JSONArray(results);\r\n\t\t\t\t\tfor (int i = 0; i < jo.length(); i++) {\r\n\t\t\t\t\t\tJSONObject jObject = null;\r\n\t\t\t\t\t\tjObject = jo.getJSONObject(i);\r\n\t\t\t\t\t\tApplicationSyncPayLoad syncPayLoad = new ApplicationSyncPayLoad();\r\n\t\t\t\t\t\tsyncPayLoad.setApplicationNo_(jObject.getString(\"Application No_\"));\r\n\t\t\t\t\t\tsyncPayLoad.setEmail(jObject.getString(\"email\"));\r\n\t\t\t\t\t\tsyncPayLoad.setReg_no(jObject.getString(\"reg_no\"));\r\n\t\t\t\t\t\tsyncedApplicants.add(syncPayLoad);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (ApplicationSyncPayLoad appSync : syncedApplicants) {\r\n\t\t\t\t\t\t// Update this Applications\r\n\t\t\t\t\t\tlogger.info(\"Finding application:\" + appSync.getApplicationNo_());\r\n\t\t\t\t\t\tList<ApplicationFormHeader> applications = applicationDao\r\n\t\t\t\t\t\t\t\t.findByErpCode(appSync.getApplicationNo_());\r\n\r\n\t\t\t\t\t\tApplicationFormHeader application = null;\r\n\t\t\t\t\t\tif (applications.size() > 0) {\r\n\t\t\t\t\t\t\tapplication = applications.get(0);\r\n\t\t\t\t\t\t\tif (application != null) {\r\n\t\t\t\t\t\t\t\t// Find the User and Member Object and User\r\n\t\t\t\t\t\t\t\tif (application.getUserRefId() != null) {\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"marking this application as approved:\" + application.getRefId());\r\n\t\t\t\t\t\t\t\t\tapplication.setApplicationStatus(ApplicationStatus.APPROVED);\r\n\t\t\t\t\t\t\t\t\tUser user = userDao.findByUserId(application.getUserRefId(), false);\r\n\t\t\t\t\t\t\t\t\tMember m = null;\r\n\t\t\t\t\t\t\t\t\tif (user != null) {\r\n\t\t\t\t\t\t\t\t\t\tuser.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\tuserDao.deleteAllRolesForCurrentUser(user.getId());\r\n\t\t\t\t\t\t\t\t\t\tRole role = roleDao.getByName(\"MEMBER\");\r\n\t\t\t\t\t\t\t\t\t\tif (role != null) {\r\n\t\t\t\t\t\t\t\t\t\t\tuser.addRole(role);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Changing the user role from basic_member to member.\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (user.getMember() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\tm = user.getMember();\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setRegistrationDate(application.getCreated());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setUserRefId(user.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberQrCode(m.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(m);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating member record.\");\r\n\t\t\t\t\t\t\t\t\t\t\t// Save all this parameters\r\n\t\t\t\t\t\t\t\t\t\t\t// Applicant, Member, User\r\n\t\t\t\t\t\t\t\t\t\t\tapplicationDao.save(application);\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(user);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating user record.\");\r\n\t\t\t\t\t\t\t\t\t\t\tsuccessCounter = successCounter + 1;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member Record is Null for user with memberNo:\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ user.getMemberNo()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \". Checking if the member record exist or create a new record.\");\r\n\t\t\t\t\t\t\t\t\t\t\t// Check if there was a previous\r\n\t\t\t\t\t\t\t\t\t\t\t// member\r\n\t\t\t\t\t\t\t\t\t\t\t// Record created\r\n\t\t\t\t\t\t\t\t\t\t\tMember member = null;\r\n\t\t\t\t\t\t\t\t\t\t\tmember = memberDao.findByMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tif (member == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tmember = new Member();\r\n\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member doesn't exist. Creating new MemberRecord\");\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member already exist. Just ammending it.\");\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setRegistrationDate(application.getCreated());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setUserRefId(user.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberQrCode(member.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(member);\r\n\t\t\t\t\t\t\t\t\t\t\tuser.setMember(member);\r\n\t\t\t\t\t\t\t\t\t\t\t// Save all this parameters\r\n\t\t\t\t\t\t\t\t\t\t\t// Applicant, Member, User\r\n\t\t\t\t\t\t\t\t\t\t\tapplicationDao.save(application);\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(user);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating user record.\");\r\n\t\t\t\t\t\t\t\t\t\t\tsuccessCounter = successCounter + 1;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tSystem.err.println(\"Total To Be Synced:\" + totalToBeSynced + \"\\n\");\r\n\t\t\t\t\tSystem.err.println(\"Total Success:\" + successCounter + \"\\n\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (URISyntaxException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private List<GrantedAuthority> buildAuthorities() {\n List<GrantedAuthority> auths = new ArrayList<>();\n auths.add(new SimpleGrantedAuthority(\"User\")); //When User get an Role attribute, change it here\n return new ArrayList<>(auths);\n }", "@Override\n public void onAdLeftApplication() {\n }", "@Override\n\t@Scheduled(cron = \"0 0 0 * * ?\")\n\tpublic void changeOwnerConsent() throws UnauthorizedException {\n\n\t\tActivitiResponseModel<List<RtaTaskInfo>> activeInstances = activitiService\n\t\t\t\t.getActiveInstances(taskOwnerConscent);\n\t\tList<RtaTaskInfo> tasks = activeInstances.getActiveTasks();\n\t\tList<String> exectionIds = new ArrayList<String>();\n\t\tfor (RtaTaskInfo task : tasks) {\n\t\t\texectionIds.add(task.getProcessInstanceId());\n\t\t}\n\n\t\tRegistrationServiceResponseModel<TokenModel> loginResponse = registrationService.loginIfRequired(getUsername(),\n\t\t\t\tgetPassword());\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<OwnerConscent> httpEntity = null;\n\t\theaders.setContentType(MediaType.APPLICATION_JSON);\n\t\theaders.add(\"Authorization\", loginResponse.getResponseBody().getToken());\n\t\tOwnerConscent consent = null;\n\t\tMap<String, String> appList = applicationService.getApplicationFromExecId(exectionIds);\n\t\tif (!appList.isEmpty()) {\n\t\t\tfor (Map.Entry<String, String> entry : appList.entrySet()) {\n\t\t\t\tconsent = new OwnerConscent();\n\t\t\t\tconsent.setOwnerConscent(false);\n\t\t\t\tconsent.setOwnerComment(OWNER_NO_RESPONSE);\n\t\t\t\thttpEntity = new HttpEntity<OwnerConscent>(consent, headers);\n\t\t\t\tResponseEntity<FreshRcModel> response = restTemplate.exchange(\n\t\t\t\t\t\tgetRootURL().append(\"/application/updateownerconsent/\").append(entry.getValue()).toString(),\n\t\t\t\t\t\tHttpMethod.POST, httpEntity, FreshRcModel.class);\n\t\t\t\tString instanceId = entry.getKey();\n\t\t\t\tif (response.getStatusCode() == HttpStatus.OK) {\n\t\t\t\t\tAssignee assignee = new Assignee();\n\t\t\t\t\tassignee.setUserId(CitizenConstants.CITIZEN_USERID);\n\t\t\t\t\tMap<String, Object> variables = new HashMap<String, Object>();\n\t\t\t\t\tif (response.getBody().getOwnerConsent()) {\n\t\t\t\t\t\tvariables.put(taskOwnerConscent, Status.APPROVED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvariables.put(taskOwnerConscent, Status.REJECTED);\n\t\t\t\t\t}\n\t\t\t\t\tactivitiService.completeTask(assignee, taskOwnerConscent, instanceId, true, variables);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "PermissionService getPermissionService();", "protected void enableSecurityAdvisor() {\r\n\tif (osylSecurityService.getCurrentUserRole().equals(\r\n\t\tOsylSecurityService.SECURITY_ROLE_COURSE_INSTRUCTOR)\r\n\t\t|| osylSecurityService.getCurrentUserRole().equals(\r\n\t\t\tOsylSecurityService.SECURITY_ROLE_PROJECT_MAINTAIN)) {\r\n\t securityService.pushAdvisor(new SecurityAdvisor() {\r\n\t\tpublic SecurityAdvice isAllowed(String userId, String function,\r\n\t\t\tString reference) {\r\n\t\t return SecurityAdvice.ALLOWED;\r\n\t\t}\r\n\t });\r\n\t}\r\n }", "@Override\r\n\tpublic void NroAccount() {\n\t\t\r\n\t}", "@Override\n\tpublic void onTenantActivation(int tenantId) throws StratosException {\n\t}", "@Override\n\tpublic String getApp() {\n\t\tthrow new UnsupportedOperationException(\"Not supported yet.\");\n\t}", "@Override\n public void onRequestAllow(String permissionName) {\n }", "public static void enableAds(BadBudgetApplication application)\n {\n }", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "@Override\n public void run(ApplicationArguments args) throws Exception {\n User alice = new User();\n alice.firstName(\"Alice\");\n alice.lastName(\"Alixon\");\n alice.emailAddress(\"alice@example.com\");\n alice.addRoleItem(UserRole.EMPLOYEE);\n alice.phone(\"+31 6 12345678\");\n alice.transactionLimit(BigDecimal.valueOf(100f));\n alice.dayLimit(1000f);\n alice.birthDate(LocalDate.of(2010, 10, 10));\n alice.password(\"idk\");\n\n userService.add(alice);\n\n // Charlie is just a customer\n User bob = new User();\n bob.firstName(\"Bob\");\n bob.lastName(\"Bobson\");\n bob.emailAddress(\"bob@example.com\");\n bob.addRoleItem(UserRole.CUSTOMER);\n bob.phone(\"+31 6 87654321\");\n bob.transactionLimit(BigDecimal.valueOf(50f));\n bob.dayLimit(2000f);\n bob.birthDate(LocalDate.of(2012, 12, 12));\n bob.password(\"idk\");\n\n userService.add(bob);\n\n // Charlie has both the customer and employee role\n User charlie = new User();\n charlie.firstName(\"Charlie\");\n charlie.lastName(\"Charhan\");\n charlie.emailAddress(\"charlie@example.com\");\n charlie.addRoleItem(UserRole.CUSTOMER);\n charlie.addRoleItem(UserRole.EMPLOYEE);\n charlie.phone(\"+31 6 12348765\");\n charlie.transactionLimit(BigDecimal.valueOf(200f));\n charlie.dayLimit(500f);\n charlie.birthDate(LocalDate.of(1980, 8, 18));\n charlie.password(\"idk\");\n\n userService.add(charlie);\n\n // Add account for\n // Bank\n\n Account bank = new Account();\n bank.setBalance(0f);\n bank.setAccountType(AccountType.CURRENT);\n bank.setIBAN(\"NL01INHO0000000001\");\n bank.setMinimumLimit(0f);\n bank.setUserId(null);\n accountRepository.save(bank);\n\n Account account = new Account();\n account.setBalance(1000f);\n account.setAccountType(AccountType.CURRENT);\n account.setIBAN(\"NL01INHO0000000002\");\n account.setMinimumLimit(50f);\n account.setUserId(2);\n accountRepository.save(account);\n\n Account accountBobSave = new Account();\n accountBobSave.setBalance(1000f);\n accountBobSave.setAccountType(AccountType.CURRENT);\n accountBobSave.setIBAN(\"NL01INHO0000000003\");\n accountBobSave.setMinimumLimit(50f);\n accountBobSave.setUserId(2);\n accountRepository.save(accountBobSave);\n\n Account accountSave = new Account();\n accountSave.setBalance(1000f);\n accountSave.setAccountType(AccountType.SAVING);\n accountSave.setIBAN(\"NL01INHO0000000004\");\n accountSave.setMinimumLimit(50f);\n accountSave.setUserId(3);\n accountRepository.save(accountSave);\n\n PostTransBody postTran = new PostTransBody();\n postTran.setAmount(50f);\n postTran.setTransactionType(TransactionType.TRANSFER);\n postTran.setTransferFrom(\"NL01INHO0000000002\");\n postTran.setTransferTo(\"NL01INHO0000000003\");\n\n PostTransBody postWith = new PostTransBody();\n postWith.setAmount(50f);\n postWith.setTransactionType(TransactionType.WITHDRAW);\n postWith.setTransferFrom(\"NL01INHO0000000002\");\n postWith.setTransferTo(\"\");\n\n PostTransBody postDrop = new PostTransBody();\n postDrop.setAmount(50f);\n postDrop.setTransactionType(TransactionType.DEPOSIT);\n postDrop.setTransferFrom(\"\");\n postDrop.setTransferTo(\"NL01INHO0000000002\");\n\n transactionService.createTransaction(bob.getEmailAddress(), postTran);\n\n transactionService.createTransaction(bob.getEmailAddress(), postWith);\n\n transactionService.createTransaction(charlie.getEmailAddress(), postDrop);\n }", "@GetMapping(\"applicants\")\n public List<Applicant> readAll() {\n return applicantService.getAll();\n }", "public static void traduitSiteAllemand() {\n\t\t\n\t}", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "public void addAppsAndGenerateKeys() throws Exception {\n //TEST_USER_1\n //Subscribe to API with a new application\n HttpResponse applicationResponse = user1ApiStore\n .createApplication(TEST_APPLICATION, \"Test Application\", APIThrottlingTier.UNLIMITED.getState(),\n ApplicationDTO.TokenTypeEnum.JWT);\n assertEquals(applicationResponse.getResponseCode(), HttpStatus.SC_OK, \"Response code is not as expected\");\n\n user1ApplicationId = applicationResponse.getData();\n //Generate production key\n //generate keys for the subscription\n ApplicationKeyDTO applicationKeyDTO = user1ApiStore\n .generateKeys(user1ApplicationId, \"3600\", USER_1_TEST_APP_INITIAL_CBU,\n ApplicationKeyGenerateRequestDTO.KeyTypeEnum.PRODUCTION, null, grantTypes);\n assertNotNull(applicationKeyDTO.getToken().getAccessToken());\n\n //TEST_USER_2\n //Subscribe to API with a new application\n\n applicationResponse = user2ApiStore\n .createApplication(TEST_APPLICATION, \"Test Application\", APIThrottlingTier.UNLIMITED.getState(),\n ApplicationDTO.TokenTypeEnum.JWT);\n assertEquals(applicationResponse.getResponseCode(), HttpStatus.SC_OK, \"Response code is not as expected\");\n\n user2ApplicationId = applicationResponse.getData();\n\n //Generate production key\n applicationKeyDTO = user2ApiStore.generateKeys(user2ApplicationId, \"3600\", USER_2_TEST_APP_INITIAL_CBU,\n ApplicationKeyGenerateRequestDTO.KeyTypeEnum.PRODUCTION, null, grantTypes);\n assertNotNull(applicationKeyDTO.getToken().getAccessToken());\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\tSimpleGrantedAuthority authority = new SimpleGrantedAuthority(appUserRole.name());\n\t\treturn Collections.singletonList(authority);\n\t}", "void requestNeededPermissions(int requestCode);", "SecurityProfile securityProfile();", "public static String applicationPermission() {\n return holder.format(\"applicationPermission\");\n }", "private native void destruirAplicacionNativa();", "@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ?\r\n// return;\r\n// }\r\n\r\n addPageMessage(respage.getString(\"no_have_correct_privilege_current_study\") + respage.getString(\"change_study_contact_sysadmin\"));\r\n throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString(\"not_allowed_access_extract_data_servlet\"), \"1\");// TODO\r\n // above copied from create dataset servlet, needs to be changed to\r\n // allow only admin-level users\r\n\r\n }" ]
[ "0.5948317", "0.5912051", "0.5850707", "0.56814194", "0.56521714", "0.56098896", "0.5604255", "0.5560081", "0.552591", "0.55088824", "0.54802614", "0.54759455", "0.5467662", "0.5464072", "0.54594857", "0.54498124", "0.54460174", "0.5445865", "0.54343504", "0.54261416", "0.54145", "0.5393742", "0.53866196", "0.5367197", "0.53462046", "0.53371996", "0.53354305", "0.5335175", "0.53140944", "0.5309476", "0.5302376", "0.52982974", "0.5286623", "0.5284994", "0.52845615", "0.5272857", "0.5231762", "0.52249897", "0.5221242", "0.52189374", "0.5217274", "0.52137053", "0.52062213", "0.519706", "0.519706", "0.5172469", "0.5172469", "0.51703435", "0.515946", "0.51533747", "0.5151727", "0.5136324", "0.51275", "0.5121921", "0.5118979", "0.5115122", "0.51094824", "0.50994426", "0.5094204", "0.50852984", "0.50798786", "0.50780135", "0.5072252", "0.50682974", "0.5066761", "0.5052397", "0.50435644", "0.50434124", "0.50425273", "0.5038009", "0.50341153", "0.50321245", "0.5016463", "0.5016123", "0.5014933", "0.50143015", "0.5012369", "0.500239", "0.4998625", "0.49929446", "0.49907067", "0.4987778", "0.49872768", "0.4976908", "0.49738055", "0.49730465", "0.49715504", "0.49610636", "0.49581537", "0.4956885", "0.49529198", "0.49526078", "0.4952414", "0.49508208", "0.49475446", "0.49366975", "0.4935912", "0.49304762", "0.49263316", "0.49241632", "0.49241072" ]
0.0
-1
Creates a new PasswordRecoveryItem and sets the given fields initially.
@com.exedio.cope.instrument.Generated // customize with @WrapperType(genericConstructor=...) private PasswordRecoveryItem(final com.exedio.cope.SetValue<?>... setValues){super(setValues);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@com.exedio.cope.instrument.Generated\n\tprivate PasswordRecoveryItem(final com.exedio.cope.ActivationParameters ap){super(ap);}", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "public NewItems() {\n super();\n }", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "public KeyRecoveryInformation() {\n }", "protected FollowersItem() {\n hashDupA = hashDupB = \"\";\n aw = null;\n }", "private ForgotPasswordUser populateForgotPassword()\n\t{\n\t\tForgotPasswordUser fUser = new ForgotPasswordUser();\n\t\tfUser.setAction(WebServiceAction.FORGOTPASSWORD);\n\t\tfUser.setEmail(medtUserName.getText().toString());\n\t\treturn fUser;\n\t}", "public KeyboardItem(final KeyboardItem item) {\n\t\tShift = item.Shift;\n\t\tControl = item.Control;\n\t\tAlt = item.Alt;\n\t\tCharKey = item.CharKey;\n\t\tMenuString = item.MenuString;\n\t\tActionName = item.ActionName;\n\t\tCommandType = item.CommandType;\n\t}", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public ItemRecord() {\n super(Item.ITEM);\n }", "public FSItem(String itemPath) {\n this.fsItemPath = itemPath;\n this.itemProperties = new FSItemProperties();\n }", "public void setItemProperties(FSItemProperties itemProperties) {\n this.itemProperties = itemProperties;\n }", "public PaymentRequestItem(OleInvoiceItem poi, OlePaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n InvoiceAccount poa = (InvoiceAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n // this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n /*Modified for the jira -5458*/\r\n this.purchaseOrderItemUnitPrice = poi.getPurchaseOrderItem()!=null ? poi.getPurchaseOrderItem().getItemUnitPrice() : null;\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "protected PickaxeItem(Tier debug1, int debug2, float debug3, Item.Properties debug4) {\n/* 100 */ super(debug2, debug3, debug1, DIGGABLES, debug4);\n/* */ }", "public PaymentRequestItem(PurchaseOrderItem poi, PaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n PurchaseOrderAccount poa = (PurchaseOrderAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n this.purchaseOrderItemUnitPrice = poi.getItemUnitPrice();\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "@Override\n\tpublic void initializeItemFields(CharacterClass item) {\n\t\titem.setStartingMainhandInstance(weaponBag.getItem(item.getStartingMainhand()));\n\t\titem.setStartingOffhandInstance(weaponBag.getItem(item.getStartingOffhand()));\n\n\t\titem.setStartingHelmetInstance(equipmentBag.getItem(item.getStartingHelmet()));\n\t\titem.setStartingChestInstance(equipmentBag.getItem(item.getStartingChest()));\n\t\titem.setStartingGlovesInstance(equipmentBag.getItem(item.getStartingGloves()));\n\t\titem.setStartingPantsInstance(equipmentBag.getItem(item.getStartingPants()));\n\t\titem.setStartingBootsInstance(equipmentBag.getItem(item.getStartingBoots()));\n\t\titem.setStartingRing1Instance(equipmentBag.getItem(item.getStartingRing1()));\n\t\titem.setStartingRing2Instance(equipmentBag.getItem(item.getStartingRing2()));\n\t\titem.setStartingNeckInstance(equipmentBag.getItem(item.getStartingNeck()));\n\n\t\t// Initialize Skills\n\t\tif(item.getSkillInstances() == null)\n\t\t\titem.setSkillInstances(new ArrayList<>());\n\n\t\tfor(String id: item.getSkills()) {\n\t\t\tSkill skill = skillBag.getItem(id);\n\t\t\titem.getSkillInstances().add(skill);\n\t\t}\n\t}", "public EnterpriseBeansItem() {\n super();\n }", "protected Item() {\n }", "public AbstractItemFactory(){\n this.setDefault();\n }", "public PurchaseOrderItem () {\n\t\tsuper();\n\t}", "public static LR0Item freshItem(Rule rule) {\n\t\treturn new LR0Item(rule.getLhs(), rule.getRhs(), 0);\n\t}", "public static PasswordField createPasswordField() {\t\t\n\t\tPasswordField password = new PasswordField();\n\t\tpassword.setPrefWidth(200);\n\t\tpassword.setPrefHeight(30);\n\t\treturn password;\n\t}", "public EntangledChaliceItem(Block block) {\n super(block);\n }", "public static Item create(long itemId) {\n\t\treturn getPersistence().create(itemId);\n\t}", "@Override\n public Item createItem(int itemNum, Item item) throws VendingMachinePersistenceException {\n loadItemFile();\n Item newItem = itemMap.put(itemNum, item);\n writeItemFile();\n return newItem;\n }", "@Override\n public Field<?> createField(Container container, Object itemId,\n Object propertyId, Component uiContext) {\n Field<?> field = super.createField(container, itemId,\n propertyId, uiContext);\n\n // ...and just set them as immediate\n ((AbstractField<?>) field).setImmediate(true);\n\n // Also modify the width of TextFields\n if (field instanceof TextField)\n field.setWidth(\"100%\");\n field.setRequired(true);\n ((TextField) field).setInputPrompt(\"Введите назначение\");\n field.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);\n field.focus();\n\n return field;\n }", "private void setUpRecoverPassword() {\n binding.textViewRecoverPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Open the fragment\n Timber.d(\"Forgot password clicked\");\n ForgotPasswordDialog forgotPasswordDialog = new ForgotPasswordDialog();\n forgotPasswordDialog.show(getChildFragmentManager(), ForgotPasswordDialog.class.getSimpleName());\n\n }\n });\n }", "public Item() {\n\t\tthis(rand.nextDouble() * GameManager.NATIVE_WIDTH, -30.0, PowerUp[new Random().nextInt(PowerUp.length)]);\n\t}", "public PassPinDataItem() {\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "@NonNull\n protected AbstractEntityItem.Builder newBuilder(\n @NonNull IRequiredValueModelNodeItem item,\n @NonNull ItemType itemType,\n @NonNull String identifier) {\n return new AbstractEntityItem.Builder()\n .instance(item, itemType)\n .originalIdentifier(identifier)\n .source(ObjectUtils.requireNonNull(item.getBaseUri(), \"item must have an associated URI\"));\n }", "public RecoveryLinear(int recoveryAmount)\n\t{\n\t\tthis.recoveryAmount = recoveryAmount; \n\t}", "public Item(Item item) {\n setId(item.getId());\n setName(item.getName());\n setPrice(item.getPrice());\n setWasPurchased(item.wasPurchased());\n setOrder(item.getOrder());\n setStoreName(item.getStoreName());\n }", "public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}", "public MigrationItemInner create(String fabricName, String protectionContainerName, String migrationItemName, EnableMigrationInputProperties properties) {\n return createWithServiceResponseAsync(fabricName, protectionContainerName, migrationItemName, properties).toBlocking().last().body();\n }", "public DessertItem() {\n this(\"\");\n }", "public Field createField(final Item item, final Object propertyId, final Component uiContext) {\n final String pid = (String) propertyId;\n\n final Field field = DefaultFieldFactory.get().createField(item, propertyId, uiContext);\n if (field instanceof AbstractTextField) {\n ((AbstractTextField) field).setNullRepresentation(\"\");\n }\n return field;\n }", "public DbRecord()\n {\n m_UserName = \"\";\n // Generate user's unique identifier\n m_Key = new byte[16];\n java.util.UUID guid = java.util.UUID.randomUUID();\n long itemHigh = guid.getMostSignificantBits();\n long itemLow = guid.getLeastSignificantBits();\n for( int i = 7; i >= 0; i-- )\n {\n m_Key[i] = (byte)(itemHigh & 0xFF);\n itemHigh >>>= 8;\n m_Key[8+i] = (byte)(itemLow & 0xFF);\n itemLow >>>= 8;\n }\n m_Template = null;\n }", "public Builder clearNewPassword() {\n copyOnWrite();\n instance.clearNewPassword();\n return this;\n }", "public ItemManager() {\n itemMap = new HashMap<>();\n importantItemList = new ArrayList<>();\n\n }", "public EditAccountPage fillPasswordField(String pass){\n\n pause();\n clickElement(newPasswordElement);\n pause();\n cleanElement(newPasswordElement);\n pause();\n setElementText(newPasswordElement, pass);\n\n return this;\n }", "void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;", "public void registerNewPassword(View view) {\r\n\t\t// Get the user's current password\r\n\t\tString currentPassword = currentPasswordInput.getText().toString();\r\n\r\n\t\t// Get the new, permanent password the user wants\r\n\t\tString newPassword = newPasswordInput.getText().toString();\r\n\t\t\r\n\t\t// Get the confirmation of the new, permanent password (should be the same as the previous field)\r\n\t\tString confirmNewPassword = confirmNewPasswordInput.getText().toString();\r\n\r\n\t\t/* Pass all three to the ResetPassword class, which will check validity, and, if valid,\r\n\t\t * reset the permanent password */\r\n\t\tResetPassword resetPassword = new ResetPassword(this);\r\n\t\tresetPassword.checkInputsAndTryToResetPassword(currentPassword, newPassword, confirmNewPassword);\r\n\t}", "public Item( Item p ) {\n\t\tif( p != null ) {\n\t\t\tvalue = p.value;\n\t\t\tname = p.name;\n\t\t}\n\t}", "ShipmentItemBilling createShipmentItemBilling();", "public BasketItemBuilder() {\n generateRandomId();\n }", "public abstract MapItem createMapItem(Object[] parameters) throws Exception;", "private void setNewPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n newPassword_ = value.toStringUtf8();\n }", "public ChooseLockPasswordFragment() {\n\n }", "public Builder setNewPasswordBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setNewPasswordBytes(value);\n return this;\n }", "WithCreate withProperties(AccountProperties properties);", "public @NotNull Item newItem();", "private void attemptCreation() {\n newFlat.setAddressLine1(\"\");\n newFlat.setPostcode(\"\");\n newFlat.setNotes(\"\");\n newFlat.setFlatNum(\"\");\n newFlat.setTenant(\"\");\n\n // Reset errors\n actvProperty.setError(null);\n etFlatNum.setError(null);\n etFlatNotes.setError(null);\n flatTenant.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for valid address, if the user entered one\n if (TextUtils.isEmpty(actvProperty.getText().toString())) {\n actvProperty.setError(\"This field is required\");\n cancel = true;\n focusView = actvProperty;\n } else if (!isAddressValid(actvProperty.getText().toString())) {\n actvProperty.setError(\"This address is invalid\");\n cancel = true;\n focusView = actvProperty;\n }\n\n // Check for a valid flat number, if the user entered one\n if (TextUtils.isEmpty(etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This field is required\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n } else if (!isFlatNumValid(\"Flat \" + etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This flat number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n\n Collections.sort(flatNums);\n\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Warning\")\n .setMessage(\"These flats already exist in \" + actvProperty.getText().toString()\n + \":\\n\\n\" + flatNums.toString() + \"\\n\\nPlease enter a unique number.\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .show();\n }\n\n // Check for valid tenant, if the user entered one\n if (TextUtils.isEmpty(flatTenant.getText().toString())) {\n // No need to add a tenant\n } else if (!isTenantValid(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant does not exist in the system\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n } else if (!isTenantFree(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n }\n\n // Check for notes and add default notes if null\n if (TextUtils.isEmpty(etFlatNotes.getText().toString())) {\n etFlatNotes.setText(\"No notes yet. That's okay, you can add some later..\");\n }\n\n if (cancel) {\n // There was an error; don't attempt creation and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n saveNewFlat();\n }\n }", "@Override\r\n\t\tpublic boolean createItem() {\n\t\t\treturn false;\r\n\t\t}", "private void resetPassword() {\n AdminKeyFile keyFile = new AdminKeyFile(instance);\n keyFile.read();\n if (keyFile.isReset()) {\n String password = AdminKeyFile.randomPassword(\n AdminKeyFile.RANDOM_PASSWORD_LENGTH); \n instance.setAdminPassword(password);\n keyFile.setPassword(password);\n try {\n PayaraInstance.writeInstanceToFile(instance);\n } catch(IOException ex) {\n LOGGER.log(Level.INFO,\n \"Could not store Payara server attributes\", ex);\n }\n keyFile.write();\n }\n }", "public Builder setNewPassword(\n String value) {\n copyOnWrite();\n instance.setNewPassword(value);\n return this;\n }", "public Item createNew(int count) {\r\n Item i = new Item(name, id);\r\n i.setPickedUp(true);\r\n i.setCount(count);\r\n return i;\r\n }", "public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }", "protected ItemWrapper(Item item) throws ServiceLocalException {\n\t\tEwsUtilities\n\t\t\t\t.EwsAssert(item != null, \"ItemWrapper.ctor\", \"item is null\");\n\t\tEwsUtilities.EwsAssert(!item.isNew(), \"ItemWrapper.ctor\",\n\t\t\t\t\"item does not have an Id\");\n\t\tthis.item = item;\n\t}", "public GlowItem(GlowServer server, GlowWorld world, ItemStack item) {\n super(server, world);\n this.item = item;\n pickupDelay = 20;\n }", "protected void createVerifyPickRow(int checkCode, GenericValue res, String orderId, String orderItemSeqId, String shipGroupSeqId,\n String productId, String originGeoId, BigDecimal quantity, Locale locale) throws GeneralException {\n // process the result; add new item if necessary\n switch (checkCode) {\n case 0:\n // not enough reserved\n throw new GeneralException(UtilProperties.getMessage(\"ProductErrorUiLabels\",\n \"ProductErrorNotEnoughInventoryReservationAvailableCannotVerifyTheItem\", locale));\n case 1:\n // we're all good to go; quantity already updated\n break;\n case 2:\n // need to create a new item\n String inventoryItemId = res.getString(\"inventoryItemId\");\n pickRows.add(new VerifyPickSessionRow(orderId, orderItemSeqId, shipGroupSeqId, productId, originGeoId, inventoryItemId, quantity));\n break;\n default:\n // if a wrong checkCode is given\n Debug.logError(\"There was a wrong checkCode given in the method createVerifyPickRow: \" + checkCode, MODULE);\n }\n }", "public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }", "public ItemInfo () {}", "public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }", "public Item() {}", "private void setNewPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newPassword_ = value;\n }", "@Transactional\n\tpublic void createRemindedPassword(RegisterUserForm ruf)\n\t{\n\t\tMd5PasswordEncoder passwordEncoder = new Md5PasswordEncoder();\n\t\tString hashedPassword = passwordEncoder.encodePassword(ruf.getPassword(), null);\n\t\n\t\t// create remindpassword for the user\n\t\t\n\t\tDate \t\tdt \t= new Date();\n\t\tTimestamp \tnow = new Timestamp(dt.getTime());\n\t\t\n\t\tString confKey \t= \"\" + dt;\n\t\tString confirmKey = encoder.encodeConfirmAccountHash(confKey);\n\t\tString sql = \"UPDATE confirmaccount SET confirmkey=:key, createdon=:date, remindpassword=BIT'1'\" +\n\t\t\t\t\" WHERE username=:user\";\n\t\tem.createNativeQuery(sql)\n\t\t.setParameter(\"user\", ruf.getUserName())\n\t\t.setParameter(\"date\", now)\n\t\t.setParameter(\"key\", confirmKey)\n\t\t.executeUpdate();\t\n\t}", "public User() {\n this.inv = new Inventory();\n this.fl = new FriendList();\n this.tradesList = new TradesList();\n this.tradeCount = 0;\n this.downloadsEnabled = true;\n }", "TradeItem createTradeItem(Account proposer, Flippo proposerFlippo, Account receiver, Flippo receiverFlippo);", "public MigrationItemInner beginCreate(String fabricName, String protectionContainerName, String migrationItemName, EnableMigrationInputProperties properties) {\n return beginCreateWithServiceResponseAsync(fabricName, protectionContainerName, migrationItemName, properties).toBlocking().single().body();\n }", "@Override\n public String createRecoveryKey() {\n nextRecoveryKey++;\n return Integer.toString(nextRecoveryKey);\n }", "protected abstract void makeItem();", "public PaymentRequestItem(OleInvoiceItem poi, OlePaymentRequestDocument preq) {\r\n this(poi, preq, new HashMap<String, ExpiredOrClosedAccountEntry>());\r\n }", "private Item(){}", "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 }", "public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t\t\trequired = true;\r\n\t\t\tpo = new PO();\r\n\t\t\tlistPos = new ArrayList<PO>();\r\n\t\t\titemInvoice = null;\r\n\t\t\titemPO = null;\r\n\t\t\tpartNumber = null;\r\n\t\t\tBasicFiltroPO filtroPO = new BasicFiltroPO();\r\n\r\n\t\t\tCarga c = facade.getCargaById(invoice.getCarga().getId());\r\n\t\t\tfiltroPO.setFilial(c.getFilial());\r\n\t\t\tlistPos = facade.listarPO(filtroPO);\r\n\t\t\tpoConverter = new ConverterUtil<PO>(listPos);\r\n\r\n\t\t} catch (BusinessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public ShoppingListItem createShoppingListItem(ShoppingListItem itemAux){\r\n\t\tif(!existShoppingListItemForVS(itemAux.getProductBarcode(), itemAux.getVirtualStorageId())){\r\n\t\t\tem.persist(itemAux);\r\n\t\t\tem.flush();\r\n\t\t\treturn itemAux;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Item() {\n\t}", "public Item() {\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\n\t\tif (item.getDate() == null)\n\t\t\tdateField.setText(DateUtil.format(LocalDate.now()));\n\t\telse\n\t\t\tdateField.setText(DateUtil.format(item.getDate()));\n\n\t\tdateField.setPromptText(\"dd.mm.yyyy\");\n\t\tif (item.getCategory() == null)\n\t\t\tcategoryField.getSelectionModel().select(\"Lebensmittel\");\n\t\telse \n\t\t\tcategoryField.getSelectionModel().select(item.getCategory());\n\t\tuseField.setText(item.getUse());\n\t\tamountField.setText(Double.toString(item.getAmount()).replace(\".\", \",\"));\n\t\tif (item.getDistributionKind() == null)\n\t\t\tdistributionKindField.setText(\"Giro\");\n\t\telse\n\t\t\tdistributionKindField.setText(item.getDistributionKind());\n\n\t\tif (useField.getText() == null) {\n\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tuseField.requestFocus();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public PaymentRequestItem(PurchaseOrderItem poi, PaymentRequestDocument preq) {\r\n this(poi, preq, new HashMap<String, ExpiredOrClosedAccountEntry>());\r\n }", "public ItemPro() {\n initComponents();\n comboFill();\n }", "public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }", "static public ApplicationFormItem createNew(int id, String shortname, boolean required, ApplicationFormItemType type,\n\t\t\t\t\t\t\t\t\t\t\t\tString federationAttribute, String perunSourceAttribute, String perunDestinationAttribute, String regex,\n\t\t\t\t\t\t\t\t\t\t\t\tList<Application.ApplicationType> applicationTypes, Integer ordnum, boolean forDelete)\t{\n\t\tApplicationFormItem afi = new JSONObject().getJavaScriptObject().cast();\n\t\tafi.setId(id);\n\t\tafi.setShortname(shortname);\n\t\tafi.setRequired(required);\n\t\tafi.setType(type);\n\t\tafi.setFederationAttribute(federationAttribute);\n\t\tafi.setPerunSourceAttribute(perunSourceAttribute);\n\t\tafi.setPerunDestinationAttribute(perunDestinationAttribute);\n\t\tafi.setRegex(regex);\n\t\tafi.setApplicationTypes(applicationTypes);\n\t\tafi.setOrdnum(ordnum);\n\t\tafi.setForDelete(forDelete);\n\t\treturn afi;}", "public NewItemDlg(Bundle args) {\n this.setArguments(args);}", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "@Override\r\n\tpublic ItemLog createItemLog() {\n\t\treturn new HpLog();\r\n\t}", "public SignupAccountInfoAvatar() {\n super(\"SignupAvatar.AccountInfo\", BrowserConstants.DIALOGUE_BACKGROUND);\n this.profileConstraints = ProfileConstraints.getInstance();\n this.securityQuestionModel = new DefaultComboBoxModel();\n this.usernameReservations = new HashMap<String, UsernameReservation>();\n this.emailReservations = new HashMap<EMail, EMailReservation>();\n initSecurityQuestionModel();\n initComponents();\n addValidationListeners();\n initFocusListener();\n }", "public Icc_cdobj_recItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "protected abstract Item createTestItem3();", "private void clearNewPassword() {\n \n newPassword_ = getDefaultInstance().getNewPassword();\n }", "private void setUpPageItem() {\n displaylimit = xmlhandler.getItemDisplayLimit();\n itemrow = inventory.getItemRow();\n Back.setEnabled(false);\n Begin.setEnabled(false);\n if(getPageEnd()==1) {\n Forward.setEnabled(false);\n End.setEnabled(false);\n }\n }", "public Item()\n {\n super();\n }", "Item(Weight weight){\r\n\t\tthis(0, weight, new DukatAmount(0));\r\n\t}", "public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\";\r\n\t\tdescription = \"Example Item Generated\";\r\n\t\tprice = 0;\r\n\t}", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}" ]
[ "0.651649", "0.53618693", "0.5301269", "0.52644473", "0.51938283", "0.5048747", "0.5013557", "0.4993627", "0.49278396", "0.48378846", "0.48194999", "0.48015213", "0.47950968", "0.4751314", "0.47392625", "0.47342956", "0.47306886", "0.47270998", "0.47117564", "0.47052464", "0.46988767", "0.4692819", "0.46914008", "0.46884948", "0.46622264", "0.46491265", "0.46252686", "0.46136457", "0.46000117", "0.45979646", "0.45849788", "0.45807126", "0.45713347", "0.4568323", "0.45634845", "0.45437217", "0.45420298", "0.4540327", "0.45402536", "0.45388684", "0.4528393", "0.45253897", "0.45246568", "0.4522572", "0.45200887", "0.45102245", "0.45059395", "0.4498844", "0.4488793", "0.44845596", "0.44841447", "0.44783267", "0.4468407", "0.44662592", "0.44610077", "0.44530088", "0.44482315", "0.4424734", "0.4424595", "0.44076055", "0.44055352", "0.43980616", "0.43974385", "0.43884838", "0.43884328", "0.43866247", "0.4386087", "0.43821025", "0.43819275", "0.4365072", "0.4364685", "0.4357757", "0.43541375", "0.4353598", "0.43519926", "0.43513072", "0.43411985", "0.43388873", "0.4337487", "0.43358347", "0.43272647", "0.43270478", "0.43270478", "0.4324352", "0.4318392", "0.431802", "0.43123344", "0.43120486", "0.430859", "0.43065837", "0.43031177", "0.43028313", "0.43002158", "0.4299155", "0.4298051", "0.42930382", "0.42887083", "0.42880347", "0.4285563", "0.42757392" ]
0.62361026
1
Activation constructor. Used for internal purposes only.
@com.exedio.cope.instrument.Generated private PasswordRecoveryItem(final com.exedio.cope.ActivationParameters ap){super(ap);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ActivationExpression createActivationExpression();", "public Node(ActivationFunction f) {\n\t\tnodeActivationFunction = f;\n\t}", "@com.exedio.cope.instrument.Generated\n\t\tprivate Source(final com.exedio.cope.ActivationParameters ap){super(ap);}", "@com.exedio.cope.instrument.Generated\n\t\tprivate Target(final com.exedio.cope.ActivationParameters ap){super(ap);}", "public void activate() {\t\t\n\t\t// Put activation code here (computing output based on the network's inputs)\n }", "public ACTable() {\r\n super();\r\n }", "@Override\n public void activate() {\n \n }", "@Override\n\tpublic void activate() {\n\t\t\n\t}", "public void activate()\n {\n }", "@Override\n public void activate() {\n init();\n }", "@Override\n\tpublic void activate() {\n\t}", "@Override\n\tpublic void activate() {\n\t}", "public void activate() {\n\t\t// TODO Auto-generated method stub\n\t}", "public Activator() {\r\n\t}", "public void onActivation() { }", "public Aanbieder() {\r\n\t\t}", "public void setActivation(double value) {\n this.activation = value;\n }", "public Almacen(){}", "public void activate(){\r\n\r\n\t}", "public double getActivation() {\r\n\t\tif (activation_count > 0) return activation;\r\n\t\telse return 0.0;\r\n\t}", "public void Activate() {\n state.Activate();\n }", "public void activate();", "@Override\n public void activate() {\n\n }", "void activate() throws ResourceActivatorException, InterruptedException, ExecutionException;", "public AETinteractions() {\r\n\t}", "public void activate() {\n neurons.forEach(Neuron::activate);\n }", "public void activate() {\n\t\tactivated = true;\n\t}", "public NEATTranscriberBain() {\n\t}", "public void activer() throws ActivationImpossibleException {\n throw new ActivationImpossibleException(\"Serrure non activable sans objet, faut pas jouer au plus malin avec moi.\");\n }", "public PassCost() {\r\n\r\n }", "public Connection(ActionListener al) {\r\n this.al = al;\r\n init();\r\n \r\n }", "public synchronized float calcActivation(float[] attrActivation) {\n\t\t\n\t\t// first reset activation\n\t\tactivation = 0.0f;\n\t\t\n\t\tfor (int i = 0; i < attrConnections.length; i++) {\n\t\t\tactivation = activation + attrConnections[i] * attrActivation[i];\n\t\t}\n\t\t\n\t\treturn activation;\n\t}", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public abstract void activate();", "public abstract void activate();", "private Instantiation(){}", "public EnsembleLettre() {\n\t\t\n\t}", "public interface ActivationDriver {\n\n /**\n * Called in case all drivers in the transaction has succeeded.\n */\n void commit();\n\n /**\n * Called in case any of drivers in the transaction has failed.\n */\n void rollback();\n\n /**\n * Set state for the driver for a (de)activation transaction.\n * @param endPoints list of endpoint to interconnect\n * @param serviceId connectivity service id\n * @param context context\n */\n void initialize(\n List<EndPoint> endPoints,\n String serviceId,\n NrpConnectivityServiceAttrs context,\n boolean isExclusive,\n ServiceType serviceType);\n\n /**\n * Performs the activation action.\n * @throws ResourceActivatorException activation problem\n * @throws ExecutionException transaction execution failed\n * @throws InterruptedException transaction was interrupted\n */\n void activate() throws ResourceActivatorException, InterruptedException, ExecutionException;\n\n /**\n * Performs the update action.\n * @throws ResourceActivatorException activation problem\n * @throws ExecutionException transaction execution failed\n * @throws InterruptedException transaction was interrupted\n */\n default void update() throws ResourceActivatorException, InterruptedException, ExecutionException {\n deactivate();\n activate();\n }\n\n /**\n * Performs the deactivation action.\n * @throws ResourceActivatorException activation problem\n * @throws ExecutionException transaction execution failed\n * @throws InterruptedException transaction was interrupted\n */\n void deactivate() throws ResourceActivatorException, InterruptedException, ExecutionException;\n\n\n /**\n * Influences the order in which drivers are called within the transaction.\n * @return int priority of this driver when resolving ambiguity\n */\n int priority();\n}", "public interface ActivationFunction {\n\t/**\n\t * The activation function itself. E.g. The sigmoid function\n\t * @param z - The weighted sum of a neuron\n\t * @return The activation of a neuron\n\t */\n\tpublic double activation(double z);\n\t/**\n\t * The derivative of the activation function.\n\t * @param z - The weighted sum of a neuron\n\t * @return The derivative of this activation function at z\n\t */\n\tpublic double activationDerivative(double z);\n\t/**\n\t * The code of this activation function.<br>\n\t * Each activation function has a unique code for it to be identified.\n\t * This value is used when saving and loading neural networks; it is saved in the file.\n\t * The ClassificationNeuralNetwork class keeps a list of these functions to look up the correct one when loading.\n\t * For custom activation functions not included in the list, loading a network causes the activation function\n\t * of that particular network to be set to <em>null</em>, and thus it <b>must</b> be set later <b>manually</b>\n\t * through the setActivationFunction() method.\n\t * @return The code of this activation function\n\t */\n\tpublic byte getCode();\n}", "public AirAndPollen() {\n\n\t}", "public Airplane (){\n \n }", "public AdmActFilterImpl(ActivationID activationID, MarshalledObject marshalledObject) {\n activationAdapter = new ActivationAdapter(activationID, marshalledObject);\n }", "void activate();", "void activate();", "public ActiveRowMapper() {\n\t}", "public void activate() {\n\tif (canBeActive()) {\n\t\tmActive = true;\n\t} else {\n\t\tthrow new IllegalStateException(getClass().getSimpleName() + \" isn't allowed to be activated\");\n\t}\n}", "public int getActivation()\n {\n return activation;\n }", "public Excellon ()\n {}", "public Lanceur() {\n\t}", "double calculateAxon(ActivationFunction activationFunction);", "public QLearnAgent() {\n\t\tthis(name);\t\n\t}", "@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }", "public Aggressive(){\r\n\t\tsuper();\r\n\t\t\r\n\t}", "public void activate(IActivator activator);", "public native void activate();", "public AFMV() {\r\n }", "public void activate() {\n double dotProduct = 0;\n for (Synapse s : super.getSynapsesIn()) {\n dotProduct += s.getNeuronFrom().getOutput() * s.getWeight();\n }\n super.setOutput(sigmoidFunction(dotProduct));\n }", "protected ModelAgent ()\n {\n this (\"ModelAgent\");\n\n }", "public void trackActivation() {\n track(\"_activation\");\n }", "protected IRFunctional() {\n _name = null;\n _params = null;\n _args = null;\n _fds = null;\n _vds = null;\n _body = null;\n }", "public BankAcc(){\r\n //uses another constuctor\r\n this(593,2.5,\"Deg\",\"Deg\",\"Deg\");\r\n System.out.println(\"EMpty\");;\r\n }", "public void activated() \r\n\t{\r\n\t\t\r\n\t}", "public Unary() {\n }", "public Constructor(){\n\t\t\n\t}", "public void activate(){\n callback.action();\n }", "public Investment() {\r\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public ActivationAdapter getActivationAdapter() {\n return activationAdapter;\n }", "public void activate(){\r\n\t\tactive=true;\r\n\t}", "public LambdaMART() {}", "public BrokerAlgo() {}", "public Gate(){\n\n }", "public AirConditioner()\n\t{\n\t\tinit();\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public EventMapper onActivation(final Runnable runnable) {\n\t\tinitConsumerDelegate();\n\t\t((ConsumerDelegate)getDepPlaceholder().getDelegate()).putRunnable(MappingEvent.activation, runnable);\n\t\treturn this;\n\t}", "@com.exedio.cope.instrument.Generated\n\tprotected HookStampItem(final com.exedio.cope.ActivationParameters ap){super(ap);}", "@Override\r\n\tpublic boolean activate() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean activate() {\n\t\treturn true;\r\n\t}", "public Core() {\r\n inputs = new ArrayList<>();\r\n outputs = new ArrayList<>();\r\n converter = new Converter();\r\n\r\n }", "public EnScrypt() {}", "public Encryptor(){\n\t\tSecurity.addProvider(new BouncyCastleProvider());\n\t}", "private RegressionPrior() { \n /* empty constructor */\n }", "public CitronellaAnt(){\n\t\tsuper(\"Citronella Ant\", AntCost.CITRONELLA_ANT);\n\t\tsuper.setLife(20);\n\t}", "public AbstractBinaryInteraction() {\n\n\t}", "public interface IActivatable {\n\tpublic static final Long ID_UNINITIALIZED = -1L;\n\t\n\t/**\n\t * \n\t * Gets the unique ID of this Activatable that identifies it in the\n\t * ActivationManager.\n\t * The ID must not changed once assigned.\n\t * \n\t * @return the unique ID issued by the ActivationManager upon registration, or -1L when unregistered\n\t */\n\tpublic long getID();\n\t\n\t/**\n\t * Sets the unique id of this Activatable. Called by the ActivationManager after registration.\n\t * Store the ID passed to this method in a thread-safe way.\n\t * (e.g. as <code>AtomicLong</code>) .\n\t * The ID must not changed once assigned.\n\t * \n\t * @param id the unique ID issued by the ActivationManager upon registration\n\t */\n\tpublic void setID(long id);\n\t\n\t\n\t/**\n\t * Called when the <code>Activatable</code> has been registered. All initialization code goes here,\n\t * e.g. registering blocks with the BlockChangeWatcher.\n\t */\n\tpublic void initialize();\n\t\n\t/**\n\t * Called when the <code>Activatable</code> is activated.\n\t * Do not make any assumptions about the thread that calls this.\n\t * Usually, it will <i>not</i> be the server thread.\n\t * \n\t * @param activator holds the details of the activation.\n\t */\n\tpublic void activate(IActivator activator);\n\t\n\t/**\n\t * Called when the <code>Activatable</code> has been removed from the\n\t * <code>ActivationManager<code>. It will never be re-added, so it's\n\t * time to make your will, say goodbye to your loved ones, and\n\t * clean up after yourself. Unregister with watchers, cancel your\n\t * <code>FishyTasks</code>, make sure that no strong references\n\t * remain. \n\t */\n\tpublic void remove();\n\t\n\n}", "@Override\n\tprotected void on_lever_activated(GfxObject lever,\n\t\t\tLeverActivationState state) {\n\n\t}", "public JacobObject() {\n\t\tROT.addObject(this);\n\t}", "public OrGate() {\n\t\tsuper(2, 1);\n\t}", "public Actor(GameEngine e) {\r\n\t\tvelocity = new Point2D.Float(0, 0); // speed in pixels/s\r\n\t\tcenter = new Point2D.Float(0, 0);\r\n\t\tsize = new Point2D.Float(0, 0);\r\n\t\tacceleration = new Point2D.Float(0, 0);\r\n\t\tmaxVelocity = new Point2D.Float(Integer.MAX_VALUE, Integer.MAX_VALUE);\r\n\t\tdeath = false;\r\n\t\tengine = e;\r\n\t\tbasePoly = new Polygon();\r\n\t\thealth = 0;\r\n\t\tdir = 0;\r\n\t\tmaxHealth = 0;\r\n\t\t_checkInvariant();\r\n\t}", "@Override\n\tpublic boolean activate() {\n\t\treturn true;\n\t}", "public Transaction() {\n this(0, 0, null);\n }", "protected AsymmetricProcessor() {\n\t}", "public ActingGoal() {\n\t\t// rosbridge compatibility issues\n\t}", "public Function() {\r\n\r\n\t}", "public AirCondition(){}", "public Ambulance() {\n\t}", "private LinkLayer() {\r\n }", "protected abstract void construct();", "public Activation_Linear_Range_0_1() {\r\n this.slope = new VDouble(new RealNumber(1), new VDoubleNoUpdate());\r\n this.c = new VDouble(new RealNumber(0), new VDoubleNoUpdate());\r\n }", "private ActivationContext makeActivationContext(final Node node, final Class<?> javaType,\n final int contextLevel) {\n return new ActivationContext(\n constructTrace(node, contextLevel).toArray(),\n javaType.getName());\n }", "public Anschrift() {\r\n }" ]
[ "0.68600374", "0.6726039", "0.672027", "0.67129", "0.66941833", "0.63149667", "0.6092942", "0.6033629", "0.5987031", "0.59864295", "0.5917566", "0.5917566", "0.5895549", "0.5881385", "0.58798814", "0.58750045", "0.5852409", "0.583583", "0.5828268", "0.58217293", "0.58216214", "0.5747269", "0.5744527", "0.5743694", "0.5721858", "0.57086086", "0.57027817", "0.5693915", "0.5685554", "0.56786966", "0.567733", "0.5640673", "0.5633717", "0.5585896", "0.5585896", "0.5567924", "0.5565105", "0.5554646", "0.55452734", "0.554077", "0.5538233", "0.5521801", "0.54842144", "0.54842144", "0.54738146", "0.5472196", "0.5462166", "0.54613304", "0.54303575", "0.5430069", "0.5423781", "0.54231817", "0.5406341", "0.53966725", "0.5384649", "0.5381108", "0.53759116", "0.5363461", "0.5356985", "0.53535557", "0.534635", "0.5346075", "0.5340303", "0.5331261", "0.5330274", "0.5330247", "0.5321943", "0.5316031", "0.53054297", "0.53007185", "0.5295954", "0.5278502", "0.527362", "0.52727896", "0.5266406", "0.52650696", "0.526502", "0.526502", "0.5263383", "0.5262156", "0.5259431", "0.52589613", "0.52368814", "0.52368516", "0.52339834", "0.52337617", "0.523172", "0.52297753", "0.5223036", "0.5222553", "0.52164274", "0.5214329", "0.5204165", "0.52010113", "0.5200804", "0.51988775", "0.51916105", "0.51851416", "0.51834035", "0.5175663", "0.51753724" ]
0.0
-1
Some sample method documentation
public Test(int someConstructorParameter) { //inlineTestComment }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public void sampleOperation() {\n\t}", "String getDocumentation();", "String getDocumentation();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public abstract String commandDocumentation();", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "private void test() {\n\n\t}", "Documentation createDocumentation();", "Documentation createDocumentation();", "public static void example1() {\n // moved to edu.jas.application.Examples\n }", "public abstract ModuleDoc doc();", "public static void thisDemo() {\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\n public void test() {\n \n }", "public abstract void description();", "public void method_201() {}", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "private static void oneUserExample()\t{\n\t}", "public void mo97908d() {\n }", "public void test() {\n\n }", "public void test() {\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract String usage();", "public void mo21877s() {\n }", "private stendhal() {\n\t}", "public void test() {\n }", "public void test() {\n }", "public abstract String description();", "public abstract String description();", "public void mo55254a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void method_199() {}", "private void Nice(){\n }", "void mo57277b();", "public void woke(){\n\n //TODO\n\n }", "@Override\n public void describeTo(Description arg0) {\n \n }", "public static void example2() {\n // moved to edu.jas.application.Examples\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "public static void objectDemo() {\n\t}", "public void test(){\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void method_4270() {}", "private test5() {\r\n\t\r\n\t}", "public void method(){}", "@Override\n public int describeContents() { return 0; }", "public void mo44053a() {\n }", "public void mo21825b() {\n }", "public static void listing5_14() {\n }", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "public void cocinar(){\n\n }", "@Override\n protected String getInitialDoc(PythonParser.FuncdefContext rawMethod) {\n return null;\n }", "public void mo21795T() {\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 }", "protected static void demoMethod( ) {\n System.out.println(\"demoMethod for singleton\");\n }", "public void mo21791P() {\n }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "@Test\n void setDescription() {\n }", "public void mo21792Q() {\n }", "public void doSomething() {\n \n }", "public void mo6944a() {\n }", "public void mo21793R() {\n }", "public Methods() {\n // what is this doing? -PMC\n }", "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "public void mo115188a() {\n }", "public void mo38117a() {\n }", "public void methodReferences() {\n\t\t// Write sample for below\n\n\t\t// Static method\n\t\t// Instance method on parameter objects\n\t\t// Instance method\n\t\t// Constructor\n\t}", "public void mo56167c() {\n }", "public void furyo ()\t{\n }", "public void mo21789N() {\n }", "@Test\n public void testGetAuthor() {\n }", "String getDescribe();", "String getDescribe();", "public void mo97906c() {\n }", "public void mo21880v() {\n }", "@Override\n public String commandDocumentation() {\n return (\"Displays the documentation of various commands.\");\n }", "public String description();", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void test( ){\n\t\t\tSystem.out.println(\"test method\"); //no input, no output\n\t\t}", "public void testOperation();", "public void mo21782G() {\n }", "public void method_200() {}", "public void mo5099c() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "String getExampleParameters();", "@Override\n\tpublic void sampleNode() {\n\n\t}", "public void working()\n {\n \n \n }", "List<DocumentationItem> documentation();", "void hello();" ]
[ "0.6883155", "0.6661109", "0.6404679", "0.6404679", "0.6398635", "0.63592756", "0.6344095", "0.6297805", "0.62939215", "0.62939215", "0.62871003", "0.62844294", "0.6280634", "0.62772757", "0.6219992", "0.61509645", "0.61507523", "0.614779", "0.61120486", "0.60849375", "0.60849375", "0.60475516", "0.60276204", "0.60250425", "0.60244536", "0.60177183", "0.60164803", "0.60101265", "0.59996027", "0.5986476", "0.5986476", "0.59792566", "0.59792566", "0.5979083", "0.5968691", "0.5964143", "0.5957928", "0.5950497", "0.5950164", "0.5946481", "0.59422433", "0.5933838", "0.59319365", "0.59246886", "0.5918039", "0.59142196", "0.59127074", "0.59112847", "0.5904415", "0.5896602", "0.5892999", "0.5889291", "0.588446", "0.58748263", "0.5873174", "0.5863665", "0.58590287", "0.58590287", "0.58590287", "0.58590287", "0.58590287", "0.58590287", "0.58590287", "0.58452165", "0.58434355", "0.5842273", "0.5839352", "0.58341354", "0.58296686", "0.5827894", "0.5822222", "0.5818779", "0.5801445", "0.5801274", "0.5797132", "0.5797073", "0.5796047", "0.5791103", "0.57883435", "0.5778827", "0.5776565", "0.5775038", "0.5775038", "0.5772467", "0.5761103", "0.57578975", "0.57566464", "0.57538754", "0.5749577", "0.5746533", "0.57404643", "0.57400376", "0.573929", "0.57389706", "0.57349056", "0.5729261", "0.57262504", "0.5725598", "0.5724888", "0.5723946", "0.5721956" ]
0.0
-1
Retrieves a user by username. An exception is thrown if now user is found.
public User getUser(String username);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User get(String username) throws UserNotFoundException, SQLException;", "User getUserByUsername(String name) throws InvalidUserException;", "User loadUser( String username ) throws UserNotFoundException;", "@Override\r\n\tpublic User getByUsername(String username) throws UsernameNotFoundException {\r\n\t\tQuery query = sessionfactory.getCurrentSession().createQuery(\"FROM User WHERE username = :username\");\r\n\t\tquery.setParameter(\"username\", username);\r\n\t\tUser user = (User) query.uniqueResult();\r\n\t\tif (user == null) {\r\n\t\t\tthrow new UsernameNotFoundException(\"User with username '\" + username + \"' does not exist.\");\r\n\t\t}\r\n\t\treturn user;\r\n\t}", "public User get(String username) throws AdException{\n\t\ttry{\n\t\t\tUser user = null;\n\t\t\tbegin();\n\t\t\tQuery q = getSession().createQuery(\"from User where userName = :username\");\n\t\t\tq.setString(\"username\", username);\n\t\t\tuser = (User)q.uniqueResult();\n\t\t\tcommit();\n\t\t\t\n\t\t\treturn user;\n\t\t}catch(HibernateException e){\n\t\t\trollback();\n\t\t\tthrow new AdException(\"Could not get user\" + username, e);\n\t\t}\n\t}", "public User getUser(String username) throws UserNotFoundException {\n if (users.containsKey(username)) {\n return users.get(username);\n }\n else {\n User user = persistenceFacade.getUser(username);\n if (user == null) throw new UserNotFoundException();\n users.put(username, user);\n return user;\n }\n }", "@Override\n\tpublic User getuser(String username) \n\t{\n\t\treturn userDAO.getuser(username);\n\t}", "public User get(String username);", "public User getSpecificUser(String username);", "@Override\n\tpublic UserDetails loadUserByUsername(String arg0) throws UsernameNotFoundException {\n\t\tList <UserDetailsPojo> list=dao.getUserByName(arg0);\n\t\tif(list==null || list.size()==0){\t\t\n\t\tthrow new UsernameNotFoundException(\"No user available\");\n\t\t}\n\t\t\n\t\tUserDetailsPojo user=list.get(0);\n\t\t\n\t\treturn user;\n\t}", "public User getSingleUser(String username) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from User as user where user.username = ?\",\n new Object[]{username},\n new Type[]{Hibernate.STRING});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (User) results.get(0);\n }\n\n }", "@Override\n\tpublic User getUser(String username) {\n\t\treturn iUserDao.getUser(username);\n\t}", "public static User getUser(String username) {\r\n\t\tfor(User user : userList) {\r\n\t\t\tif(user.getName().equals(username)) {\r\n\t\t\t\treturn user;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IllegalArgumentException(\"User does not exist\");\r\n\t}", "@Override\n\tpublic User getByUserName(String username) {\n\t\tUser user = userDao.getByUserName(username);\n\t\treturn user;\n\t}", "public User getUser(String username) {\n User found = userRepository.findByUsername(username);\n if (found == null) {\n return null;\n }\n return found;\n\n }", "public User getUser(String username)\r\n {\r\n EntityManager em = getEntityManager();\r\n Query sqlQuery = em.createQuery(\"SELECT c FROM SEED_USER c WHERE c.userName = :username\", User.class)\r\n .setParameter(\"username\", username);\r\n\r\n return (User) sqlQuery.getSingleResult();\r\n }", "@Override\n\tpublic User getUserByName(String username) {\n\t\treturn userDao.getUserByName(username);\n\t}", "User getByUsername(String username);", "@Override\n\tpublic User getUser(String username) {\n\n\t\treturn this.userRepository.findByUsername(username);\n\t}", "public User getUser(String username) {\n return userDAO.getUser(username);\n }", "@Override\n\tpublic User getUser(String username) {\n\t\treturn userRepository.findByUsername(username);\n\t}", "public User getUserByName(String username);", "public User getUserByName(String username);", "@Override\n\tpublic G_User getByUsername(String username) {\n\t\treturn uDao.getByUsername(username);\n\t}", "User getUser(String userName) throws UserNotFoundException;", "@Override\n\tpublic UserModel getUser(String username) throws Exception {\n\t\treturn (UserModel) sf.getCurrentSession().get(UserModel.class, username);\n\t}", "public User getUserByUsername(String username) throws BillingSystemException{\r\n\t\tUser temp=null;\r\n\t\t\r\n\t\tif(username==null && username.length()==0){\r\n\t\t\tthrow new BillingSystemException(\"Username argument is null\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(User user : listUser){\r\n\t\t\tif(user.getUsername().equals(username)){\r\n\t\t\t\ttemp= user;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn temp;\r\n\t}", "User getOne(String username) throws NotFoundException;", "@Override\r\n\tpublic User getUser(String username) {\r\n\t\treturn userRepo.findByUsername(username);\r\n\t}", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "@Override\r\n\tpublic UserAccount get(String username) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tUserAccount ua = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetByUsername);\r\n\t\t\tps.setString(1, username);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tua = get(rs.getInt(\"id\"));\r\n\t\t\t}\r\n\t\t\tcon.close();\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\treturn ua;\r\n\t}", "User getUser(String username);", "public User getUser(String username) {\n return profile.getUser(username);\n }", "public User getUser(String username) {\n\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n User user = null;\n try {\n tx = session.beginTransaction();\n\n // Add restriction to get user with username\n Criterion emailCr = Restrictions.eq(\"email\", username);\n Criteria cr = session.createCriteria(User.class);\n cr.setMaxResults(1);\n cr.add(emailCr);\n user = (User)cr.uniqueResult();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return user;\n }", "@Override\n\tpublic User findByName(String username) {\n\t\treturn userDao.findByName(username);\n\t}", "public User getUserByusername(String username) {\n return this.userDao.selectLogin(username);\n }", "@Override\r\n public User getUserByName(String username) {\n return userMapper.getUserByName(username);\r\n }", "public User findUser(String username) {\n if (userList.containsKey(username)) {\n return userList.get(username);\n } else {\n throw new NoSuchElementException(\"User Not Found.\");\n }\n }", "@Override\n public Optional<User> find(String username) throws ServiceException {\n Optional<User> user;\n try {\n manager.beginTransaction(userDao);\n user = userDao.findByUsername(username);\n manager.endTransaction();\n } catch (DaoException exception) {\n try {\n manager.rollback();\n } catch (DaoException rollbackException) {\n logger.error(rollbackException);\n }\n throw new ServiceException(exception);\n }\n return user;\n }", "public User getUserByUsername(String username) {\n\t\tString sql = \"SELECT u FROM User u WHERE u.username LIKE :username\";\n\t\tQuery query = em.createQuery(sql, User.class);\n\t\treturn (User) query.setParameter(\"username\", username).getSingleResult();\n\t}", "public User getUserByUsername(String username);", "@Override\r\n\tpublic Credentials fetchUserByUsername(String username) {\n\t\treturn dao.findByUserName(username);\r\n\t}", "public synchronized User getUser(String username) {\r\n\t\tif (!mapping.containsKey(username)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn mapping.get(username);\r\n\t}", "@Override\n public User getUser( String username )\n {\n\n \tString query = \"from User where username = :username\";\t\n \t\n List<User> users = entityManager.createQuery( query, User.class )\n .setParameter( \"username\", username )\n .getResultList();\n return users.size() == 0 ? null : users.get( 0 );\n }", "public User getUserByUsername(final String username) {\n List<User> res = em.createNamedQuery(\"User.getUserByUsername\", User.class)\n .setParameter(\"username\", username)\n .getResultList();\n\n //Username must be unique so the result will be a list of 1 or 0 element\n //We check if the query found a result, if not we return null\n return (res.size() > 0) ? res.get(0) : null;\n }", "@Override\n public User getAccount (String username) throws KustvaktException {\n \t\n \tMap<String, String> namedParameters = Collections.singletonMap(\"username\", username);\n final String sql = \"select a.* from korap_users as a where a.username=:username;\";\n User user = null;\n \n try {\n user = this.jdbcTemplate.queryForObject(sql, namedParameters,\n new RowMapperFactory.UserMapper());\n return user;\n \t}\n catch (EmptyResultDataAccessException ae) {\n jlog.warn(\"No user found for name '{}'\", username);\n \t}\n catch (DataAccessException e) {\n jlog.warn(\"Could not retrieve user for name: \" + username, e);\n \n /* DemoUser and DefaultUser have no account,\n * so it's ok they are not found.\n throw new DatabaseException(username, \"korap_users\",\n StatusCodes.DB_GET_FAILED,\n \"Could not retrieve the user with username: \" + username,\n username);\n */\n }\n\n // DemoUser or DefaultUser?\n \n {\t// User cannot be found in SQL DB since LDAP Authentication,\n \t// so create a User Object here.\n \t// TODO: what more data should be stored into it?\n \t// 28.04.17/FB\n \tuser = new KorAPUser(); // oder eigentlich new DemoUser oder new DefaultUser.\n \tuser.setUsername(username);\n \treturn user;\n }\n \n \n }", "public User getUserByName(String username) {\n\t\treturn this.userDao.getUserByUsername(username);\r\n\t}", "public static User getUser(String username){\n \tUser user = null;\n \ttry {\n \tif (DBHandler.getPlayerU(username, c) != null){\n \t\tuser = DBHandler.getPlayerU(username, c);\n \t}\n \t\telse if (DBHandler.getAdminU(username, c) != null){\n \t\t\tuser = DBHandler.getAdminU(username, c);\n \t\t}\n \t}\n \tcatch (SQLException e) {\n \t\te.printStackTrace();\n \t}\n \treturn user;\n }", "public AgtUser findUserByName(String username);", "@Override\n\tpublic UserDTO fetchUserByUserName(String username) throws StudentNotFoundException, Exception{\n\n\t\tSession session = null;\n\t\tUserDTO user = null;\n\t\tsession = sessionFactory.getCurrentSession();\n\t\tuser = (UserDTO)session.get(UserDTO.class, username);\n\t\tif(user==null)\n\t\t\tthrow new StudentNotFoundException(\"Student not found!\");\n\t\treturn user;\n\t}", "@Override\r\n\tpublic User findUserByUsername(String username) {\n\t\tSystem.out.println(\"aa\");\r\n\t\treturn dao.selectUserByUsername(username);\r\n\t}", "public User findUser(String username) {\n if (activeUsers.containsKey(username)) return activeUsers.get(username);\n String fileName = username;\n try {\n return (User) loadObjFromFile(usersDirPath + fileName);\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n log(\"error finding user\");\n }\n return null;\n }", "@Override\n\tpublic User findByUsername(String username) throws UserNotFoundException {\n\t\treturn userRepo.findById(username).orElseThrow(()->new UserNotFoundException(\"Sorry User with username \"+ username+ \" is not found\"));\n\t\t\n\t}", "public User getByUserName(String username) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql = \"from User WHERE emailid = :userame\";\n\t\tUser user = (User)session.createQuery(hql).setParameter(\"userame\", username).getSingleResult();\n\t\treturn user;\n\t}", "public User getUser(String username) {\n\t\tfor(User user : users) {\n\t\t\tif(user.getUsername().equals(username)) {\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static User findUserByName(String username) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByName = \"SELECT * FROM public.member \"\n + \"WHERE name = '\" + username + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByName);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n\n return user;\n }", "public User retrieveUser(String name)\r\n\t{\r\n\t\t\r\n\t\treturn users.get(name);\r\n\t}", "@Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n return users.get(username);\n }", "@Override\n public User getUser(String username) {\n return userDataMapper.getUserByUserName(username);\n }", "public User getUser(String username) {\r\n\r\n User existingUser = new User();\r\n String usernameResult;\r\n String passwordResult;\r\n\r\n try {\r\n // Get access to DB and set cursor at first row returned\r\n Cursor getData = getReadableDatabase().rawQuery(\"SELECT * FROM user WHERE username = '\" + username + \"'\", null);\r\n getData.moveToFirst();\r\n\r\n // Get fields from DB\r\n usernameResult = getData.getString(1);\r\n passwordResult = getData.getString(2);\r\n\r\n // Set fields in user object\r\n existingUser.setUsername(usernameResult);\r\n existingUser.setPassword(passwordResult);\r\n\r\n getData.close();\r\n } catch (IndexOutOfBoundsException e) { existingUser = null; }\r\n\r\n return existingUser;\r\n }", "public User getUserByUserName(String username);", "public User findUserByUsername(String username) {\n\t\treturn userDao.findUserByUsername(username);\r\n\t}", "User findUserByUsername(String username);", "@Override\n\tpublic User findByEmail(String username) throws UsernameNotFoundException {\n\t\treturn jpaUserDao.findByEmail(username);\n\t}", "public User readByUsername(String username) throws DaoException;", "public User getUserByName(String username) {\n\t\tfor (User u : getUserSet()) {\n\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\treturn u;\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public User getUserByUsername(String name) {\n \tSession session = this.sessionFactory.getCurrentSession(); \n \tQuery query = session.createQuery(\"from User where username=:username\");\n\t\tquery.setParameter(\"username\", name);\n\t\tUser u = (User) query.uniqueResult();\n logger.info(\"User loaded successfully, User details=\"+u);\n return u;\n }", "@Override\n public UserDetails loadUserByUsername(final String username) throws UsernameNotFoundException, DataAccessException {\n\n LocaleContextHolder.setLocale(Localization.getInstance().getMainLocale());\n\n if (StringUtils.isBlank(username)) {\n throw new UsernameNotFoundException(LoginConstants.KEYINVALIDUSER);\n }\n\n MifosUser userDetails = personnelDao.findAuthenticatedUserByUsername(username);\n\n if (userDetails == null) {\n throw new UsernameNotFoundException(LoginConstants.KEYINVALIDUSER);\n }\n return userDetails;\n }", "@Override\n public User getUser(String username, String password) {\n User optionalUser;\n try {\n optionalUser = userRepository.usernamePasswordQuery(username, password);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n optionalUser = null;\n }\n\n if (optionalUser == null) {\n return null;\n } else {\n return optionalUser;\n }\n\n }", "@RequestMapping(value=\"/user/{username:.+}\", method = RequestMethod.GET)\n\tpublic Users getUser(@PathVariable(\"username\") String username) {\n\t\tlogger.debug(\"Query a user by the username {}\", username);\n\t\treturn authService.getUser(username);\n\t}", "@Override\n\tpublic UserDetails loadUserByUsername(String username) {\n\t\tUsers users=usersRepository.findByUserName(username);\n\t\tif(users==null) {\n\t\t\tthrow new BadCredentialsException(\"Bad Credentials\");\n\t\t}\n\t\t\n\t\tnew AccountStatusUserDetailsChecker().check(users);\n\t\treturn users;\n\t}", "@Override\n\tpublic User findUserByUserName(String userName) throws Exception {\n\t\treturn userDao.findUserByUserName(userName);\n\t}", "public User findByUsername(String username)\n\t{\n\t\tString sql = \"SELECT * FROM VIDEOGAMESTORE.USERS WHERE USERNAME=?\";\n\t\t\n\t\t// Run a query with the supplied username\n\t\ttry {\n\t\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(sql, username);\n\t\t\twhile(srs.next())\n\t\t\t{\n\t\t\t\t// Return a new User with the fields returned by the database\n\t\t\t\treturn new User(srs.getString(\"USERNAME\"), srs.getString(\"PASSWORD\"), srs.getString(\"EMAIL\"),\n\t\t\t\t\t\tsrs.getString(\"FIRST_NAME\"), srs.getString(\"LAST_NAME\"), srs.getInt(\"GENDER\"), srs.getInt(\"USER_PRIVILEGE\"));\n\t\t\t}\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\t\n\t\t// Return an empty user if none are found\n\t\treturn new User();\n\t\t\n\t}", "@Override\r\n\tpublic User findByUsername(String username) {\n\t\treturn userDAO.findByUsername(username);\r\n\t}", "@SuppressWarnings(\"static-method\")\n public @NotNull LocalUser findByName(String username) throws UserNotFoundException {\n if (\"admin\".equals(username)) {\n LocalUser user = new LocalUser(\"admin\", \"struts2\");\n return user;\n }\n throw new UserNotFoundException(username);\n }", "public User queryUserByUsername(String username);", "@Override\n\tpublic User getUser(String username) {\n\t\treturn null;\n\t}", "@Override\n\tpublic User getUser(String username) {\n\t\treturn null;\n\t}", "public User getUser(String username) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tUser user=(User)session.get(User.class,username);\n\t\treturn user;\n\t}", "@Transactional\n public User loadByUsername(String username) throws UsernameNotFoundException {\n User user = userRepository.findByUsername(username)\n .orElseThrow(() -> new UsernameNotFoundException(\"User not found with username : \" + username));\n\n checkForUnconfirmedAccount(user);\n\n validateLoginAttempt(user);\n return user;\n }", "@Override\n public User getUserByName(String userName) {\n return userRepository.findUserByUserName(userName);\n }", "public User getUser (String userName) {\n return userMap.get(userName);\n }", "@Override\n\tpublic UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n\t\t\n\t\tOptional<User> myUser = userRepository.findByUserName(username);\n//\t\tif(myUser.isPresent()) {\n//\t\t\treturn new MyUserDetails(myUser.get());\n//\t\t} else {\n//\t\t\tmyUser.orElseThrow(() -> new UsernameNotFoundException(\"user not found: \" + username));\n//\t\t}\n\t\t\n\t\tmyUser.orElseThrow(() -> new UsernameNotFoundException(\"user not found: \" + username));\n\t\treturn myUser.map(MyUserDetails::new).get();\n\t}", "@Override\n\tpublic User findByUsername(String username) {\n\t\treturn userDao.findByUsername(username);\n\t}", "@Override\n\tpublic User findUserByUsername(String username) throws SQLException {\n User user = null;\n String sql = \"SELECT * FROM user WHERE username = ?\";\n \n connect();\n \n PreparedStatement statement = jdbcConnection.prepareStatement(sql);\n statement.setString(1, username);\n \n \n ResultSet resultSet = statement.executeQuery();\n \n while (resultSet.next()) {\n String usrname = resultSet.getString(\"username\");\n String pwd = resultSet.getString(\"password\");\n \n user = new User(usrname, pwd);\n }\n \n resultSet.close();\n statement.close();\n \n return user;\n\t}", "public User loadByUsername(String userName) {\r\n\t\tUser retUser = this.userStore.get(userName);\r\n\r\n\t\treturn retUser;\r\n\t}", "@Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n UserModel user = userRepository.findByUsername(username);\n\t\tif(user == null){\n\t\t\tthrow new UsernameNotFoundException(\"Invalid username or password.\");\n\t\t}\n return new org.springframework.security.core.userdetails.User(user.getUsername(), user.getPassword(), getAuthority());\t\n }", "@Override\n\t@Transactional\n\tpublic UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n\t\tUser user=userService.getOneUserByName(username);\n\t\tif(user==null)\n\t\t{\n\t\t\tthrow new UsernameNotFoundException(\"\");\n\t\t}\n\t\treturn UserPrinciple.build(user);\n\t}", "@Override\n\tpublic UserDetails loadUserByUsername(String username)\n\t\t\tthrows UsernameNotFoundException {\n\t\t\n\t\tUserCredentials user = userService.retrieveUserDetails(username);\n\t\t\n\t\tif (user == null) {\n\t\t\tthrow new UsernameNotFoundException(\"user not found\");\n }\n\t\t\n GrantedAuthority authority = new SimpleGrantedAuthority(user.getRole());\n return new org.springframework.security.core.userdetails.User(user.getUsername(), user.getPassword(), Collections.singleton(authority));\n\t}", "@Override\n\tpublic User queryOne(String username) {\n\t\tUser user = dao.queryOne(username);\n\t\treturn user;\n\t}", "public CustomUserDetails getUser(String username) {\n\t\ttry {\n\t\tuser = userService.userExistsByEmail(username);\n\t\tuserDetails.setUser(user);\n\t\treturn userDetails;\n\t\t\n\t\t}\n\t\tcatch(UsernameNotFoundException e) {\n\t\t\tthrow new UsernameNotFoundException(\"User with \"+ username + \"not found.\");\n\t\t}\n\t\t\n\t}", "private User findByName(String username) {\r\n\t\tCriteriaBuilder cb = entityManager.getCriteriaBuilder();\r\n\t\tCriteriaQuery cq = cb.createQuery(User.class);\r\n\t\tRoot<User> user = cq.from(User.class);\r\n\t\tcq.where(user.get(User_.username).in(username));\r\n\r\n\t\tTypedQuery<User> tq = entityManager.createQuery(cq);\r\n\t\t\r\n\t\treturn tq.getSingleResult();\r\n\t}", "public User getByUsername(Connection conn, String username) throws Exception {\n \n User resultUser = null;\n String sql = \"select * from jaltantra_users where username=?\";\n PreparedStatement ps = conn.prepareStatement(sql);\n ps.setString(1, username);\n ResultSet rs = ps.executeQuery();\n if(rs.next()) {\n resultUser = new User();\n //resultUser.setId(rs.getInt(\"id\"));\n resultUser.setUsername(rs.getString(\"username\"));\n resultUser.setPassword(rs.getString(\"password\"));\n }\n return resultUser;\n }", "@Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n return userDAO.findByUsername(username);\n }", "User get(String name);", "@NotNull TUser findByUserName(String username) throws NotFoundException, ErrorConnectionException, TException;", "User findByUsername(String username) throws UserDaoException;", "@Override\n\tpublic UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n\t\treturn userDao.findByUsername(username);\n\t}" ]
[ "0.8232771", "0.8111923", "0.7921183", "0.79180855", "0.79028785", "0.78443813", "0.77453834", "0.77079225", "0.7695236", "0.76400083", "0.76103127", "0.7608385", "0.76033163", "0.75871474", "0.7577577", "0.7575672", "0.7567226", "0.75591105", "0.7508603", "0.7508494", "0.7504751", "0.74992585", "0.74992585", "0.7493366", "0.7480293", "0.7479359", "0.7476493", "0.7468181", "0.7467381", "0.7447454", "0.7447454", "0.7447454", "0.74051195", "0.7399113", "0.73913616", "0.73853993", "0.73850876", "0.73799914", "0.7369054", "0.7354034", "0.735399", "0.7352888", "0.7332121", "0.7320568", "0.7316559", "0.7306053", "0.7305513", "0.7303175", "0.72910476", "0.7281927", "0.7279164", "0.7274163", "0.7267564", "0.7266609", "0.72624886", "0.7248816", "0.7234542", "0.7230309", "0.72190773", "0.7207701", "0.7193577", "0.71818346", "0.7181488", "0.717472", "0.7174092", "0.71465915", "0.7146062", "0.71387494", "0.7133435", "0.71307737", "0.71182954", "0.71172583", "0.71139383", "0.7101067", "0.70935106", "0.7089491", "0.7084187", "0.70802665", "0.70721275", "0.70721275", "0.7060089", "0.7054707", "0.7049622", "0.7040365", "0.7022917", "0.70090914", "0.70024556", "0.6989748", "0.6986644", "0.69828045", "0.6977388", "0.6976191", "0.6968504", "0.69587374", "0.69557124", "0.6953389", "0.6950905", "0.6945284", "0.69433963", "0.69425946" ]
0.7342603
42
Retrieves a list of users, filtering with parameters on a user object
public List getUsers(User user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<User> getUsers();", "List<User> getUsers();", "public List<User> listUsers(String userName);", "public List<User> getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) throws UserManagementException;", "public List getAllUsers();", "public List<User> getUsers();", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "public List<User> getAllUsers();", "public List<UserDTO> getUsers();", "List<User> getAllUsers();", "List<User> getAllUsers();", "List<KingdomUser> getUsers();", "public List<User> getUserList();", "com.google.ads.googleads.v6.resources.UserList getUserList();", "List<User> getUserByName(String name);", "public static List<User> getUsersList(){\n\t\tWSResponse response = null;\n\t\tList<User> resultList = new ArrayList<User>();\n\t\ttry{\n\t\tPromise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.GET_USERS_URL)\n\t\t\t\t\t\t\t\t\t\t.setContentType(Urls.CONTENT_TYPE_JSON)\n\t\t\t\t\t\t\t\t\t\t.get();\n\t\tresponse = result.get(10000);\n\t\tGson gson = new Gson();\n\t\tUser[] users = gson.fromJson(response.getBody(), User[].class);\n\t\tfor(int i=0; i<users.length; i++){\n\t\t\tresultList.add(users[i]);\n\t\t}\n\t\t} catch(Exception exception){\n\t\t\tController.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);\n\t\t}\n\t\treturn resultList;\n\t}", "Iterable<User> getAllUsers();", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "@Nonnull\n List<User> getUsers();", "List<UserDTO> getAllUsers();", "List<User> fetchAllUSers();", "public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;", "com.heroiclabs.nakama.api.User getUsers(int index);", "@GET\n\t//@Compress //can be used only if you want to SELECTIVELY enable compression at the method level. By using the EncodingFilter everything is compressed now. \n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic List<User> getUsers(\n\t\t\t@QueryParam(\"orderByInsertionDate\") String orderByInsertionDate,\n\t\t\t@QueryParam(\"numberDaysToLookBack\") Integer numberDaysToLookBack)\n\t\t\tthrows IOException,\tAppException {\n\t\t\n\t\tList<com.vforcore.model.aa.User> allModelUsers = userRepository.findAll();\n\t\t\n\t\tList<User> users = new ArrayList<User>();\n\t\tfor (com.vforcore.model.aa.User mu : allModelUsers) {\n\t\t\tUser user = new User(mu.getId(), mu.getCreated(), mu.getLastName(), mu.getLastName(), mu.getEmail(), mu.getUsername(), mu.isCredentialsNonExpired(), mu.isAccountNonLocked(), mu.isAccountNonExpired(), mu.isEnabled());\n\t\t\tusers.add(user);\n\t\t}\n\t\t\n\t\t\n\t\treturn users;\n\t}", "public List<Utilizator> listUsers();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "@GET(\"users\")\n Call<PageResourceUserBaseResource> getUsers(\n @retrofit2.http.Query(\"filter_displayname\") String filterDisplayname, @retrofit2.http.Query(\"filter_email\") String filterEmail, @retrofit2.http.Query(\"filter_firstname\") String filterFirstname, @retrofit2.http.Query(\"filter_fullname\") String filterFullname, @retrofit2.http.Query(\"filter_lastname\") String filterLastname, @retrofit2.http.Query(\"filter_username\") String filterUsername, @retrofit2.http.Query(\"filter_tag\") String filterTag, @retrofit2.http.Query(\"filter_group\") String filterGroup, @retrofit2.http.Query(\"filter_role\") String filterRole, @retrofit2.http.Query(\"filter_last_activity\") String filterLastActivity, @retrofit2.http.Query(\"filter_id_list\") String filterIdList, @retrofit2.http.Query(\"filter_search\") String filterSearch, @retrofit2.http.Query(\"size\") Integer size, @retrofit2.http.Query(\"page\") Integer page, @retrofit2.http.Query(\"order\") String order\n );", "List<UserDisplayDto> getAllUsers();", "List<KingdomUser> getAllUsers();", "List<User> searchUsersByUsername(String username);", "public List<IUser> getUsers();", "List<User> loadActiveUsers(User user);", "@GetMapping\n\tpublic List<UserRest> getUsers(@RequestParam(value = \"page\", defaultValue = \"0\") int page,\n\t\t\t@RequestParam(value = \"limit\", defaultValue = \"25\") int limit){\n\t\t\n\t\tList<UserRest> returnValue = new ArrayList<>();\n\t\t\n\t\tList<UserDTO> users = userService.getUsers(page, limit);\n\t\t\n\t\tfor (UserDTO userDTO : users) {\n\t\t\tUserRest userModel = new UserRest();\n\t\t\tBeanUtils.copyProperties(userDTO, userModel);\n\t\t\treturnValue.add(userModel);\n\t\t}\n\t\t\n\t\treturn returnValue;\n\t}", "Collection<GetUserDto> getAllUsers();", "private void readUsers(String filter) {\n Filter userFilter = Filter.createORFilter(\n Filter.createSubAnyFilter(\"cn\", filter),\n Filter.createSubAnyFilter(\"sn\", filter),\n Filter.createSubAnyFilter(\"givenname\", filter)\n );\n\n SearchResult searchResult = OpenLDAP.searchUser(userFilter);\n for (int i = 0; i < searchResult.getEntryCount(); i++) {\n SearchResultEntry entry = searchResult.getSearchEntries().get(i);\n User user = new User();\n user.setDistinguishedName(entry.getDN());\n user.setUsername(entry.getAttributeValue(\"cn\"));\n user.setFirstname(entry.getAttributeValue(\"givenname\"));\n user.setLastname(entry.getAttributeValue(\"sn\"));\n user.setEmail(entry.getAttributeValue(\"mail\"));\n user.setMobile(entry.getAttributeValue(\"mobile\"));\n getUsers().put(user.getUsername(), user);\n }\n }", "public List<User> getSpecificUsers(String searchQuery) {\n logger.info(\"Currently in method 'getSpecificUsers()'.\");\n Database database = Database.getInstance();\n Connection connection = null;\n List<User> specificUsers = new ArrayList<User>();\n String sql = \"SELECT * FROM users WHERE id LIKE '%\" + searchQuery +\n \"%' OR first_name LIKE '%\" + searchQuery +\n \"%' or last_name LIKE '%\" + searchQuery +\n \"%' or date_of_birth LIKE '%\" + searchQuery + \"%'\";\n\n try {\n database.connect();\n connection = database.getConnection();\n Statement selectStatement = connection.createStatement();\n ResultSet results = selectStatement.executeQuery(sql);\n while (results.next()) {\n User employee = createUserFromResults(results);\n specificUsers.add(employee);\n }\n database.disconnect();\n } catch (SQLException e) {\n logger.error(\"Encountered an SQLException: \", e);\n } catch (Exception e) {\n logger.error(\"Encountered an Exception: \", e);\n }\n return specificUsers;\n }", "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}", "@Override\n\tpublic ArrayList<User> searchUsers() {\n\t\treturn userDao.searchUsers();\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}", "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 }", "public String[] listUsers();", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}", "List<UserRepresentation> searchUserAccount(final String username);", "List<UserRepresentation> getUsers(final String realm);", "@Override\r\n\tpublic List<AccountDTO> getUserByFilter(UserFilter userFilter) {\n\t\treturn accountDao.getUserByFilter(userFilter);\r\n\t}", "@Override\n public Users getUsers() throws UserException {\n Users users = new Users();\n log.debug(\"getUsers\");\n User user = null;\n ResultSet result;\n Connection conn = null;\n PreparedStatement stm = null;\n try {\n conn = provider.getConnection();\n\n stm = conn.prepareStatement(GET_ALL_USERS);\n result = stm.executeQuery();\n\n while (result.next()) {\n user = buildUserFromResult(result);\n log.debug(\"User found {}\", user);\n users.add((DataUser) user);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n throw new UserException(e.getMessage());\n\n } finally {\n try {\n stm.close();\n conn.close();\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n }\n return users;\n }", "public Single<UserResponse> userList(int params) {\n return supportAppService.userList(params);\n }", "public List<User> getEnabledUsers();", "@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\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}", "@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}", "List<User> getActivatedUserList();", "@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}", "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}", "com.rpg.framework.database.Protocol.User getUsers(int index);", "com.rpg.framework.database.Protocol.User getUsers(int index);", "public org.eclipse.stardust.engine.api.query.Users\n getAllUsers(org.eclipse.stardust.engine.api.query.UserQuery query)\n throws org.eclipse.stardust.common.error.WorkflowException;", "@Override\r\n\tpublic List<User> getUserList() throws MyUserException {\n\t\treturn userDao.getUserList();\r\n\t}", "public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}", "public List<User> getActiveUsers(boolean active);", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }", "@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}", "@RequestMapping(value = {\"/users/list\"}, method = RequestMethod.GET)\n\tpublic ResponseEntity<List<User>> fetchUsers() {\n\t\t\tSystem.out.println(\"fetching users\");\n\t\t\tList<User> user = userDAO.list(\"APPROVED\");\n\t\t\tSystem.out.println(user);\n\t\t\treturn new ResponseEntity<List<User>>(user, HttpStatus.OK);\n\t\t}", "private void listUsers(Request request, Response response) {\r\n\t\tList<UserBean> userList = null;\r\n\r\n\t\ttry {\r\n\t\t\tuserList = userService.findUsers();\r\n\t\t} catch (Exception e) {\r\n\t\t\tresponse.setStatus(Status.SERVER_ERROR_INTERNAL, e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tlog.error(e);\r\n\t\t} finally {\r\n\t\t\txmlSerializationService.generateXMLResponse(request, response,\r\n\t\t\t\t\tuserList);\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> findAllUsers() {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.addOrder(Order.asc(\"firstname\")).setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);\r\n\t\tList<User> users = (List<User>)crit.list();\r\n\t\treturn users;\r\n\t}", "public List<EOSUser> listUsers(List<EOSState> states, int limit, int offset);", "public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }", "ObservableList<User> getUserList();", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<UserDto> getUsers() {\n\n\t\tList<UserEntity> userEntities = userRepository.findAll();\n\t\tList<UserDto> userDTOs = new ArrayList<>();\n\n\t\tfor (UserEntity u : userEntities)\n\t\t\tuserDTOs.add(etd.getUser(u));\n\t\treturn userDTOs;\n\n\t}", "public List<User> getUsersStartingWith(String startsWith, Boolean enabled, int offset, int length) throws UserManagementException;", "@Override\n public List<User> searchUserByParams(Map<String, String> parametersSearch) throws ServiceException {\n List<User> users;\n String searchType = parametersSearch.get(USER_SEARCH_TYPE_PARAMETER_NAME);\n if (searchType == null) {\n return Collections.emptyList();\n }\n try {\n manager.beginTransaction(userDao);\n users = searchUsers(searchType, parametersSearch);\n manager.endTransaction();\n } catch (DaoException exception) {\n try {\n manager.rollback();\n } catch (DaoException rollbackException) {\n logger.error(rollbackException);\n }\n throw new ServiceException(exception);\n }\n return users;\n }", "public List<User> getAllUsers() {\n List<User> users = null;\n Session session = null;\n try {\n session = openSession();\n users = session.createCriteria(User.class).list();\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return users;\n }", "public List<User> list();", "public List<YuserVO> getAllUsers() {\n\t\tList<YuserVO> list = null;\n\t\t\ttry {\n\t\t\t\tlist = userDao.getAllUsers();\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\tSystem.out.println(\"get users failed ..................................\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\treturn list;\n\t}", "@Override\n\tpublic List<User> GetListById(int userId) {\n\t\treturn this.userDao.getListById(userId);\n\t}", "@GET\n @Path(value = \"user\")\n public List<JsonMovie> getAllWithParams(@Context HttpServletRequest request, \n\t\t\t@QueryParam(\"from\") int from, @QueryParam(\"limit\") int limit,\n\t\t\t@QueryParam(\"orderBy\") String orderBy, @QueryParam(\"orderDir\") String orderDir,\n\t\t\t@QueryParam(\"userId\") Integer userId) {\n\t\tList<JsonMovie> movies = movieDao.getUserMovies(from, limit, orderBy, orderDir, userId);\n \tLOGGER.info(\"find \"+movies.size()+\" movies in the database\");\n\t\tString artistName = \"\";\n\t\tInteger artistId = 0;\n\t\tList<Movieartist> martists = null;\n \tfor (JsonMovie m : movies) {\n\t\t\tmartists = movieDao.getMovieArtists(m.getId());\n\t\t\tif (!martists.isEmpty()) {\n\t\t\t\tartistName = martists.get(0).getArtistBean()\n\t\t\t\t\t\t.getName()\n\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t+ martists.get(0).getArtistBean()\n\t\t\t\t\t\t\t\t.getFirstname();\n\t\t\t\tartistId = martists.get(0).getArtistBean().getId();\n\t\t\t} else {\n\t\t\t\tartistName = \"\";\n\t\t\t\tartistId = 0;\n\t\t\t}\n\t\t\tm.setRealisator(artistName);\n\t\t\tm.setRealisatorId(artistId);\n \t}\n \treturn movies;\n }", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "List<BlogUser> getUsers() throws DAOException;", "public ArrayList<User> showUsers() throws SQLException {\n ArrayList<User> users = new ArrayList<>();\n PreparedStatement pr = connection.prepareStatement(Queries.showUserList);\n ResultSet result = pr.executeQuery();\n while (result.next()) {\n users.add(new User(\n result.getInt(\"id\"),\n result.getString(\"user_full_name\"),\n result.getString(\"email\"),\n result.getInt(\"phone\")));\n }\n pr.close();\n return users;\n }", "public List<User> searchUsers(String arg) {\n\n\t\tMUser mu = new MUser();\n\t\tList<User> searchUsers = mu.searchUsers(arg);\n\t\tif (searchUsers == null) {\n\t\t\terrorMsg = mu.errorMsg;\n\t\t\treturn null;\n\t\t}\n\t\treturn searchUsers;\n\n\t}", "@RequestMapping(value = \"/users/list\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<UsersDTO> findAllUsers() {\n\t\tlogger.info(\"Return All Users.\");\t\n\t\treturn (List<UsersDTO>) usersService.findAllUsers();\n\t}", "public List<User> listAll() throws Exception;", "@Override\n\tpublic List<User> findUserByCondition(UserQuery query) throws Exception {\n\t\treturn userDao.findUserByCondition(query);\n\t}", "public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }", "abstract ArrayList<User> getAllUsers();", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}", "@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}", "@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}", "@Override\n public ArrayList<User> findAll(Map<String, Object> params) {\n\n return null;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}", "public List<User> listSearch(String search);", "public List<User> findAll() \n\t{\n\t\tString sql = \"SELECT * FROM VIDEOGAMESTORE.USERS\";\n\t\t\n\t\t// Instantiate a new list of Users.\n\t\tList<User> userList = new ArrayList<User>();\n\t\t\n\t\ttry {\n\t\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(sql);\n\t\t\twhile(srs.next())\n\t\t\t{\n\t\t\t\t// Add a new User to the list for every row that is returned\n\t\t\t\tuserList.add(new User(srs.getString(\"USERNAME\"), srs.getString(\"PASSWORD\"), srs.getString(\"EMAIL\"),\n\t\t\t\t\t\tsrs.getString(\"FIRST_NAME\"), srs.getString(\"LAST_NAME\"), srs.getInt(\"GENDER\"), srs.getInt(\"USER_PRIVILEGE\"), srs.getInt(\"ID\")));\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\t\n\t\treturn userList;\n\t}", "public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}", "public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}", "@GetMapping(\"/userslist\")\n\tpublic List<User> usersList() {\n\t\treturn userService.usersList();\n\t}", "@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}" ]
[ "0.78476834", "0.78476834", "0.78017604", "0.7695537", "0.7626518", "0.75998586", "0.75809574", "0.75238305", "0.74898356", "0.7471625", "0.7471625", "0.74289304", "0.7425406", "0.7386483", "0.73771", "0.7316952", "0.7279447", "0.726291", "0.72512335", "0.7230902", "0.7221087", "0.72188216", "0.7183315", "0.7172892", "0.7172871", "0.7165859", "0.7164476", "0.7164421", "0.71403134", "0.7120001", "0.7111596", "0.7105957", "0.70674604", "0.70642304", "0.7030776", "0.7029196", "0.7010209", "0.7004133", "0.6966571", "0.69582736", "0.6927626", "0.6922862", "0.69196165", "0.6909148", "0.6903217", "0.69009", "0.6890577", "0.68794787", "0.6877208", "0.68657094", "0.6863775", "0.6859112", "0.6852942", "0.68523204", "0.68490523", "0.684858", "0.6846844", "0.6843517", "0.6842209", "0.68365353", "0.6834551", "0.68271446", "0.68263614", "0.68244666", "0.6822795", "0.68185425", "0.68114585", "0.68084854", "0.6799691", "0.6791305", "0.6783001", "0.6782508", "0.6781939", "0.6780678", "0.6778868", "0.6776189", "0.6775823", "0.67721534", "0.67709136", "0.6768424", "0.67532116", "0.67471254", "0.67460835", "0.6742392", "0.6740454", "0.6736936", "0.6730208", "0.6728514", "0.67282593", "0.67270947", "0.6723887", "0.67232263", "0.67223233", "0.6721377", "0.6719083", "0.67101634", "0.6708624", "0.67057", "0.6699509", "0.6698554" ]
0.8196146
0
Saves a user's information
public void saveUser(User user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveUserData(User user);", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "private void saveUserInformation() {\n String name = editTextName.getText().toString().trim();\n String add = editTextAddress.getText().toString().trim();\n\n //creating a userinformation object\n UserInformation userInformation = new UserInformation(name, add);\n\n //getting the current logged in user\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n //saving data to firebase database\n /*\n * first we are creating a new child in firebase with the\n * unique id of logged in user\n * and then for that user under the unique id we are saving data\n * for saving data we are using setvalue method this method takes a normal java object\n * */\n databaseReference.child(user.getUid()).setValue(userInformation);\n\n //displaying a success toast\n Toast.makeText(this, \"Information Saved...\", Toast.LENGTH_LONG).show();\n }", "void save(User user);", "@Override\r\n\tpublic void save(User user) {\n\t\t\r\n\t}", "public boolean save(User user);", "@Override\n\tpublic void save(User u) {\n\t\tSystem.out.println(\"a user saved\");\n\t}", "public int saveUser(User user);", "@Override\n public void saveUser(User user) {\n }", "public void save(SystemUser user);", "void save(KingdomUser user);", "public void saveUser(User user) {\n\t\tpersist(user);\r\n\t\t\r\n\t}", "public User saveUser(User user);", "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 }", "public void save(User user) {\n\t\tuserDetails.setUserName(user.getUserName());\n\t\tuserDetails.setPassword(user.getPassword());\n\t\tuserDetails.setFname(user.getFname());\n\t\tuserDetails.setLname(user.getLname());\n\t\tuserDetails.setAge(user.getAge());\n\t\tuserDetailsRepositroy.save(userDetails);\n\t}", "User saveUser(User user);", "private void saveUserDetails()\r\n\t{\r\n\t\t/*\r\n\t\t * Retrieve content from form\r\n\t\t */\r\n\t\tContentValues reg = new ContentValues();\r\n\r\n\t\treg.put(UserdataDBAdapter.C_NAME, txtName.getText().toString());\r\n\r\n\t\treg.put(UserdataDBAdapter.C_USER_EMAIL, txtUserEmail.getText()\r\n\t\t\t\t.toString());\r\n\r\n\t\treg.put(UserdataDBAdapter.C_RECIPIENT_EMAIL, lblAddressee.getText()\r\n\t\t\t\t.toString());\r\n\r\n\t\tif (rdbKilo.isChecked())\r\n\t\t{\r\n\t\t\treg.put(UserdataDBAdapter.C_USES_METRIC, 1);\t// , true\r\n\t\t}\r\n\t\telse\r\n\t\t\tif (rdbPound.isChecked())\r\n\t\t\t{\r\n\t\t\t\treg.put(UserdataDBAdapter.C_USES_METRIC, 0);\t// , false\r\n\t\t\t}\r\n\r\n\t\t/*\r\n\t\t * Save content into database source:\r\n\t\t * http://stackoverflow.com/questions/\r\n\t\t * 9212574/calling-activity-methods-from-fragment\r\n\t\t */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tActivity parent = getActivity();\r\n\r\n\t\t\tif (parent instanceof LauncherActivity)\r\n\t\t\t{\r\n\t\t\t\tif (arguments == null)\r\n\t\t\t\t{\r\n\t\t\t\t\t((LauncherActivity) parent).getUserdataDBAdapter().insert(\r\n\t\t\t\t\t\t\treg);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treg.put(UserdataDBAdapter.C_ID, arguments.getInt(\"userId\"));\r\n\r\n\t\t\t\t\t((LauncherActivity) parent).getUserdataDBAdapter().update(\r\n\t\t\t\t\t\t\treg);\r\n\r\n\t\t\t\t\t((LauncherActivity) parent).queryForUserDetails();\r\n\t\t\t\t}\r\n\t\t\t\tToast.makeText(parent, \"User details successfully stored\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\tLog.i(this.getClass().toString(), e.getMessage());\r\n\t\t}\r\n\t}", "public Long saveUser(User user, User modifiedBy);", "public void saveUser(IUser user);", "@Override\r\n\tpublic int saveUser(User user) {\n\t\tString sql = \"insert into user values(?,?,?,?)\";\r\n\t\treturn this.update(sql,user.getId(), user.getUsername(),user.getPassword(),user.getEmail());\r\n\t}", "@Override\n\tpublic void save(User entity) {\n\t\t\n\t}", "void save(UserDetails userDetails);", "public String saveUser(User user) {\n id = user.getId();\n firstName = user.getFirstName();\n lastName = user.getLastName();\n phoneNumber = user.getPhoneNumber();\n email = user.getEmail();\n address = user.getAddress();\n idCity = user.getIdCity();\n currentUser = user;\n return \"operator\";\n }", "void saveOrUpdate(User user);", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "private void saveUserDetails() {\n UserModel userModel = new UserModel();\n userModel.setUserName(editUserName.getText().toString());\n userModel.setPassword(editPassword.getText().toString());\n\n /* if (db.insertUserDetils(userModel)) {\n //Toast.makeText(LoginActivity.this, \"Successfully save\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Data not Saved\", Toast.LENGTH_SHORT).show();\n }*/\n }", "@Override\n\tpublic void save(Account userForm) {\n\t\taccount.save(userForm);\n\n\t}", "@Override\n\tpublic void save(User user) \n\t{\n\t\tuserDAO.save(user);\n\t}", "public static void SaveUser(StandardUserModel user, Context context) {\n\t\tfilename = userprofile;\n\t\tString modelJson = gson.toJson(user);\n\t\t\n\t\twriteuser(modelJson, context);\n\t}", "@Override\r\n\tpublic void save() {\n\t\tSystem.out.println(\"UserServiceImplÍ┤đđ┴╦\");\r\n\t\tuserDao.save();\r\n\t}", "public void saveUserData(UserData userData){\n userDataRepository.save(userData);\n }", "@RequestMapping(value=\"/user\", method = RequestMethod.POST) \n\tpublic void saveUser(@RequestBody Users user) {\n\t\tlogger.debug(\"Add a new user: {}\", user.getUsername());\n\t\tauthService.saveUser(user);\n\t}", "public void save(UserInfo userInfo){\n\t\t\n\t\t\n\t\tMap map = FieldUtil.getPreFieldMap(UserInfo.class,userInfo);\n\t\tStringBuffer sql=new StringBuffer(\"insert into CSMS_USER_INFO\");\n\t\tsql.append(map.get(\"insertNameStr\"));\n\t\tsaveOrUpdate(sql.toString(), (List) map.get(\"param\"));\n\t}", "public void storeUser(User user) {\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n datastore.put(userEntity);\n }", "private void storeUser(User user){\n // instantiate SharedPreferences\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n // stores each attribute in a variable, if attribute is null the editor will clear the corresponding value.\n editor.putString(KEY_USER, user.toJSONString());\n // commit changes\n editor.apply();\n }", "public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void saveAdditionalInformation(UserDTO userDTO);", "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 }", "protected void userSave(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\n\t\t// check if the typed name is real\n\t\ttry {\n\t\t\tInteger.parseInt(strFullname);\n\t\t\tsendError(request, response,\n\t\t\t\t\t\"You can't type number for your Full Name!\");\n\t\t\treturn;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// check if the user is filled all the lines\n\t\tif ((strUsername.equals(\"\")) || strPassword.equals(\"\")\n\t\t\t\t|| strFullname.equals(\"\") || strEmail.equals(\"\")) {\n\t\t\tsendError(request, response, \"Please, fill the lines with *\");\n\t\t\treturn;\n\t\t}\n\t\t// Check for valid email\n\t\ttry {\n\t\t\tString emailregex = \"^[_A-Za-z0-9-]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9-]+)*(\\\\.[A-Za-z]{2,})$\";\n\t\t\tBoolean b = strEmail.matches(emailregex);\n\t\t\tif (b == false) {\n\t\t\t\tsendError(request, response, \"Invalid Email\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tMySql sql = new MySql();\n\t\t// check if there is another user registered with the same name and\n\t\t// email\n\t\tif (sql.DublicateUsernameEmail(strUsername, strEmail)) {\n\t\t\tsendError(request, response,\n\t\t\t\t\t\"There is another person with the same Name and Email!\");\n\t\t\treturn;\n\t\t}\n\t\tsql.insertUserInfo(strUsername, strPassword, strFullname, strEmail);\n\t}", "public User save(User user);", "public String saveUser(User entity) {\n\t\treturn null;\r\n\t}", "private void saveSettings(){\n // get current user from shared preferences\n currentUser = getUserFromSharedPreferences();\n\n final User newUser = currentUser;\n Log.i(\"currentUser name\",currentUser.getUsername());\n String username = ((EditText)findViewById(R.id.usernameET)).getText().toString();\n\n if(\"\".equals(username)||username==null){\n Toast.makeText(getApplicationContext(),\"Failed to save, user name cannot be empty\",Toast.LENGTH_LONG).show();\n return;\n }\n\n newUser.setUsername(username);\n\n // update user data in firebase\n Firebase.setAndroidContext(this);\n Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL);\n\n // set value and add completion listener\n myFirebaseRef.child(\"users\").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n\n Toast.makeText(getApplicationContext(),\"Data could not be saved. \" + firebaseError.getMessage(),Toast.LENGTH_SHORT).show();\n } else {\n // if user info saved successfully, then save user image\n uploadPhoto();\n Toast.makeText(getApplicationContext(),\"User data saved successfully.\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "@RolesAllowed({ RoleEnum.ROLE_ADMIN, RoleEnum.ROLE_GUEST })\n\tpublic Integer saveUser(User user);", "@Override\r\n\tpublic int save(SpUser t) {\n\t\treturn 0;\r\n\t}", "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 }", "protected void saveUser(Context context, String text){\n\n mSharedPreferences = context.getSharedPreferences(USER_DETAILS_PREFS_NAME, Context.MODE_PRIVATE);\n editor = mSharedPreferences.edit();\n\n editor.putString(USER_DETAILS_PREFS_KEY, text);\n\n editor.commit();\n }", "User save(User user);", "private void SaveUserToFirebase(FirebaseUser user)\n {\n\n }", "@Override\n\tpublic void saveUser(User user) {\n\t\tmongoTemplate.save(user);\n\t}", "@Override\n\tpublic int save(User user) {\n\t\treturn dao.save(user);\n\t}", "@Override\n\tpublic void save(Connection conn, User user) throws SQLException {\n\t\t\n\t}", "public static void save() throws IOException {\n String output = Main.currentUser.toString();\n output += DatabaseTranslator.getUserLocations(currentUser.getName());\n DatabaseTranslator.storeUserData(currentUser.getName(), output);\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 }", "private void writeNewUser(String userId, String name, String email) {\n User user = new User(name, email);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Name\").setValue(name);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Email\").setValue(email);\n\n\n }", "public void saveUserSettings() {\n\t}", "@Override\r\n public void usersave(User user) {\n if (user.getu_id() != null) {\r\n userMapper.userupdate(user);\r\n } else {\r\n userMapper.usersave(user);\r\n }\r\n }", "@Override\n\tpublic void save(UserEntity theUser) {\n\t\t\n\t\temploiDao.findById(theUser.getEmploi().getId()).ifPresent(emploi -> theUser.setEmploi(emploi));\n\t\tif(theUser.getEntite() != null){entityDao.findById(theUser.getEntite().getId()).ifPresent(entite -> theUser.setEntite(entite));}\n\t\t\n\t\tuserDao.save(theUser);\n\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tUserInfo saveAndFlush(UserInfo ui);", "private void SaveUserInformation(FirebaseUser user)\n {\n General.SetStringData(getApplicationContext(), Constants.USER_EMAIL, user.getEmail());\n General.SetStringData(getApplicationContext(), Constants.USER_NAME, user.getDisplayName());\n General.SetStringData(getApplicationContext(), Constants.USER_ID, user.getUid());\n General.SetStringData(getApplicationContext(), Constants.USER_LOGINED, \"true\");\n General.SetStringData(getApplicationContext(), Constants.USER_PASSWORD, password);\n\n user.getToken(true).addOnCompleteListener(LogInActivity.this, new OnCompleteListener<GetTokenResult>() {\n @Override\n public void onComplete(@NonNull Task<GetTokenResult> task) {\n General.SetStringData(LogInActivity.this, Constants.USER_TOKEN, task.getResult().getToken());\n Log.d(\"TOKEN\", task.getResult().getToken());\n }\n });\n if (user.getPhotoUrl() != null)\n General.SetStringData(getApplicationContext(), Constants.USER_PHOTO, user.getPhotoUrl().toString());\n else\n General.SetStringData(getApplicationContext(), Constants.USER_PHOTO, \"a\");\n }", "public void save(User use) {\n jdbcTemplate.update(\"insert into user (id,name) values(?,?)\", use.getName());\n }", "public void setUser(User user) {\n this.savedBy = user;\n }", "public String saveUserRecord() {\n\t\tSystem.out.println(\"Calling saveUserRecord() Method To Save User Record\");\n\t\tuserDAO.addUser(user);\n\t\t\n\t\treturn \"index.xhtml?faces-redirect=true\";\n\t}", "private void saveUserInPreferences(String userName, String password, User user) {\n mUserManager.setUsername(userName);\n mUserManager.setPassword(password);\n mUserManager.saveUser(user);\n }", "private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }", "boolean saveUser(User entity) throws UserDaoException;", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "@FXML\r\n\tpublic void saveNewAccount( ) {\r\n\t\t// Save user input\r\n\t\tString name = userName.getText( );\r\n\t\tString mail = email.getText( );\r\n\r\n\t\t// Call the to file method to write to data.txt\r\n\t\tUserToFile.toFile(name, pin, mail);\r\n\t\t\r\n\t\t// View the test after the info is saved\r\n\t\tviewTest( );\r\n\t}", "public final void saveUserInfo(final String userName, final String password)\n throws NoSuchAlgorithmException, UnsupportedEncodingException {\n addContact(userName, password);\n }", "public User save(User usuario);", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public void addUser(UserModel user);", "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 saveUser(User user) {\n\t\tuserRepo.save(user);\n\t}", "void updateUserById(String username, User userData);", "public static void saveUser(User user) {\n if (user == null) {\n throw new IllegalArgumentException();\n }\n SharedPreferences preferences = MainActivity.getPreferences();\n Set<String> locations = preferences.getStringSet(\n LOCATIONS_INTEREST.get(),\n new HashSet<String>());\n if (locations.isEmpty()) {\n for (Location location : user.getAreasOfInterest()) {\n locations.add(location.getName());\n }\n }\n preferences.edit()\n .putString(FACEBOOK_ID.get(), user.getFacebookId())\n .putString(USERNAME.get(), user.getUsername())\n .putString(LAST_NAME.get(), user.getLastName())\n .putString(FIRST_NAME.get(), user.getFirstName())\n .putString(GENDER.get(), user.getGender().get())\n .putString(BIRTHDAY.get(), user.getBirthDate().toString())\n .putString(EMAIL.get(), user.getEmail())\n .putStringSet(LOCATIONS_INTEREST.get(), locations)\n .apply();\n }", "public UserEntity save(UserEntity userEntity);", "public void storeUser(User user) {\n User doublecheck = getUser(user.getEmail());\n if(doublecheck != null){\n if(user.getAboutMe() == null && doublecheck.getAboutMe() != null){\n user.setAboutMe(doublecheck.getAboutMe());\n }\n if(user.getFirstName() == null && doublecheck.getFirstName() != null){\n user.setFirstName(doublecheck.getFirstName());\n }\n if(user.getLastName() == null && doublecheck.getLastName() != null){\n user.setLastName(doublecheck.getLastName());\n }\n /*if(user.getAdvisees() == null && doublecheck.getAdvisees() != null){\n user.setAdvisees(doublecheck.getAdvisees());\n }\n if(user.getAdvisors() == null && doublecheck.getAdvisors() != null){\n user.setAdvisors(doublecheck.getAdvisors());\n }\n */\n }\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n userEntity.setProperty(\"firstName\", user.getFirstName());\n userEntity.setProperty(\"lastName\", user.getLastName());\n //userEntity.setProperty(\"advisees\", user.getAdviseesToString());\n //userEntity.setProperty(\"advisors\", user.getAdvisorsToString());\n datastore.put(userEntity);\n\n }", "void saveRegisterInformation(UserDTO userDTO);", "@Override\n public void saveUser(User user){\n try {\n runner.update(con.getThreadConnection(),\"insert into user(username,address,sex,birthday) values(?,?,?,?)\",user.getUsername(),user.getAddress(),user.getSex(),user.getBirthday());\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n\n }", "@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }", "public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);", "private void saveUserData() {\n\t\ttry {\n\t\t\t// if the user did not change default profile\n\t\t\t// picture, mProfilePictureArray will be null.\n\t\t\tif (bytePhoto != null) {\n\t\t\t\tFileOutputStream fos = openFileOutput(\n\t\t\t\t\t\tgetString(R.string.profile_photo_file_name),\n\t\t\t\t\t\tMODE_PRIVATE);\n\t\t\t\tfos.write(bytePhoto);\n\t\t\t\tfos.flush();\n\t\t\t\tfos.close();\n\t\t\t}\n\t\t} catch (Exception ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\tdb = new PersonalEventDbHelper(this);\n\t\t// Getting the shared preferences editor\n\t\tString mKey = getString(R.string.preference_name);\n\t\tSharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n\t\tSharedPreferences.Editor mEditor = mPrefs.edit();\n\t\tmEditor.clear();\n\n\t\tFriend user = new Friend();\n\t\tArrayList<Event> list = new ArrayList<Event>();\n\n\t\t// Save name information\n\t\tmKey = getString(R.string.name_field);\n\t\tString mValue = (String) ((EditText) findViewById(R.id.editName))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\t\tname = mValue;\n\t\tuser.setName(mValue);\n\n\t\t// PARSE\n\t\tGlobals.USER = name;\n\n\t\t// Save class information\n\t\tmKey = getString(R.string.class_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editClass)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tuser.setClassYear(mValue);\n\n\t\t// Save major information\n\t\tmKey = getString(R.string.major_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editMajor)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Save course information\n\t\t// Course 1\n\t\t// Course name\n\t\tmKey = \"Course #1 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tEvent event1 = new Event();\n\t\tevent1.setEventName(mValue);\n\t\tevent1.setColor(Globals.USER_COLOR);\n\t\t// Course time period\n\t\tmKey = \"Course #1 Time\";\n\t\tSpinner mSpinnerSelection = (Spinner) findViewById(R.id.course1TimeSpinner);\n\t\tint selectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tevent1.setClassPeriod(selectedCourse);\n\n\t\t// Course location\n\t\tmKey = \"Course #1 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 2\n\t\tevent1.setEventLocation(mValue);\n\t\tevent1.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event1.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event1.getString(\"objectId\"));\n\t\t// System.out.println(event1.getString(\"objectId\"));\n\t\tevent1.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY1, event1.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(0));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event1.getClassPeriod());\n\t\t// event.setEventLocation(event1.getEventLocation());\n\t\t// event.setEventName(event1.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\n\t\tdb.insertEntry(event1);\n\t\tlist.add(event1);\n\n\t\t// Course 2\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #2 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event2 = new Event();\n\t\tevent2.setEventName(mValue);\n\t\tevent2.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tSpinner mSpinnerSelection2 = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tint selectedCourse2 = mSpinnerSelection2.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse2);\n\n\t\tevent2.setClassPeriod(selectedCourse2);\n\n\t\t// Course location\n\t\tmKey = \"Course #2 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 3\n\t\tevent2.setEventLocation(mValue);\n\t\tevent2.setOwnerName(name);\n\t\t// System.out.println(event2.getString(\"objectId\"));\n\t\t// if (!Globals.classList.contains(event2.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event2.getString(\"objectId\"));\n\t\tevent2.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY2, event2.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(1));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event2.getClassPeriod());\n\t\t// event.setEventLocation(event2.getEventLocation());\n\t\t// event.setEventName(event2.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event2);\n\t\tlist.add(event2);\n\n\t\t// Course 3\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #3 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tEvent event3 = new Event();\n\t\tevent3.setEventName(mValue);\n\t\tevent3.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tSpinner mSpinnerSelection3 = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tint selectedCourse3 = mSpinnerSelection3.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse3);\n\n\t\tevent3.setClassPeriod(selectedCourse3);\n\n\t\t// Course location\n\t\tmKey = \"Course #3 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 4\n\t\tevent3.setEventLocation(mValue);\n\t\tevent3.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event3.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event3.getString(\"objectId\"));\n\t\tevent3.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY3, event3.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(2));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event3.getClassPeriod());\n\t\t// event.setEventLocation(event3.getEventLocation());\n\t\t// event.setEventName(event3.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event3);\n\t\tlist.add(event3);\n\t\t// Course 4\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #4 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event4 = new Event();\n\t\tevent4.setEventName(mValue);\n\t\tevent4.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tSpinner mSpinnerSelection4 = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tint selectedCourse4 = mSpinnerSelection4.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse4);\n\n\t\tevent4.setClassPeriod(selectedCourse4);\n\n\t\t// Course location\n\t\tmKey = \"Course #4 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tevent4.setEventLocation(mValue);\n\n\t\tlist.add(event4);\n\t\tevent4.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event4.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event4.getString(\"objectId\"));\n\t\tevent4.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY4, event4.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(3));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event4.getClassPeriod());\n\t\t// event.setEventLocation(event4.getEventLocation());\n\t\t// event.setEventName(event4.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event4);\n\t\tuser.setSchedule(list);\n\n\t\t// Call method to get all entries from the datastore!!!\n\n\t\t// EventDbHelper db = new EventDbHelper(this);\n\t\t// try {\n\t\t// db.insertEntry(user);\n\t\t// } catch (IOException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\n\t\t// Commit all the changes into the shared preference\n\t\tmEditor.commit();\n\t\tGlobals.isProfileSet = true;\n\t}", "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}", "public User updateUser(User user);", "@Override\n\tpublic boolean save(User user) {\n\t\tString userHash = UUID.randomUUID().toString();\n\t\tuser.setUserHash(userHash);\n\t\tboolean status = userRepository.save(user);\n\t\tif (status) {\n\t\t\tSystem.out.println(\"USER ID : \" + user.getId());\n\t\t\tSystem.out.println(\"User has been inserted!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"User has not been inserted!.\");\n\t\t}\n\t\treturn status;\n\t}", "public static void save(Context context,User user){\n try\n {\n\n FileOutputStream fileOutputStream = context.openFileOutput(\"UserData.dat\", Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(user);\n objectOutputStream.close();\n fileOutputStream.close();\n\n }\n\n catch(IOException ex) {\n System.out.println(\"IOException is caught\");\n }\n }", "private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }", "public User saveUser(User user){\n return userRepository.save(user);\n }", "@PostMapping(value = \"/saveUser\")\n public ResponseEntity<User> saveUser(@RequestBody User user ) {\n userServiceAnnotationSingleton.addUser(user.getName(),user.getAge());\n return ResponseEntity.ok(user);\n }", "@Override\n\tpublic void saveUser(User user) {\n\t\tuser.setPassword(MD5.getInstance().getMd5(user.getPassword(),\"UTF-8\"));\n\t\tuserDao.insertUser(user);\n\t}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "public void addUser(User user);", "public void insertUser() {}", "public static void saveUserInformation(int hs) {\n FirebaseUser usr = firebaseAuth.getCurrentUser();\n\n //saving data to firebase database\n /*\n * first we are creating a new child in firebase with the\n * unique id of logged in user\n * and then for that user under the unique id we are saving data\n * for saving data we are using setvalue method this method takes a normal java object\n * */\n if (usr != null) {\n databaseReference.child(\"users\").child(usr.getUid()).child(\"highScore\").setValue(hs);\n Log.d(\"usrnotnull\",\"oui\");\n Log.d(\"userUid\",usr.getUid());\n }\n\n\n // Toast ?\n }", "public boolean saveUser(Owner user) {\r\n boolean f = false;\r\n try {\r\n //user -->database\r\n\r\n String query = \"insert into Owner(name,email,password) values (?,?,?)\";\r\n PreparedStatement pstmt = this.con.prepareStatement(query);\r\n pstmt.setString(1, user.getName());\r\n pstmt.setString(2, user.getEmail());\r\n pstmt.setString(3, user.getPassword());\r\n pstmt.executeUpdate();\r\n f = true;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return f;\r\n\r\n }", "public boolean saveUser(User user )\r\n\t{\r\n\t\tboolean f = false;\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//user --> database\r\n\t\t\tString query=\"insert into user(first_name,last_name,bdate,email,password,gender,about) values (?,?,?,?,?,?,?)\";\r\n\t\t\tPreparedStatement pstmt = this.con.prepareStatement(query);\r\n\t\t\tpstmt.setString(1, user.getFirst_name());\r\n\t\t\tpstmt.setString(2, user.getLast_name());\r\n\t\t\tpstmt.setString(3, user.getBdate());\r\n\t\t\tpstmt.setString(4, user.getEmail());\r\n\t\t\tpstmt.setString(5, user.getPassword());\r\n\t\t\tpstmt.setString(6, user.getGender());\r\n\t\t\tpstmt.setString(7, user.getAbout());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\tf=true;\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn f;\r\n\t\t\r\n\t\t\r\n\t}", "void addUser(User user);", "void addUser(User user);", "@Override\n\tpublic boolean saveUser(User user) {\n\t\tString sql=\"insert into users(uname,upassword,type) values(?,?,?)\";\n\t\tList<Object> params=new ArrayList<Object>();//泛型\n\t\tparams.add(user.getUname());\n\t\tparams.add(user.getUpassword());\n\t\tparams.add(user.getType());\n\t\treturn this.MysqlUpdate(sql, params);\n\t}", "public void saveUser(String name, String username, String password) {\n new User(name, username, password).saveUser(getCurrentUser().getIDNumber());\n }" ]
[ "0.8127559", "0.7992227", "0.7846971", "0.7844798", "0.7605599", "0.7578237", "0.75776654", "0.7562641", "0.74904245", "0.74457276", "0.7403727", "0.7266453", "0.7252148", "0.72372264", "0.72305274", "0.71992624", "0.7199073", "0.7195493", "0.7160186", "0.7156011", "0.7154871", "0.7118876", "0.7102305", "0.71018493", "0.7092533", "0.70893824", "0.7072914", "0.7060425", "0.70536435", "0.70384055", "0.7015696", "0.6992752", "0.69616437", "0.6960116", "0.69260687", "0.6914484", "0.69077766", "0.6907037", "0.69045013", "0.6901147", "0.6860113", "0.68586856", "0.68514943", "0.6835443", "0.68221384", "0.68200517", "0.680734", "0.6806954", "0.6800451", "0.6800249", "0.6797646", "0.67765623", "0.6749058", "0.6743074", "0.6741226", "0.6736896", "0.67350286", "0.6734555", "0.6730757", "0.67072475", "0.670493", "0.6672659", "0.66662", "0.6660258", "0.66471833", "0.66368973", "0.6616039", "0.661326", "0.66047555", "0.6603636", "0.6598451", "0.65890396", "0.65847427", "0.6583929", "0.65831584", "0.65782017", "0.65591466", "0.6553294", "0.65441215", "0.65303934", "0.65292126", "0.65202266", "0.65171826", "0.651691", "0.650775", "0.6505407", "0.65032595", "0.6485661", "0.6485412", "0.64844704", "0.64712036", "0.64691037", "0.6453308", "0.64521635", "0.645032", "0.6448105", "0.6443941", "0.6443941", "0.6439844", "0.64333797" ]
0.7895591
2
Removes a user from the database by their username
public void removeUser(String username);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeUser(String username) {\n PreparedStatement stmt;\n\n // SQL code for delete\n String deleteSQL = \"DELETE FROM USERS WHERE username = ?\";\n try {\n connect();\n // Create SQL statement for deleting\n stmt = this.connection.prepareStatement(deleteSQL);\n stmt.setString(1, username);\n stmt.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n close();\n }\n }", "public void deleteUser(String username);", "void deleteUser( String username );", "void deleteUser(String username) throws UserDaoException;", "public void deleteUser(String name);", "void remove(User user) throws SQLException;", "public void deleteUser(String username) {\n profile.deleteUser(username);\n }", "public void removeUser(String username) {\n userList.remove(username);\n }", "public void removeUser(String username){\n \t\tString id = username;\n \t\tString query = \"DELETE FROM users WHERE id = '\"+ id + \"';\";\n \t\tsqlUpdate(query);\n \t\tquery = \"DELETE FROM friends WHERE id1 = id OR id2 = '\" + id + \"';\";\n \t\tsqlUpdate(query);\n \t\tquery = \"DELETE FROM achievements WHERE user = id;\";\n \t\tsqlUpdate(query);\n \t\t\n \t\tquery = \"DELETE FROM notes WHERE source = '\" + id + \"' OR dest = '\" + id + \"';\";\n \t\tsqlUpdate(query);\n \t\tquery = \"DELETE FROM challenges WHERE source = '\" + id + \"' OR dest = '\" + id + \"';\";\n \t\tsqlUpdate(query);\n \t\tquery = \"DELETE FROM requests WHERE source = '\" + id + \"' OR dest = '\" + id + \"';\";\n \t\tsqlUpdate(query);\n \t}", "public void delete(String username);", "public void removeGuestPlayerFromDB(String username) throws SQLException {\n PreparedStatement stm = T3DB.getConnection().prepareStatement(\n \"delete from GuestPlayer where displayname=?\");\n stm.setString(1, username);\n stm.executeUpdate();\n }", "@Override\n\tpublic int delete(String username) {\n\t\tUsers user = userDAO.read(username);\n\t\treturn delete(user);\n\t}", "public synchronized void deleteUser(String username) {\r\n\t\tif (!mapping.containsKey(username)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tmapping.remove(username);\r\n\t\tthis.storer.deleteUser(username);\r\n\t}", "public void removeUser(String uusername) {\n\n try {\n openConnection();\n\n CallableStatement callStmt = getConnection().prepareCall(\"{ call removeUser(?) }\");\n\n callStmt.setString(1, uusername);\n\n callStmt.execute();\n\n closeAll();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "void removeUser(String uid);", "int removeUser(User user);", "Integer removeUserByUserId(Integer user_id);", "public void removeUser(String userName) {\n\t\tUser userToBeDeleted = new User(userName,\"\",false);\n\t\tusers.remove(userToBeDeleted);\t\n\t}", "public static void deleteUserByUsernameForAdmin(String username){\n\n adminServices.deleteUserByUsername(username);\n\n // boolean deleted = adminServices.deleteUserByUsername(username);\n//\n// if (deleted){\n//\n// System.out.println(\"Der Employee mit der Username:\"+ username +\"wurde gelöscht.\");\n// }else {\n//\n// System.out.println(\"Der Employee mit der Username:\"+ username +\"wurde nicht gelöscht.\");\n// }\n }", "void removeUser(Long id);", "public void deleteUser(String username) {\n UserDao userDao;\n try {\n userDao = new UserDao();\n } catch (SQLException ex) {\n reportConnectionError(ex);\n return;\n }\n try {\n userDao.deleteUser(username);\n userDao.closeConnection();\n } catch (SQLException ex) {\n reportError(\"Error while trying to delete user.\", ex);\n }\n }", "public void removeUser(){\n googleId_ = User.getDeletedUserGoogleID();\n this.addToDB(DBUtility.get().getDb_());\n }", "@DeleteMapping\n public void deleteUserByUsername(Principal principal) { userService.removeUserByUsername(principal.getName());}", "public long removeUser(String username) {\n return userRepository.deleteByUsername(username);\n }", "public void deleteByUsername(String username) {\n\t\tUserEntry entry = findUserWithId(username);\n\t\tds.delete(entry);\n\t}", "public void deleteUser(String username, Session session) {\n\t\tString hql = \"delete from User where username='\" + username + \"'\";\n\t\tQuery query = null;\n\t\ttry {\n\t\t\tquery = session.createQuery(hql);\n\t\t\tquery.executeUpdate();\n\t\t\tsession.getTransaction().commit();\n\t\t} catch (HibernateException e) {\n\t\t\tLOG.error(\"Cannot delete user\", e);\n\t\t} \n\t}", "ResponseMessage deleteUser(final String username);", "public void deleteUser(String username){\n \t\tif(!DbManager.users.contains(this.getUserByName(username)))\n \t\t\tthrow new NoSuchElementException();\n \t\t\n \t\tUser deleteUser= getUserByName(username);\n \t\t\n \t\tArrayList<Question> updatedQuestions= new ArrayList<Question>();\n \t\tArrayList<Answer> updatedAnswers= new ArrayList<Answer>();\n \t\tArrayList<Comment> updatedComments = new ArrayList<Comment>();\n \t\tusers.remove(deleteUser);\n \t\t\n \t\t// Delete all questions a user added\n \t\tfor (Question q : DbManager.questions) {\n \t\t\tif (!q.getOwner().equals(deleteUser))\n \t\t\t\tupdatedQuestions.add(q);\n \t\t}\n \t\tDbManager.questions.clear();\n \t\tDbManager.questions.addAll(updatedQuestions);\n \n \t\t// Delete all answers a user added\n \t\tfor (Answer a : DbManager.answers) {\n \t\t\tif (!a.getOwner().equals(deleteUser))\n \t\t\t\tupdatedAnswers.add(a);\n \t\t}\n \t\tDbManager.answers.clear();\n \t\tDbManager.answers.addAll(updatedAnswers);\n \n \t\t// Delete all comments a user added\n \t\tfor (Comment c : DbManager.comments) {\n \t\t\tif (!c.getOwner().equals(deleteUser))\n \t\t\t\tupdatedComments.add(c);\n \t\t}\n \t\tDbManager.comments.clear();\n \t\tDbManager.comments.addAll(updatedComments);\n \t}", "public void removeUserFromRoom(String username)\r\n\t{\r\n\t\ttheGridView.removeCharacterFromRoom(username);\r\n\t}", "public boolean deleteUser(String username) {\n return db.delete(TABLE_NAME, COLUMN_USERNAME + \"=\" + username, null) > 0;\n }", "public void remove(String userName) {\n LOG.info(\"Removed \" + userName + \" from the database at \" + System.nanoTime());\n }", "public void removeUser(String login) {\n try (PreparedStatement pst = this.conn.prepareStatement(\"DELETE FROM users WHERE login = ?\")) {\n pst.setString(1, login);\n pst.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void deleteUser(User userToDelete) throws Exception;", "public void deleteUser(SPUser user, String tableName) { \n try {\n \t\t\tmyCon.execute(\"DELETE FROM \"+tableName+\" WHERE Username= '\"+ user.getUsername()+\"';\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public static void remove() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString jdbcURL = \"jdbc:mysql://localhost:3306/sampldb\";\n\t\t String dbUsername=\"root\";\n\t\t String dbPassword=\"password\";\n\t\t \n\t\t System.out.println(\"Database Connected Successfully\");\n\t\t\t\t \n\t\t\t\t \n\t\t \n\t\t Scanner in4=new Scanner(System.in);\n\t\t \n\t\t System.out.println(\"Enter Username\");\n\t\t String username=in4.nextLine();\n\t\t \n\t\t \n\t\t \n\t\t\t/* System.out.println(\"Which operation you want to execute \\n 1.Insert into table.\\n 2.Update table \\n 3.Delete data from table \\n 4.Show the data\");\n\t\t */\n\t\t \n\t\t \n\t\t \t \n\t\t \n\t\t try {\n\t\t Connection connection = DriverManager.getConnection(jdbcURL,dbUsername,dbPassword);\n\t \n\t\t if(connection!=null) {\n\t\t \tSystem.out.println(\"\\nconnected to the database.....................\");\n\t\t \t\n\t\t }\n\t\t \n\t\t String sql=\"DELETE FROM users WHERE username=?\";\n\t\t \n\t\t \tPreparedStatement statement = connection.prepareStatement(sql);\n\t\t \tstatement.setString(1,username);\n\t\t \t\n\t\t \tint rows=statement.executeUpdate();\n\t\t \t\n\t\t \tif (rows >0) {\n\t\t \t\tSystem.out.println(\"A user has been removed successfully.....!!!!!!!!\");\n\t\t \t}\n\t\t \t connection.close();\n\t\t \t \n\t\t }\n\t\t catch(SQLException ex) {\n\t\t \tex.printStackTrace();\n\t\t }\n\t\t \n\n\t\t}", "public User delete(String user);", "public void dropUser(String userName) throws Exception;", "public void deleteUser(IndividualUser user) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Users WHERE userName=? AND id=? AND firstName=? AND lastName=?;\");\n s.setString(1, user.getId());\n s.setInt(2,user.getIdNum());\n s.setString(3, user.getFirstName());\n s.setString(4, user.getLastName());\n s.execute();\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public boolean removeUser(String username) {\n return userDAO.removeUser(username);\n }", "@SuppressWarnings(\"serial\")\n\tpublic void delUser(final String name) throws Exception{\n\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\tUsers users = Users.findOrCreate(ur);\n\t\tusers.deleteChildren(User.TAG,new HashMap<String,String>(){{\n\t\t\tput(\"name\",name);\n\t\t}});\n\t\tdelAllMember(name);\n\t}", "String removeAccount(String userName);", "public String deleteUser(String username) {\r\n\t\tUser user = getUser(username);\r\n\t\tCopyOnWriteArrayList<String> imageNames = getListOfImages(username);\r\n\t\t\r\n\t\tfor(String imageName : imageNames) {\r\n\t\t\tdeleteImage(username, imageName);\r\n\t\t}\r\n\t\t\r\n\t\tuserList.remove(user);\r\n\t\ttry {\r\n\t\t\texportUserList();\r\n\t\t\treturn \"User successfully deleted\";\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn \"User not found\";\r\n\t\t}\r\n\t}", "public void removeUser(User user) throws UserManagementException;", "public void deleteLogin(String username) {\r\n\t\t\tjdbcTemplate.update(\"DELETE from Login where usuario=?\", username);\r\n\t\t}", "public void removeUser(Customer user) {}", "public static int removeUserDataFromDb(String username)\n\t{\n\t\t//Get USER_ID from table BSM_USER\n\t\tString sql = String.format(\"SELECT USER_ID FROM BSM_USER WHERE USER_NAME='%s'\", username);\n\t\tResultSet rs = DBUtil.executeQuery(sql);\n\t\tint userID = 0;\n\t\ttry\n\t\t{\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\t//Remove associated data from BSM_USER_ROLE\n\t\t\t\tuserID = rs.getInt(\"USER_ID\");\n\t\t\t\tDBUtil.closeDBRes();\n\t\t\t\tremoveUserRoleDataFromDb(userID);\n\t\t\t}\n\t\t}catch(SQLException ex)\n\t\t{\n\t\t}\n\t\t\n\t\t//Remove user data from table BSM_USER\n\t\tsql = String.format(\"DELETE FROM BSM_USER WHERE USER_NAME='%s'\", username);\n\t\tint ret = DBUtil.executeSQL(sql);\n\t\treturn ret;\n\t}", "@Delete({\n \"delete from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(String username);", "void deleteUser(String userId);", "void deleteUserById(Integer id);", "@Override\n\tpublic void removeUserFromTourney(String username, int tourneyId) {\n\t\tString sql = \"delete from users_tournaments \"\n\t\t\t\t+ \"where user_id = (select user_id from users where username = ?) \"\n\t\t\t\t+ \"and tourney_id = ?\";\n\t\tjdbcTemplate.update(sql, username, tourneyId);\n\t\t\n\t}", "public void removeuserById(User user) throws SQLException{\n String SQL = \"DELETE FROM user WHERE id = ? \";\n PreparedStatement ps = connection.prepareStatement(SQL);\n ps.setLong(1, user.getId());\n int result = ps.executeUpdate();\n if(result > 0) System.out.println(\"remoção do usuário \\\"\"+\n user.getName() + \"\\\", concluída com sucesso!\");\n else System.out.println(\"ID não cadastrado, verifique novamente...\");\n ps.close();\n }", "public void deleteUser(Integer uid);", "public void deleteUser(User user) {\n update(\"DELETE FROM user WHERE id = ?\",\n new Object[] {user.getId()});\n }", "@RequestMapping(value=\"/user/{username:.+}\", method = RequestMethod.DELETE)\n\t@ResponseStatus(HttpStatus.NO_CONTENT)\n\tpublic void deleteUser(@PathVariable(\"username\") String username) {\n\t\tlogger.debug(\"Delete a user by the username {}\", username);\n\t\tauthService.deleteUser(username);\n\t}", "public void delete(User user){\n userRepository.delete(user);\n }", "private static ErrorType handleDelUser(String username) {\n\t\tUser user = VersionControlDb.findUser(username); \n\t\tif (user == null) {\n\t\t\treturn ErrorType.USER_NOT_FOUND;\n\t\t}\n\t\telse {\n\t\t\tVersionControlDb.delUser(user);\n\t\t\treturn ErrorType.SUCCESS;\n\t\t}\n\t}", "@Override\n\tpublic void removeUser(String username, Map<String, User> map) {\n\t\tuserdata.open();\n\t\tuserdata.deleteUser(map.get(username));\n\t\tuserdata.close();\n\t}", "public int Delete_User(String name) {\n\t\treturn 0;\r\n\t}", "public synchronized void removeUser(String username) {\n \n if(this.capacity > 0) {\n \n /* Rimuovo utente dalla HashMap */\n usersList.remove(username);\n \n /* Utente rimosso */\n capacity--;\n \n System.out.println(\"GOSSIP System: \"+username+\" removed from Proxy \"+\n id+\"@\"+address+\":\"+port+\" [Capacity: \"+max_capacity+\n \"][Available: \"+(max_capacity-capacity)+\"]\");\n }\n }", "private void removeUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tPreferenceDB.removePreferencesUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER)));\n\t\t\tif (UserDB.getnameOfUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER))) == null)\n\t\t\t\tout.print(\"ok\");\n\t\t\tUserDB.removeUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER)));\n\t\t\tout.print(\"ok\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}", "void deleteUserById(Long id);", "public void deleteUser(int id) {\r\n userRepo.deleteById(id);\r\n }", "public int deleteExistingUser(String uname){\n\t\tif(this.connHndlr == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = this.connHndlr.getConnection();\n\t\tint returnvalue = 0;\n\t\t\n\t\tuname = uname.toLowerCase();\t\t\n\t\ttry{\n\t\t\tString vfnQuery = \"select * from LoginDetails l where l.username = '\" + uname + \"'\";\n\t\t\tthis.stmt = conn.createStatement();\n\t\t\tthis.resultSet = this.stmt.executeQuery(vfnQuery);\n\t\t\tif(this.resultSet.next()){\n\t\t\t\tString delQuery = \"delete from LoginDetails where username = '\" + uname + \"'\" ;\n\t\t\t\tthis.preparedStatement = conn.prepareStatement(delQuery);\n\t\t\t\tthis.preparedStatement.executeUpdate();\n\t\t\t\treturnvalue = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturnvalue = 0;\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\treturn returnvalue;\n\t}", "@Override\n\tpublic void deleteUser(User user) {\n\t\topenSession().createQuery(\"DELETE FROM User where userId =\" + user.getUserId()).executeUpdate();\n\t\t\n\t}", "void userRemoved(String username) throws IOException {\n\t\tfor (String repName : getRepositoryNames()) {\n\t\t\tgetRepository(repName).removeUser(username);\n\t\t}\n\t}", "public static int delete(User user) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"DELETE FROM users \"\n + \"WHERE Email = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, user.getEmail());\n\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 }", "public void deleteUser(user user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_NAME, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }", "public void deleteUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USER, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }", "@Override\n\tpublic int deleteUser(String username) throws SQLException {\n\t\tnumberOfRowsImpacted = 0;\n\t\t\n\t\tc = DriverManager.getConnection(dbURL, user, password);\n\t\tSystem.out.println(\"Connection Successful! \" + dbURL + \" User: \" + user + \" PW: \" + password);\n\n\t\t//create a SQL statement\n\t\tpstmt = c.prepareStatement(\"delete from thatcoffeeshop.user where username = ?\");\n\t\tpstmt.setString(1, username);\n\t\t\n\t\t//execute the statement\n\t\tnumberOfRowsImpacted = pstmt.executeUpdate();\n\t\t\n\t\t//success msg\n\t\tSystem.out.println(\"Rows affected \" + numberOfRowsImpacted);\n\n\t\tpstmt.close();\n\t\tc.close();\n\t\t\n\t\treturn numberOfRowsImpacted;\n\t}", "private void deleteUser() throws SQLException {\n System.out.println(\"Are you sure you want to delete your user? Y/N\");\n if (input.next().equalsIgnoreCase(\"n\")) return;\n\n List<Integer> websiteIds = new ArrayList<>();\n try (PreparedStatement stmt = connection.prepareStatement(\"SELECT * FROM passwords \" +\n \"WHERE user_id like (?)\")) {\n stmt.setInt(1, user.getId());\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n websiteIds.add(rs.getInt(\"website_data_id\"));\n }\n }\n\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM passwords \" +\n \"WHERE user_id like (?)\")) {\n stmt.setInt(1, user.getId());\n stmt.executeUpdate();\n }\n\n for (int website : websiteIds) {\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM website_data \" +\n \"WHERE website_data_id like (?)\")) {\n stmt.setInt(1, website);\n stmt.executeUpdate();\n }\n }\n\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM users \" +\n \"WHERE id like (?)\")) {\n stmt.setInt(1, user.getId());\n stmt.executeUpdate();\n }\n\n System.out.println(\"User \" + user.getUsername() + \" deleted.\");\n System.exit(0);\n }", "public void removeuserById(Long id) throws SQLException{\n String SQL = \"DELETE FROM user WHERE id = ? \";\n PreparedStatement ps = connection.prepareStatement(SQL);\n ps.setLong(1, id);\n int result = ps.executeUpdate();\n if(result > 0) System.out.println(\"remoção do usuário concluída com sucesso!\");\n else System.out.println(\"ID não encontrado, verifique novamente...\");\n ps.close();\n }", "public void deleteAccount(String userName) {\n\n }", "public void deleteUser(long id){\n userRepository.deleteById(id);\n }", "void deleteUser(int id);", "@RolesAllowed(\"admin\")\n @DELETE\n public Response delete() {\n synchronized (Database.users) {\n User user = Database.users.remove(username);\n if (user == null) {\n return Response.status(404).\n type(\"text/plain\").\n entity(\"User '\" + username + \"' not found\\r\\n\").\n build();\n } else {\n Database.usersUpdated = new Date();\n synchronized (Database.contacts) {\n Database.contacts.remove(username);\n }\n }\n }\n return Response.ok().build();\n }", "@Override\n public void removeUser(int id) {\n Session session = this.sessionFactory.getCurrentSession();\n User u = (User) session.load(User.class, new Integer(id));\n if(null != u){\n session.delete(u);\n }\n logger.info(\"User deleted successfully, User details=\"+u);\n }", "public void deleteUser(long userId);", "public void deleteUser(Userlist user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USERLIST, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getID())});\n db.close();\n }", "void deleteUser(String deleteUserId);", "public void deleteUser(User user) {\n\t\tdelete(user);\r\n\t}", "private void removeUser(int index) {\n ensureUserIsMutable();\n user_.remove(index);\n }", "public boolean removeUser(String name,String pass) throws SQLException{\r\n\t\tString query = \"DELETE FROM lpro.users WHERE username=? AND password=?\";\r\n\t\tPreparedStatement stmt=null;\r\n\t\ttry {\r\n\t\t\tstmt = con.prepareStatement(query);\r\n\t\t\tstmt.setString(1, name);\r\n\t\t\tstmt.setString(2, pass);\r\n\t\t\tint r = stmt.executeUpdate();\r\n\t\t\tcon.commit();\r\n\t\t\tif(r == 1) return true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Error accessing database: \"+e.getMessage());\r\n\t\t\tcon.rollback();\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\tfinally{\r\n\t\t\tif(stmt!=null)\r\n\t\t\t\tstmt.close();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void deleteGuest(User user) throws SQLException {\n PreparedStatement pr = connection.prepareStatement(Queries.deleteGuest);\n pr.setString(1, user.getUserFullName());\n pr.executeUpdate();\n pr.close();\n }", "@Override\n\tpublic void removeUser(int id) {\n\t\t\n\t}", "public void removeUser(String userName, UserThread aUser) {\n\t\tboolean removed = userNames.remove(userName);\n\t\tif (removed) {\n\t\t\tuserThreads.remove(aUser);\n\t\t\tSystem.out.println(\"El usuario [\" + userName + \"] ha salido.\");\n\t\t}\n\t}", "public void deleteUserById(Long userId);", "@Override\n\tpublic User deleteUser(Account account) {\n\t\treturn usersHashtable.remove(account);\n\t\t\n\t}", "public void deleteUser(User user) {\r\n\t\tusersPersistence.deleteUser(user);\r\n\t}", "@Override\n\tpublic void deleteOne(User u) {\n\t\tdao.deleteOne(u);\n\t}", "void deleteUser(User user, String token) throws AuthenticationException;", "public void del(String nickname) {\r\n // loop through all users\r\n for (int i = this.UserList.size(); i > 0; i--) {\r\n // check if the user matches\r\n User user = (User) this.UserList.get(i - 1);\r\n if (user.nick().equalsIgnoreCase(nickname)) {\r\n this.UserList.remove(i - 1);\r\n }\r\n }\r\n }", "public boolean delete(String username) {\n if (userData.remove(username) != null)\n return true;\n else\n return false;\n }", "public static void removeUsername(final String username)\n\t{\n\t\tif (username2accesses.containsKey(username)) username2accesses.remove(username);\n\t}", "public void deleteUser(User user) {\n\t\t\r\n\t\tsessionFactory.getCurrentSession().delete(user);\t\r\n\t\t\r\n\t}", "public void removeUser(String entity)\n\t{\n\t\tUser user = getUser(entity);\n\t\tif (user != null) {\n\t\t\tusersList.remove(user);\n\t\t\tusers.removeChild(user.userElement);\n\t\t}\n\t}", "public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}", "public void remove(CredentialsModel credential) {\n Connection connection = null; \n PreparedStatement stmt = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.prepareStatement(\n \"DELETE FROM Credentials WHERE EmpUsername = ?\");\n stmt.setString(1, credential.getUserName());\n stmt.executeUpdate();\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in remove \" + credential);\n ex.printStackTrace();\n }\n }", "void delete(User user);", "void delete(User user);", "public String remove(User u) {\n userRepository.delete(u);\n return \"/user-list.xhml?faces-redirect=true\";\n }" ]
[ "0.8294349", "0.82402205", "0.8233211", "0.78790957", "0.7801646", "0.77491814", "0.77392507", "0.768974", "0.75987726", "0.7583761", "0.75379527", "0.75316817", "0.75153506", "0.7478483", "0.7426356", "0.740365", "0.7371141", "0.7364432", "0.7359814", "0.734697", "0.7339328", "0.73005635", "0.72838235", "0.72837883", "0.7270484", "0.72388077", "0.71758044", "0.7168878", "0.71668875", "0.7160309", "0.71562505", "0.715388", "0.7128623", "0.71195626", "0.7118608", "0.71134025", "0.71060026", "0.7105705", "0.7097255", "0.7094714", "0.70894986", "0.7075611", "0.70705086", "0.7058825", "0.70541376", "0.7035175", "0.7024046", "0.7018914", "0.7008741", "0.70084864", "0.7006635", "0.6973079", "0.69716996", "0.69056517", "0.68891805", "0.68848413", "0.6882247", "0.68720084", "0.68521124", "0.68489367", "0.6845019", "0.6832664", "0.6831188", "0.68280256", "0.6811014", "0.680988", "0.6808326", "0.6804163", "0.6793641", "0.67879134", "0.6787157", "0.6785064", "0.67804503", "0.67804", "0.6770126", "0.6749295", "0.6738323", "0.67359966", "0.6733135", "0.6725518", "0.6725204", "0.6706464", "0.6696379", "0.6689551", "0.6681669", "0.6663073", "0.6654419", "0.665271", "0.6650595", "0.66435415", "0.66425747", "0.6640245", "0.66351193", "0.6631577", "0.6629741", "0.662967", "0.6624714", "0.66187763", "0.66187763", "0.6612441" ]
0.8635507
0
Computes the number of degrees between given keys. Keys are flattened ( removed).
public static int getDistance(int startKey, int endKey) { // Rounding keys to the nearest (lower) white key startKey = PianoKeyboard.isWhite(startKey) ? startKey : startKey - 1; endKey = PianoKeyboard.isWhite(endKey) ? endKey : endKey - 1; // Computing distance of each from C0 // Moving notes in same octave int normStartKey = Note.getNoteInRange(startKey, Note.C0, Note.B0); int normEndKey = Note.getNoteInRange(endKey, Note.C0, Note.B0); int normDistA = 0; int normDistB = 0; int[] majorScale = Chord.majorScale(); for(int i = 0; i < majorScale.length; i++) { if(normStartKey == Note.C0 + majorScale[i]) { normDistA = i; } if(normEndKey == Note.C0 + majorScale[i]) { normDistB = i; } } // Computing absolute distances from C0 int distA = normDistA + 7 * ((startKey - normStartKey) / 12); int distB = normDistB + 7 * ((endKey - normEndKey) / 12); return distB - distA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int outDegree( VKeyT key );", "public int inDegree( VKeyT key );", "private void degrees() {\n\t\tnodesWithDegree = new TreeMap<Integer, IntOpenHashSet>();\n\n\t\t// fill the HashMap nodesWithDegree\n\t\tfor (Sommet entry : adjVertices) {\n\n\t\t\tif (entry == null)\n\t\t\t\tcontinue;\n\n\t\t\tint size = entry.listeAdjacence.size();\n\n\t\t\tif (nodesWithDegree.containsKey(size)) {\n\t\t\t\tnodesWithDegree.get(size).add(entry.numSommet);\n\t\t\t} else {\n\t\t\t\tIntOpenHashSet temp = new IntOpenHashSet();\n\t\t\t\ttemp.add(entry.numSommet);\n\t\t\t\tnodesWithDegree.put(size, temp);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"end of degree method\");\n\t}", "public int minkeys() {\n\t\tint min = 0;\n\t\tif (parentref == null) {\n\t\t\treturn 1;\n\t\t}\n\t\tmin = (int)Math.ceil((degree) / 2.0) - 1;\n\t\t//min = (int)Math.ceil(degree / 2.0);\n\t\treturn Math.max(min, 0);\n\t}", "private int getTotalMobilKeys(Map<String, Set<String>> mobileKeysMap) {\n\t\tint totalMobileKeys = 0;\n\t\tSet<String> mobileKeySet = mobileKeysMap.keySet();\n\t\tfor(String mobileKey: mobileKeySet) {\n\t\t\ttotalMobileKeys += mobileKeysMap.get(mobileKey).size();\n\t\t}\n\t\treturn totalMobileKeys;\n\t}", "@Override\n public int degree() {\n boolean first = true;\n int highestKey = 0;\n for (Map.Entry<Integer, Integer> e : this.values.entrySet()) {\n int expo = e.getKey();\n int coeff = e.getValue();\n if (first) {\n highestKey = expo;\n first = false;\n } else if (coeff != 0 && expo > highestKey)\n highestKey = expo;\n }\n return highestKey;\n }", "public Map<V,Integer> inDegree () {\n Map<V,Integer> result = new HashMap<V,Integer>();\n for (V v: dag.keySet()) result.put(v, 0); // All in-degrees are 0. Will be updated later\n for (V from: dag.keySet()) {\n for (V to: dag.get(from)) {\n result.put(to, result.get(to) + 1); // Increment in-degree\n }\n }\n return result;\n }", "private float getTotal(HashMap<Integer, Integer> distances){\n float result = 0.0f;\n Iterator it = distances.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry pair = (Map.Entry)it.next();\n result += (1/(Math.pow(2, (Integer)pair.getKey()))) * (Integer)pair.getValue();\n }\n return result;\n }", "int getNumKeys();", "int sizeOfKeyArray();", "public void decNumKeys() { numKeys--; }", "private void generateKeyMappings(HashMap<Integer, Integer> keys)\n {\n int count = 0;\n for (int i = 0; i < 256; i++)\n {\n byte value = (byte) i;\n int transitions = 0;\n int last = value & 1;\n for (int k = 1; k < 8; k++)\n {\n if (((value >> k) & 1) != last)\n {\n last = ((value >> k) & 1);\n transitions++;\n if (transitions > 2)\n {\n break;\n }\n }\n }\n if (transitions <= 2)\n {\n keys.put(i, count++);\n }\n }\n }", "public static int getRotationsCount(int d1, int d2) {\n return Math.min(Math.abs(d1 - d2), 2);\n }", "private int sumOfGDegrees() {\n\n\t\tint total = 0;\n\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ttotal += this.vertices.get(i).getVertexDegree();\n\t\t}\n\n\t\treturn total;\n\t}", "private int calcDeg(Point2D[] p)\n {\n Set<Point> set = new HashSet<>();\n for (Point2D itp : p)\n {\n Point np = new Point((int) Math.round(itp.getX() * 1000), (int) Math.round(itp.getY() * 1000));\n set.add(np);\n }\n return set.size();\n }", "int getKeySize();", "private Double calcTotalPoints(TreeMap<Double, String> userlist) \r\n \t{\r\n \t\tDouble ret = 0.00;\r\n \t\tfor(Double key : userlist.keySet())\r\n \t\t{\r\n \t\t\tret += key; \r\n \t\t}\r\n \t\treturn ret;\r\n \t}", "public static int numXTriangle(int np, double[] angles){\n\t\t\n\t\tint num = 0;\n\t\tfor(int i=0;i<np;i++){\n\t\t\tdouble theUpper = angles[i]+180;\n\t\t\tif(theUpper>360) {theUpper = 360;}\n\t\t\t\n\t\t\tint j = binarySearchLessMax(angles, i+1, angles.length-1, theUpper);\n\t\t\t\n\t\t\t//\t\t\tSystem.out.println(angles[j]);\t\n\t\t\tif(j-i>1){\n\t\t\t\tnum += (j-i-1);\n\t\t\t}\n\t\t}\n\t\treturn num;\n\t}", "public int numEquivDominoPairs(int[][] dominoes) {\n\n int[] hash = new int[100];\n int res = 0;\n for (int[] d : dominoes) {\n int t = d[0] >= d[1] ? d[0] * 10 + d[1] : d[1] * 10 + d[0];\n res += hash[t];\n hash[t]++;\n }\n return res;\n }", "Integer countForKey(String key);", "int getClusteringKeyCount();", "@Override\n public int degree(V vertex)\n {\n if (contains(vertex)){\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V)graphElement.getKey();\n while (graphIterator.hasNext() && vert != vertex){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n ArrayList<V> edges = graph.get(vert);\n return edges.size();\n }\n else{\n throw new RuntimeException();\n }\n\n }", "int getDegree(V v);", "long getUsesCount(K key);", "private void calculateHashCode(final Object[] keys) {\n int total = 0;\n for (final Object key : keys) {\n if (key != null) {\n total ^= key.hashCode();\n }\n }\n hashCode = total;\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "public int getEdgeCount(boolean biDirectional) {\n int count=0;\n for(T v: map.keySet()) {\n count += map.get(v).size();\n }\n\n if(biDirectional) count = count/2;\n\n return count;\n }", "public int getDegree(int v);", "public int hashCode()\n {\n return inDegrees();\n }", "double getDegreesCoolingPerMBPerK();", "private TreeMap<String, Integer> debugMap (Set <String> keys, TreeMap <String, ArrayList<String>> lists) {\r\n \t//Create debug TreeMap\r\n \tTreeMap<String, Integer> toReturn = new TreeMap<String, Integer>();\r\n \t//Iterate through Set of keys created in makeGuess, passed as parameter\r\n \tIterator<String> it = keys.iterator();\r\n \twhile (it.hasNext()) {\r\n \t\tString temp = it.next();\r\n \t\t//Add pattern as key, size as value\r\n \t\ttoReturn.put(temp, lists.get(temp).size());\r\n \t}\r\n \treturn toReturn;\r\n }", "int getDegree();", "int getDegree();", "public int getLength(){\n return keys.length;\n }", "int calDeg(int u){\n int ans=0;\n for (int i=0;i<n;i++){\n ans+=a[u][i];\n }\n return ans;\n }", "int getHeight(K key);", "public Lo<K> keys() { return this.entries.map(kvp -> kvp.left); }", "public int degree(Position vp) throws InvalidPositionException;", "public int degreeOf(V vertex);", "public Map<String,Integer> getNumKeysMapping(){\n\t\treturn num_keys;\n\t}", "public int getRotations();", "public int getDegree(V vertex);", "public int degree(int i)\n {\n return adjList[i].size();\n }", "public int getMilkWeight(T key);", "public int getDublicatesCount() {\n int res = 0;\n for (Integer integer : gramma.keySet()) {\n if (integer > 1) {\n res += gramma.get(integer);\n }\n }\n return res;\n }", "abstract int degree(int i);", "private int sumOfXDegrees() {\n\t\tint start = this.vertices.size() - this.numXVertices;\n\t\tint end = this.vertices.size();\n\t\tint total = 0;\n\n\t\tfor (int i = start; i < end; i++) {\n\t\t\ttotal += this.vertices.get(i).getVertexDegree();\n\t\t}\n\n\t\treturn total;\n\t}", "@Override\n protected void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n StringBuffer sb1 = new StringBuffer();\n Map<String, Integer> map1 = new HashMap<String, Integer>();\n for(Text value:values){\n sb1 = new StringBuffer();\n String[] temp = sb1.append(value.toString()).reverse().toString().split(\":\"); // 倒转 防止前面有冒号\n String path = new StringBuffer(temp[1].split(\"/\")[0]).reverse().toString();\n int count = Integer.valueOf(temp[0]);\n System.out.println(\"readucepath!!!\"+path);\n System.out.println(count);\n if (map1.containsKey(path)){\n map1.put(path, map1.get(path) + count);\n }else{\n map1.put(path, count);\n }\n }\n sb1.delete(0, sb1.length() - 1);\n for(Map.Entry<String,Integer> entry :map1.entrySet()){\n sb1.append(entry.getKey()).append(\":\").append(entry.getValue());\n }\n outvalue.set(new Text(sb1.toString()));\n context.write(key,outvalue);\n }", "public static void countingSort(Person[] persons) {\n Map<Integer, Integer> keyCounts = Arrays.stream(persons)\n .collect(Collectors.groupingBy(person -> person.key, Collectors.reducing(0, e -> 1, Integer::sum)));\n\n int baseOffset = 0;\n Map<Integer, Integer> keyOffsets = new HashMap<>();\n for (int key : keyCounts.keySet()) {\n keyOffsets.put(key, baseOffset);\n baseOffset += keyCounts.get(key);\n }\n\n Stream.iterate(persons[0], (Person person) -> {\n int offset = keyOffsets.get(person.key);\n Person tmpPerson = persons[offset];\n persons[offset] = person;\n keyOffsets.put(person.key, keyOffsets.get(person.key) + 1);\n return tmpPerson;\n }).limit(persons.length).count();\n\n// Person person = persons[0];\n// for (int i = 0; i < persons.length - 1; i++) {\n// int offset = keyOffsets.get(person.key);\n// Person tmpPerson = persons[offset];\n// persons[offset] = person;\n// keyOffsets.put(person.key, keyOffsets.get(person.key) + 1);\n// person = tmpPerson;\n// }\n }", "private static int compareKeys(\n List<Object> key_group1,\n List<Object> key_group2)\n {\n final int len1 = key_group1.size();\n final int len2 = key_group2.size();\n assert (len1 == len2);\n\n for (int i = 0; i < len1; ++i) {\n int compare =\n FarragoSyslibUtil.compareKeysUsingGroupBySemantics(\n key_group1.get(i),\n key_group2.get(i));\n if (compare != 0) {\n return compare;\n }\n }\n return 0;\n }", "public int calculateUnits(Object oKey, Object oValue);", "@Override\n\tpublic int countPapersByKeys(int uid, String key) {\n\t\treturn paperRepository.countPapersByKeys(uid,key);\n\t}", "private static double freqOfKey(int index) {\n return 440 * Math.pow(2, (double) (index - 12) / 24);\n }", "@Override\n\t\tpublic int getDegree(Direction direction) {\n\t\t\treturn 0;\n\t\t}", "private static int getImageDegree(String selectedImagePath) {\r\n\r\n ExifInterface ei = null;\r\n try {\r\n ei = new ExifInterface(selectedImagePath);\r\n } catch (IOException e) {\r\n AppLogger.logMessage(\"Error image could not be rotated \" + e.getLocalizedMessage());\r\n }\r\n int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\r\n\r\n switch (orientation) {\r\n case ExifInterface.ORIENTATION_ROTATE_90:\r\n return 90;\r\n case ExifInterface.ORIENTATION_ROTATE_180:\r\n return 180;\r\n case ExifInterface.ORIENTATION_ROTATE_270:\r\n return 270;\r\n default:\r\n return 0;\r\n }\r\n }", "public static double reduce360Degrees(double degrees){\n return degrees % 360;\n }", "public void sumAte()\r\n {\r\n meanArk = 0;\r\n varArk = 0;\r\n double sumA = 0;\r\n double sumA2 = 0;\r\n float nArk = 0;\r\n for (SignatureSample s:keys) {\r\n nArk++;\r\n sumA += s.arklen;\r\n sumA2 += s.arklen * s.arklen;\r\n }\r\n meanArk = sumA / nArk;\r\n varArk = Math.sqrt((sumA2/nArk) - (meanArk*meanArk));\r\n }", "public int count( K key ) {\n Integer i = map.get( key );\n return i == null ? 0 : i;\n }", "final int lengthInBits(final K key) {\n\tif (key == null) {\n\t return 0;\n\t}\n\n\treturn keyAnalyzer.lengthInBits(key);\n }", "@Override\n\tpublic int size() {\n\t\tint tamano = 0;\n\t\tint i = 0;\n\t\tIterator it = tabla.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tit.next();\n\t\t\ttamano += tabla.get(i).keySet().size();\n\t\t\ti++;\n\t\t}\n\t\treturn tamano;\n\t}", "boolean k2h_free_keypack(PointerByReference pkeys, int keycnt);", "public static int numberOfPairs(int[] a, long k) {\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\t\n\t\tfor(int x : a) {\n\t\t\tlist.add(x);\n\t\t}\n\n\t\tArrayList<String> distinct = new ArrayList<>();\n\t\t\n\t\tfor(Integer curr : list) {\n\t\t\t\n\t\t\tint indexCurr = list.indexOf(curr);\n\t\t\t\n\t\t\tint anotherOne = (int) (k - curr);\n\t\t\t\n\t\t\tlist.set(indexCurr, curr*(-1));\n\t\t\t\n\t\t\tif(list.contains(anotherOne)) {\n\t\t\t\t\n\t\t\t\tint indexAnotherOne = list.indexOf(anotherOne);\n\t\t\t\t\n\t\t\t\tif(indexAnotherOne!=indexCurr) {\n\t\t\t\t\tString Way1 = curr+\"\"+anotherOne;\n\t\t\t\t\tString Way2 = anotherOne+\"\"+curr;\n\t\t\t\t\tif(!distinct.contains(Way1) && !distinct.contains(Way2)) {\n\t\t\t\t\t\tdistinct.add(Way1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlist.set(indexCurr, curr);\n\t\t\n\t\t}\n\t\t\n\t\treturn distinct.size();\n\t\t\n }", "public int rank(K key);", "Integer[] getKeys();", "public long moreKeySize(long key) {\n return root != null ? (root.all - lessKeySize(key + 1)) : 0;\n }", "public int sizeOfTypekeyArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(TYPEKEY$16);\r\n }\r\n }", "EdgeIteratorState setKeyValues(List<KVStorage.KeyValue> map);", "public int fourSumCount(int[] A, int[] B, int[] C, int[] D) {\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i=0; i<C.length; i++) {\n for(int j=0; j<D.length; j++) {\n int sum = C[i] + D[j];\n map.put(sum, map.getOrDefault(sum, 0) + 1);\n }\n }\n\n int res=0;\n for(int i=0; i<A.length; i++) {\n for(int j=0; j<B.length; j++) {\n res += map.getOrDefault(-1 * (A[i]+B[j]), 0);\n }\n }\n\n return res;\n}", "void countPaths (int inicio) {\r\n\t\tint n = lisAdy.keySet().size();\r\n\t\tint paths[] = new int[n];\r\n\t\tvisitados = new boolean[n];\r\n\t\tcola = new ArrayDeque<> ();\r\n\t\t\r\n\t\ttoposort(inicio);\r\n\t\tpaths[inicio] = 1;\r\n\t\tfor (int i : cola) {\r\n\t\t\tfor (int v : lisAdy.get(i)) \r\n\t\t\t\tpaths[v] += paths[i];\r\n\t\t}\r\n\t}", "private static int computeUnitsTrapped(int[] elevationMap) {\n int units = 0;\n for (int x = 0; x < elevationMap.length; x++) {\n int current = elevationMap[x];\n int tallestLeft = -1;\n int left = x - 1;\n while (left >= 0) {\n tallestLeft = Math.max(elevationMap[left], tallestLeft);\n left--;\n }\n\n int tallestRight = -1;\n int right = x + 1;\n while (right < elevationMap.length) {\n tallestRight = Math.max(elevationMap[right], tallestRight);\n right++;\n }\n\n if (tallestLeft > current && tallestRight > current) {\n units += Math.min(tallestLeft, tallestRight) - current;\n }\n }\n\n return units;\n }", "public static int countKey (Serializable key, List<LocalStore> lStores) {\n\t\tint count = 0;\n\t\tfor ( LocalStore l : lStores )\n\t\t\tcount += (l.get(key) != null && l.get(key).get(0).getValue() != null ? 1 : 0);\n\t\treturn count;\n\t}", "public Integer delete(String[] keys)\n {\n \tInteger retVal = 0;\n \tLog.e(\"recovery\",\"I need to delete::\"+keys.length+\" rows\");\n \tString bull[] = new String[1];\n \tfor(int i=0;i<keys.length;i++)\n \t{\n \t\tbull[0] = keys[i];\n \t\tretVal+=sqliteDB.delete(tableName, \"key=?\",bull);\t\n \t}\n \t\n \tLog.e(\"recovery\",\"I have deleted::\"+retVal+\" rows\");\n \treturn retVal;\n \t//String _del_keys = TextUtils.join(\", \",keys);\n \t//sqliteDB.execSQL(String.format(\"DELETE FROM \"+tableName+\" WHERE key IN (%s);\",_del_keys));\n }", "public static int countPairs(List<Integer> arr, long k) {\n arr = arr.stream().sorted().collect(Collectors.toList());\n Map<String, Long> map = new HashMap<>();\n for (Integer i : arr) {\n if (i <= k && i <= (k - i) && arr.contains((int) k - i)) {\n map.put(i + \"_\" + (k - i), (long) (i + (i + 1)));\n }\n }\n return map.size();\n }", "protected List<?> keysToIds (List<Key<T>> keys){\n \tArrayList ids = new ArrayList(keys.size()*2);\n \tfor(Key<T> key : keys)\n \t\tids.add(key.getId());\n \treturn ids;\n }", "public int getNumberOfPaths(){ \r\n HashMap<FlowGraphNode, Integer> number = new HashMap<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n HashMap<FlowGraphNode, Integer> label = new HashMap<>();\r\n \r\n label.put(start,1);\r\n queue.add(start);\r\n do{\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n int count = number.getOrDefault(child, child.inDeg()) -1;\r\n if(count == 0){\r\n queue.add(child);\r\n number.remove(child);\r\n //label\r\n int sum = 0;\r\n for(FlowGraphNode anc : child.from){\r\n sum += label.get(anc);\r\n }\r\n label.put(child,sum);\r\n }else{\r\n number.put(child, count);\r\n }\r\n }\r\n }while(!queue.isEmpty());\r\n \r\n if(!number.isEmpty()){\r\n //there has to be a loop in the graph\r\n return -1;\r\n }\r\n \r\n return label.get(end);\r\n }", "public Map<String, String[]> readDegreeDictionary () throws BiffException, IOException{\n\t\tMap<String, String[]> outSideMap;\n\t\tString regexs = getConf().get(Constant.DEGREE_DICTIONARY_REGEX, Constant.DEFAULT_DEGEDIC_VALUE);\n\t\tFile excelFile = new File(regexs);\n\t\toutSideMap = readExcel(excelFile);\n\t\treturn outSideMap;\n\t}", "private int getKeyLength() {\n MongoCursor<Document> cursor = this.keystoreCollection.find(eq(\"conf\", \"homomorphic-keylength\")).iterator();\n\n int keyLength = 2048; // Default value is 2048 bits\n while (cursor.hasNext()) {\n keyLength = cursor.next().getDouble(\"keylength\").intValue();\n }\n return keyLength;\n }", "public abstract int getNodeDegree(N value);", "public int indegree()\n\t{\n\t\treturn this.interferences.size();\n\t}", "static void k_paths(Node root, int k, HashMap<Integer, Integer> p, int sum) {\n\t\t// If root value and previous sum equal\n\t\t// to k then increase the count\n\t\tif (root != null) {\n\t\t\tif (root.data + sum == k) {\n\t\t\t\tres++;\n\t\t\t}\n\t\t\t// Add those values also which differs\n\t\t\t// by the current sum and root data by k\n\t\t\tres += p.get(sum + root.data - k) == null ? 0 : p.get(sum + root.data - k);\n\n\t\t\t// Insert the sum + root value in the map\n\t\t\tif (!p.containsKey(sum + root.data)) {\n\t\t\t\tp.put(sum + root.data, 0);\n\t\t\t}\n\t\t\tp.put(sum + root.data, p.get(sum + root.data) + 1);\n\n\t\t\t// Move to left and right trees\n\t\t\tk_paths(root.left, k, p, sum + root.data);\n\t\t\tk_paths(root.right, k, p, sum + root.data);\n\n\t\t\t// Remove the sum + root.data value\n\t\t\t// from the map if they are n not\n\t\t\t// required further or they do no\n\t\t\t// sum up to k in any way\n\t\t\tp.put(sum + root.data, p.get(sum + root.data) - 1);\n\t\t}\n\t}", "public double getWidthInDeg();", "public int getKeyCount() {\n return associationCountMap.size();\n }", "private static int degreesToTicks(double degrees){\r\n double temp = degrees * (1086 / 90);\r\n int ticks = (int)temp;\r\n return ticks;\r\n }", "int getPartitionKeyCount();", "@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }", "public static int[] countingSort(int[] items) {\n\n // items - input array of integers\n // size - number of items\n // k - number of keys, assuming keys start at 0\n // sums - prefix sums\n // sorted - sorted array of integers\n\n int size = items.length;\n\n if (size < 1) {\n return EMPTY_ARRAY;\n }\n\n // Create the mapping from [0, nmax] to [0, k-1].\n int k = max(items)+1;\n\n // Stage 1: compute k counts, one for each input key.\n int[] sums = new int[k];\n for (int key : items) {\n sums[key] += 1;\n }\n\n // Stage 2: compute k prefix sums from counts. Each prefix sum is the\n // number of predecessor keys <= key, which is also the position in the\n // required ordering when filled in from the right side.\n for (int i = 1; i < k; i++) {\n sums[i] += sums[i-1];\n }\n\n // Stage 3: compute the new key ordering from the prefix sums.\n // The loop traverses the keys from right to left. We write each item\n // into sorted at the index given by its prefix sum, then decrement the\n // sum ready for the next item of the same value.\n int[] sorted = new int[size];\n for (int i = size-1; i > -1; i--) { // all downto\n int item_key = items[i]; // next key\n\n int j = sums[item_key]-1; // decrement 1-based prefix sum\n sums[item_key] = j; // update prefix sum\n\n sorted[j] = item_key; // write item at prefix sum index\n }\n\n return sorted;\n }", "int CalcKey(int g, int x, int n)\r\n {\r\n int rtn = 1;\r\n for(int i = 0; i < x; i++)\r\n rtn = (rtn * g) % n;\r\n return rtn;\r\n }", "public int rank(K key) {\n int r = 0;\n if (root != null) {\n Node curr = root;\n while (curr != null) {\n int cmp = key.compareTo(curr.key);\n if (cmp > 0) {\n r += size(curr.left) + 1;\n curr = curr.right;\n } else if (cmp < 0) {\n curr = curr.left;\n } else {\n r += size(curr.left);\n break;\n }\n }\n }\n return r;\n }", "static double geometricSum(int k) {\n\t\tif (k==0) \n\t\t\treturn 1; // Endpoint\n\t\telse \n\t\t\treturn 1/Math.pow(2,k) + geometricSum(k-1); \n\t}", "void assertTotalCntEquals(T key, int expected);", "public HashMap getClusterDiameter() {\n double maxEuclideanDistance = 0;\n double maxCorrelationDistance = 0;\n\n Set probeIDSet = points.keySet();\n Iterator probeIt = probeIDSet.iterator();\n \n int comparisonIndex = 0;\n \n while (probeIt.hasNext()) {\n int probeID = (Integer) probeIt.next();\n double[] pointA = (double[]) points.get(probeID);\n\n Set probeIDSet2 = points.keySet();\n Iterator probeIt2 = probeIDSet2.iterator();\n while (probeIt2.hasNext()) {\n int probeID2 = (Integer) probeIt2.next();\n double[] pointB = (double[]) points.get(probeID2);\n \n HashMap distances = KMeans.getDistances(pointA, pointB);\n double eucDist = (Double) distances.get(\"euclidean\");\n double correlDist = (Double) distances.get(\"correlation\");\n \n if (comparisonIndex == 0) { // First distance\n maxEuclideanDistance = eucDist;\n maxCorrelationDistance = correlDist;\n } else if (eucDist > maxEuclideanDistance) {\n maxEuclideanDistance = eucDist;\n } else if ( Math.abs(correlDist) < maxCorrelationDistance) {\n maxCorrelationDistance = correlDist;\n }\n comparisonIndex++;\n }\n }\n \n HashMap<String, Double> distances = new HashMap<String, Double>();\n distances.put(\"euclidean\", maxEuclideanDistance);\n distances.put(\"correlation\", maxCorrelationDistance);\n return distances;\n }", "private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }", "public static void iSort(int[]keys, double[] values){\n for(int j = 0;j<keys.length;j++){\n int k = keys[j];\n double v = values[j];\n int i = j - 1;\n while((i>=0)&&(values[i]>v)){\n keys[i+1] = keys[i];\n values[i+1] = values[i];\n i--;\n }\n keys[i+1] = k;\n values[i+1] = v;\n }\n }", "public int size(K lo, K hi);", "private int[] genKeys() {\n HashSet<Integer> set = new HashSet<Integer>();\n HashSet<int[]> next = new HashSet<int[]>();\n rowKeys = new HashMap<Integer, Integer>();\n int[] rowKeys2combo = new int[keySize];\n\n // 1st set starts with 0004, 0040, 0400, 4000\n int counter = 0;\n int key;\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n\n final int splitIdx = counter;\n\n // 2nd set starts with 0003, 0030, 0300, 3000\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize - 1;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n return genKeyLink(splitIdx, rowKeys2combo);\n }", "public static Vector<Integer> getNOCList(Vector keys, Vector values)\r\n\t{\r\n\t\t\r\n\t\treturn NumberOfChildren.calculatesFrequency(keys,values);\r\n\t}", "public int getCount(Node root, int key){\n\t\tif(root==nil){\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif(root.id == key){\n\t\t\treturn root.count;\n\t\t}\n\t\t\n\t\tif(key < root.id){\n\t\t\treturn getCount(root.left,key);\n\t\t}else{\n\t\t\treturn getCount(root.right,key);\n\t\t}\n\t}", "public int size() {\n return keys.length;\n }", "public int getTriangleCount();", "@Override\r\n\tpublic int size() {\n\t\treturn keys.size();\r\n\t}", "public PrimitiveVS<Integer> size() {\n return keys.size();\n }" ]
[ "0.612213", "0.588748", "0.5709234", "0.5682128", "0.5609793", "0.549206", "0.5436954", "0.536065", "0.5359339", "0.527586", "0.5096202", "0.5053862", "0.5046423", "0.50348717", "0.49804178", "0.4944957", "0.49370712", "0.49126554", "0.49115187", "0.48756725", "0.48646826", "0.48375815", "0.482154", "0.48205665", "0.48200297", "0.4778804", "0.4771488", "0.47671402", "0.4765368", "0.47628516", "0.4755446", "0.47549438", "0.47549438", "0.47244352", "0.4723855", "0.4721243", "0.46777296", "0.4648992", "0.46469772", "0.46421814", "0.46414754", "0.46293065", "0.46288106", "0.4623206", "0.46186766", "0.46130916", "0.46110868", "0.45967188", "0.45947963", "0.45913658", "0.45749483", "0.45712614", "0.45679906", "0.45637706", "0.4562037", "0.45494953", "0.45412973", "0.45330042", "0.45285457", "0.45138985", "0.451356", "0.4500049", "0.4492956", "0.44907784", "0.44728407", "0.44695094", "0.446841", "0.44506606", "0.4442663", "0.44333854", "0.44330296", "0.44267172", "0.44214487", "0.4408924", "0.4406023", "0.43988752", "0.43962872", "0.43938813", "0.4393202", "0.4387549", "0.4384999", "0.43821332", "0.43784454", "0.43652752", "0.4363338", "0.43528205", "0.4352002", "0.43511137", "0.43507534", "0.43445075", "0.43361783", "0.43343773", "0.43331861", "0.43307635", "0.43262517", "0.43241444", "0.4316994", "0.4314062", "0.43125194", "0.43114582", "0.42990375" ]
0.0
-1
Created with IntelliJ IDEA.
public interface IGeneralMapper<T> { /** * 根据所传入的Map查询用户信息 * 如果传入的 Map 为空,会返回所有的用户信息(必须避免); * 如果没有查到符合条件的结果,返回的结果为空。 * * @param map key为所查询的字段名,value为对应的值(必须可以进行转换) * @param orderedKey 排序的键 * @param isDesc 是否反向 * @return 符合条件的所有用户的信息 */ List<T> select( @Param("searchMap") Map<String, Object> map, @Param("orderedKey") String orderedKey, @Param("isDesc") Boolean isDesc); /** * 查找符合条件的医生的数量 * @param map 查询条件 * @return 符合条件的医生的数量 */ int selectCount(@Param("searchMap") Map<String, Object> map); /** * 添加新的用户的方法 * * @param userInfos 需要添加的用户的列表 * @return 返回插入成功的数量 */ int insert(@Param("infos") List<T> userInfos); /** * 根据传入的before查找符合的用户,再使用after中的数据进行更新 * * @param before 查找条件(如果为空,将会修改所有的用户) * @param after 新的数据 * @return 更新成功的数量 */ int update(@Param("before") Map<String, Object> before, @Param("after") Map<String, Object> after); /** * 删除符合条件的数据 * * @param map 删除的条件 * @return 删除成功的数量 */ int delete(@Param("deleteMap") Map<String, Object> map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "private stendhal() {\n\t}", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "public void mo21785J() {\n }", "private Solution() {\n /**.\n * { constructor }\n */\n }", "public void mo38117a() {\n }", "public final void mo51373a() {\n }", "public void mo21792Q() {\n }", "public static void thisDemo() {\n\t}", "public void mo21795T() {\n }", "void pramitiTechTutorials() {\n\t\n}", "public void mo21779D() {\n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void mo21782G() {\n }", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "public void mo4359a() {\n }", "public final void mo91715d() {\n }", "public static void main(String[] args) {\n throw new NotImplementedException();\n }", "public void mo12930a() {\n }", "public void mo21781F() {\n }", "default void refactoring() {\n templateBuilder.set(new StringBuilder());\n }", "public static void created() {\n\t\t// TODO\n\t}", "public void mo6081a() {\n }", "public void create() {\n\t\t\n\t}", "public void mo21791P() {\n }", "private JacobUtils() {}", "private SourcecodePackage() {}", "private final void i() {\n }", "protected OpinionFinding() {/* intentionally empty block */}", "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "Petunia() {\r\n\t\t}", "public void mo1531a() {\n }", "@Test\n \tpublic void testCreateMindProject() throws Exception {\n \t\tString name = \"Test\" ; //call a generator which compute a new name\n \t\tGTMenu.clickItem(\"File\", \"New\", FRACTAL_MIND_PROJECT);\n \t\tGTShell shell = new GTShell(Messages.MindProjectWizard_window_title);\n \t\t//shell.findTree().selectNode(\"Mind\",FRACTAL_MIND_PROJECT);\n \t\t//shell.findButton(\"Next >\").click();\n \t\tshell.findTextWithLabel(\"Project name:\").typeText(name);\n \t\tshell.close();\n \t\t\n \t\tTestMindProject.assertMindProject(name);\t\t\n \t}", "public void mo97908d() {\n }", "protected ProjectCreationDescriptor() {\n\t}", "public void mo115188a() {\n }", "public void mo21878t() {\n }", "public Idea create() {\n \t\t\tIdea idea = new Idea();\n \n \t\t\treturn idea;\n \t\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo9848a() {\n }", "public void mo5248a() {\n }", "public static void main() {\n \n }", "public void mo21877s() {\n }", "private JadTool() { }", "private static void oneUserExample()\t{\n\t}", "public void mo21793R() {\n }", "@Override\r\n\tprotected String getProjectHelpId() {\n\t\treturn null;\r\n\t}", "private TMCourse() {\n\t}", "public void mo21825b() {\n }", "public void mo21780E() {\n }", "public void mo21789N() {\n }", "public void mo21784I() {\n }", "public void mo56167c() {\n }", "public void mo5382o() {\n }", "@Override\n public boolean addIdea(ProjectIdea newIdea) {\n int check = 0;\n try{\n check = super.create(newIdea);\n } catch(SQLException e){\n System.out.println(e.getMessage());\n }\n return check == 1;\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void create () {\n\n\t}", "private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void mo2740a() {\n }", "public void mo44053a() {\n }", "public void m23075a() {\n }", "public void mo21787L() {\n }", "protected void mo6255a() {\n }", "LectureProject createLectureProject();", "public void mo6944a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n protected void startUp() {\n }", "public void mo21794S() {\n }", "@Override\n public String getDescription() {\n return description;\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public void mo3376r() {\n }", "public static void listing5_14() {\n }", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "public void mo23813b() {\n }", "public String getDescription()\n/* */ {\n/* 74 */ return this.description;\n/* */ }", "private test5() {\r\n\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}", "public void mo21783H() {\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo2471e() {\n }", "public void mo21786K() {\n }", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "public void mo3749d() {\n }", "public void mo115190b() {\n }", "public FinalProject() {\n initComponents();\n iconImage();\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }" ]
[ "0.62123495", "0.59639025", "0.59502053", "0.5890836", "0.587595", "0.5866678", "0.5801747", "0.57759166", "0.5718714", "0.5701379", "0.56720704", "0.5658173", "0.56524897", "0.5650609", "0.5633821", "0.5626124", "0.55860126", "0.5571761", "0.55655414", "0.5564941", "0.5533108", "0.55274826", "0.55271155", "0.5519563", "0.5514853", "0.5507918", "0.5506106", "0.55033326", "0.54999954", "0.5493552", "0.54901224", "0.54867756", "0.5486353", "0.5482571", "0.54824746", "0.5481609", "0.54812056", "0.5479513", "0.54769707", "0.54764986", "0.5469998", "0.54698545", "0.54650855", "0.54650855", "0.54650855", "0.54650855", "0.54650855", "0.54650855", "0.54650855", "0.54645866", "0.54632586", "0.546234", "0.5461173", "0.5458228", "0.5457356", "0.5457338", "0.5457222", "0.5444793", "0.54428995", "0.5442077", "0.5431798", "0.5423123", "0.5421044", "0.54202133", "0.5420207", "0.54188967", "0.5416274", "0.54144216", "0.54033333", "0.54024583", "0.53977495", "0.53903157", "0.5389541", "0.5387337", "0.5380885", "0.53763247", "0.53725004", "0.5371923", "0.53680515", "0.53670835", "0.5366262", "0.53589", "0.5348982", "0.5344698", "0.5337305", "0.5334653", "0.5333036", "0.532212", "0.532212", "0.53198284", "0.5313008", "0.53068095", "0.53032124", "0.5300723", "0.5295551", "0.52922237", "0.5286871", "0.5285366", "0.52816254", "0.5260376", "0.5260376" ]
0.0
-1
Set the device to the given name.
abstract protected void setDeviceName(String deviceName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDeviceName(String newDeviceName) {\n deviceName = newDeviceName;\n }", "public void setDeviceName(String argDeviceName) {\n\t deviceName = argDeviceName;\n }", "public void setDeviceName(String deviceName) {\n this.deviceName = deviceName;\n }", "public DeviceDescription setName(String name) {\n this.name = name;\n return this;\n }", "public void setDeviceName(String deviceName) {\n\t\tthis.deviceName = deviceName;\n\t}", "public void setDeviceName(String deviceName) {\n this.deviceName = deviceName == null ? null : deviceName.trim();\n }", "public void setDevice(final String device)\n {\n this.device = device;\n }", "public void setDeviceName(String dn) {\r\n \tthis.deviceName = dn;\r\n }", "public void setDevice(String device) {\r\n this.device = device;\r\n }", "public void setName(String value) {\n\t\tname = value;\n\t}", "public void setName(String value) {\n this.name = value;\n }", "public void setName(String name) {\n\t\tName = name;\n\t}", "private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }", "public synchronized void setName(Identifier name) {\n Identifier old = this.name;\n this.name = name;\n firePropertyChange (PROP_NAME, old, name);\n }", "public com.google.protobuf.Empty setDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.Device request);", "public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}", "public Builder setDeviceId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n deviceId_ = value;\n onChanged();\n return this;\n }", "public void setName(String Name){\r\n name = Name;\r\n }", "public void setName(String name) {\n synchronized(this) {\n this.name = name;\n nameExplicitlySet = true;\n }\n }", "public void setName(final String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setDeviceNameSetPoint(String deviceName) {\n\t\tthis.deviceNameSetPoint = deviceName;\n\t}", "public final void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(java.lang.String value) {\n this.name = value;\n }", "protected void setName(String name) {\r\n this.name = name;\r\n }", "public final void setName(String name) {_name = name;}", "public void setName(String val) {\n name = val;\n }", "public void setName(String name) {\n//\t\tif((name==null) || (name.length()<2)){\n//\t\t\tthrow new RuntimeException(\"Name muss mindestens 2 Zeichen enthalten!\");\n//\t\t}\n\t\tthis.name = name;\n\t}", "public void setName(String s) {\n this.name = s;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "public void setName(String name){\n \t\tthis.name = name;\n \t}", "public void setName(String name) {\n\t this.name = name;\n\t }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "void setName(String name_);", "public void setName(String name) {\n\t\tthis.name = name;\n\t\tfireChange();\n\t}", "@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void setName (String name) {\n this.name = name;\n NameRegistrar.register (\"server.\"+name, this);\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String inName)\n {\n\tname = inName;\n }", "public void setName(String name){\n\t\tthis.name = name;\n\t}", "public void setName(String name){\n\t\tthis.name = name;\n\t}", "public void setName(String name){\n\t\tthis.name = name;\n\t}", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "protected void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n characterName = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/name\",v);\n\t\t_Name=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "public void setName(String name)\n \t{\n \t\tthis.name = name;\n \t}", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }" ]
[ "0.7455781", "0.7399359", "0.70824504", "0.7056481", "0.69215053", "0.6851689", "0.6779001", "0.6676863", "0.65448034", "0.6421242", "0.6317906", "0.6305719", "0.63051856", "0.62837225", "0.6278121", "0.62310624", "0.61973286", "0.6195251", "0.61898404", "0.6181956", "0.6181295", "0.6181295", "0.6181295", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.6176889", "0.61614937", "0.6159603", "0.6157625", "0.6142942", "0.6140218", "0.61386263", "0.61371523", "0.6136474", "0.6133818", "0.6133818", "0.61334205", "0.61334205", "0.61334205", "0.61334205", "0.61334205", "0.61334205", "0.61314875", "0.61310214", "0.61240536", "0.61240536", "0.61240536", "0.61203295", "0.6117421", "0.6114946", "0.61136794", "0.61089635", "0.6099852", "0.609773", "0.609773", "0.609773", "0.6091476", "0.6091476", "0.6091476", "0.60889983", "0.608691", "0.608691", "0.608691", "0.60861236", "0.60861236", "0.60861236", "0.60861236", "0.60861236", "0.60861236", "0.60861236", "0.6084017", "0.60796404", "0.60787654", "0.6071126", "0.60708123", "0.6067898", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467", "0.60671467" ]
0.81964713
0
The compilation thread must call this method after it finishes with all calls to addFileToWrite.
public abstract void stopAcceptingFiles();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void addFileToWrite(AsynchronousFileWriter.FileData fileData, CompilerMessageLogger logger);", "public void startFileWrite() {\r\n this.setStatus(false);\r\n this.isFileOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n }// run()\r\n });// Thread\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isFileOutStarted = false;\r\n }\r\n }", "public abstract void waitForFilesToBeWritten(CompilerMessageLogger logger) throws InterruptedException;", "@Override\r\n public void run() {\r\n\r\n // Thread: writes files\r\n if (Controller.this.isFileWriteInUse) {\r\n // System.out.println(\"isFileWriteInUse\");\r\n\r\n if (Controller.this.cw.getWritesOnlyFiles()) {// as long as\r\n // thread is\r\n // running\r\n int i = Controller.this.cw.writeFileProgress / 2;\r\n Controller.this.writeIntoFiles.setValue(i);\r\n Controller.this.writeIntoFiles.repaint();\r\n } else {\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tWriting into files finished.\");\r\n Controller.this.isFileWriteInUse = false;\r\n Controller.this.writeIntoFiles.setVisible(false);\r\n if (!Controller.this.isDBWriteInUse)\r\n Controller.this.setStatus(true);\r\n }\r\n } // fi isFileWriteInUse\r\n else\r\n // Thread: writes from file in DB\r\n if (Controller.this.isDBWriteInUse) {// as long write process in DB\r\n // runs\r\n // System.out.println(\"isDBWriteInUse\");\r\n\r\n // critical, because dbc_in is not available as object in the\r\n // beginning\r\n boolean dbc_inStillWork;\r\n try {\r\n dbc_inStillWork = Controller.this.dbc_in.stillWorks;\r\n } catch (Exception e) {\r\n dbc_inStillWork = false;\r\n }\r\n\r\n if (Controller.this.cw.getWritesOnlyFiles() || dbc_inStillWork) {// as\r\n // long\r\n // as\r\n // the\r\n // thread\r\n // is\r\n // running\r\n int i;\r\n if (dbc_inStillWork) {\r\n i = (Controller.this.cw.writeFileProgress / 2)\r\n + ((Controller.this.dbc_in.singleProgress * 50) / Controller.this.dbc_in.maxProgerss);\r\n } else {\r\n i = Controller.this.cw.writeFileProgress / 2;\r\n }\r\n Controller.this.writeIntoDBProgress.setValue(i);\r\n Controller.this.writeIntoDBProgress.repaint();\r\n } else {\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tWriting into DB finished.\");\r\n Controller.this.isDBWriteInUse = false;\r\n Controller.this.writeIntoDBProgress.setVisible(false);\r\n if (!Controller.this.isFileWriteInUse)\r\n Controller.this.setStatus(true);\r\n\r\n if (Controller.this.dBInError) {\r\n this.tImer.cancel();\r\n System.err.print(\"\\t FAILED!\\n\");\r\n Controller.this.setStatus(true);\r\n Controller.this.dBInError = false;\r\n\r\n // dBOutError=false;\r\n }\r\n\r\n } // esle\r\n } else\r\n // Thread: lloads from DB and writes in nodelist.tmp and\r\n // edgelist.tmp\r\n if (Controller.this.isDBReadInUse) {// as lng as read process is\r\n // active\r\n // System.out.println(\"isDBReadInUse\");\r\n\r\n Controller.this.loadFromDBProgress.setVisible(true);\r\n if (Controller.this.dbc_out.stillWorks) {\r\n // System.out.println(\"Loading from DB active ...\");\r\n int i = (Controller.this.dbc_out.singleProgress * 100) / Controller.this.dbc_out.maxProgerss;\r\n if (i < 1)\r\n i = 1;\r\n Controller.this.loadFromDBProgress.setValue(i);\r\n Controller.this.loadFromDBProgress.repaint();\r\n } else {\r\n // tImer.cancel();\r\n System.out.println(\"*\\tLoading from DB finished.\");\r\n Controller.this.isDBReadInUse = false;\r\n Controller.this.loadFromDBProgress.setVisible(false);\r\n\r\n if (Controller.this.dBOutError) {\r\n this.tImer.cancel();\r\n System.err.print(\"\\t FAILED!\\n\");\r\n\r\n Controller.this.setStatus(true);\r\n\r\n Controller.this.isGraphStarted = false;\r\n Controller.this.isDiagStarted = false;\r\n Controller.this.isFileWriteInUse = false;\r\n Controller.this.dBOutError = false;\r\n\r\n // dBInError=true;\r\n\r\n }\r\n }\r\n }\r\n // Thread: runs Chinese Whispers\r\n else if (!Controller.this.dBOutError && !Controller.this.dBInError) {\r\n // System.out.println(\"!dBOutError&&!dBInError\");\r\n\r\n Controller.this.calculateCWProgress.setVisible(true);\r\n Controller.this.CalculateCWLabel.setVisible(true);\r\n\r\n if (Controller.this.cw.isActive) {\r\n if (Controller.this.cw.getIteration() > 0)\r\n Controller.this.calculateCWProgress.setValue(\r\n (Controller.this.cw.getCurrentIteration() * 100) / Controller.this.cw.getIteration());\r\n Controller.this.calculateCWProgress.repaint();\r\n } else { // cw not active\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tCalculating algorithm finished.\");\r\n Controller.this.calculateCWProgress.setVisible(false);\r\n Controller.this.CalculateCWLabel.setVisible(false);\r\n\r\n if (Controller.this.isGraphStarted) {\r\n // System.out.println(\"isGraphStarted\");\r\n Controller.this.setStatus(true);\r\n Controller.this.isAlgStartedForGraph = true;\r\n Controller.this.isGraphStarted = false;\r\n try {\r\n Thread t1 = new Thread(new MyGraphGUI(Controller.this.display_sub_current,\r\n (ChineseWhispers) Controller.this.cw.clone(), Controller.this.display_edges_temp,\r\n Controller.this.scale_temp, 30, Controller.this.display_degree_temp));\r\n t1.start();\r\n } catch (CloneNotSupportedException e) {\r\n e.printStackTrace();\r\n }\r\n } // fi isGraphStarted\r\n\r\n if (Controller.this.isDiagStarted) {\r\n // System.out.println(\"isDiagStarted\");\r\n Controller.this.setStatus(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.isDiagStarted = false;\r\n try {\r\n Thread t2 = new Thread(new Diagram((ChineseWhispers) Controller.this.cw.clone()));\r\n t2.start();\r\n } catch (CloneNotSupportedException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n } // fi isDiagStarted\r\n if (Controller.this.isFileOutStarted) {\r\n // System.out.println(\"isFileOutStarted\");\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n // isFileWriteInUse=false;\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n Controller.this.isFileOutStarted = false;\r\n } // fi isFileOutStarted\r\n if (Controller.this.isDBOutStarted) {\r\n // System.out.println(\"isDBOutStarted\");\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isDBWriteInUse = true;\r\n Controller.this.writeIntoDBProgress.setVisible(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(false, false, false);\r\n String pw = \"\";\r\n for (int i = 0; i < Controller.this.rpasswdfield.getPassword().length; i++)\r\n pw += Controller.this.rpasswdfield.getPassword()[i];\r\n\r\n Controller.this.dbc_in = new DBConnect(Controller.this.rhostfield.getText(),\r\n Controller.this.rdatabasefield.getText(), Controller.this.ruserfield.getText(),\r\n pw, Integer.parseInt(Controller.this.rportfield.getText()),\r\n Controller.this.otablenamefield.getText(), COLUMN_NAMES_FOR_DB_OUT);\r\n\r\n // File: Controller.CLASSES_TMP_FILENAME\r\n // Columns: Controller.COLUMN_NAMES_FOR_DB_OUT\r\n try {\r\n Controller.this.dbc_in.stillWorks = true;\r\n Controller.this.dbc_in.maxProgerss = Controller.this.cw.countNodesWithClasses;\r\n Controller.this.dbc_in.writeFromFileIntoDB();\r\n } catch (IOWrapperException iow_e) {\r\n System.err.println(\"Error while writing into DB!\\nConnection failed!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nConnection failed!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n } // end catch WrapperException\r\n catch (IOIteratorException ioi_e) {\r\n System.err.println(\"Error while writing into DB!\\nCould not iterate over results!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nCould not iterate over results!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n }\r\n Controller.this.isDBOutStarted = false;\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n Controller.this.isDBOutStarted = false;\r\n } // end isDBOutStarted\r\n\r\n } // esle CW not active\r\n\r\n } // fi (!dBOutError && !dBInError)\r\n\r\n }", "public void run() {\n // Initialize\n imports = new HashSet<>();\n lines = new ArrayList<>();\n\n // Read and merge source files\n final File folder = new File(\"src\");\n recurseOverFolder(folder);\n\n // Output to file\n outputFile();\n }", "private void updateFiles() {\n\t}", "public void startDBWrite() {\r\n this.setStatus(false);\r\n this.isDBOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n // setStatus(true);\r\n\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isDBWriteInUse = true;\r\n Controller.this.writeIntoDBProgress.setVisible(true);\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(false, false, false);\r\n String pw = \"\";\r\n for (int i = 0; i < Controller.this.rpasswdfield.getPassword().length; i++)\r\n pw += Controller.this.rpasswdfield.getPassword()[i];\r\n\r\n Controller.this.dbc_in = new DBConnect(Controller.this.rhostfield.getText(),\r\n Controller.this.rdatabasefield.getText(), Controller.this.ruserfield.getText(), pw,\r\n Integer.parseInt(Controller.this.rportfield.getText()),\r\n Controller.this.otablenamefield.getText(), COLUMN_NAMES_FOR_DB_OUT);\r\n\r\n // File: Controller.CLASSES_TMP_FILENAME\r\n // Columns: Controller.COLUMN_NAMES_FOR_DB_OUT\r\n try {\r\n Controller.this.dbc_in.stillWorks = true;\r\n Controller.this.dbc_in.maxProgerss = Controller.this.cw.countNodesWithClasses;\r\n Controller.this.dbc_in.writeFromFileIntoDB();\r\n } catch (IOWrapperException iow_e) {\r\n System.err.println(\"Error while writing into DB!\\nConnection failed!\");\r\n JOptionPane.showMessageDialog(null, \"Error while writing into DB!\\nConnection failed!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n } catch (IOIteratorException ioi_e) {\r\n System.err.println(\"Error while writing into DB!\\nCould not iterate over results!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nCould not iterate over results!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n }\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isDBOutStarted = false;\r\n }\r\n }", "public void execute() throws BuildException {\n super.execute();\n\n // minimal Renew logging configuration that forwards messages\n // to the Ant logging system\n Logger logger = Logger.getLogger(\"CH.ifa.draw\");\n AntTaskLogAppender appender = AntTaskLogAppender.getInstance(this);\n logger.addAppender(appender);\n logger.setLevel(Level.INFO);\n logger = Logger.getLogger(\"de.renew\");\n logger.addAppender(appender);\n logger.setLevel(Level.INFO);\n\n // get all files - out of the vector full of filesets -> 2 loops\n Iterator<FileSet> filesetIterator = filesets.iterator();\n while (filesetIterator.hasNext()) {\n FileSet elementFileSet = filesetIterator.next();\n DirectoryScanner dirScan = elementFileSet.getDirectoryScanner(getProject());\n String[] fileNames = dirScan.getIncludedFiles();\n log(\"filenames: \" + fileNames.length, Project.MSG_VERBOSE);\n\n for (int i = 0; i < fileNames.length; i++) {\n String fileName = fileNames[i];\n File inFile = new File(dirScan.getBasedir() + \"/\" + fileName);\n log(\"File: \" + inFile.getAbsolutePath(), Project.MSG_VERBOSE);\n\n // get drawing from file\n Drawing netDrawing = DrawingFileHelper.loadDrawing(inFile,\n new StatusDisplayer() {\n public void showStatus(String message) {\n log(message);\n }\n }); //rnw-Object\n log(\"Drawing: \" + netDrawing, Project.MSG_VERBOSE);\n\n if (netDrawing == null) {\n throw new BuildException(\"Could not read drawing file: \"\n + inFile);\n }\n\n // Export netDrawing\n try {\n File helpFile = new File(destdir + \"/\" + fileName); // helps to get the right directory path\n File outFile = new File(helpFile.getParent() + \"/\"\n + netDrawing.getName() + \".\"\n + defaultExtension);\n\n //create directories\n outFile.getParentFile().mkdirs();\n exportFormat.export(netDrawing, outFile);\n } catch (Exception e) {\n throw new BuildException(e);\n }\n }\n }\n }", "public void compileEnded(File workDir, List<? extends File> excludedFiles) { }", "public void compileEnded(File workDir, List<? extends File> excludedFiles) { }", "public void compileStarted() { }", "public void compileStarted() { }", "protected void work() {\n try {\n if(theFile!=null) { \n //construct filePath, fileSize\n int fileSize = theFile.getFileSize();\n if(fileSize==0) fileSize=1;\n String filePath = path+\"/\"+theFile.getFileName();\n if(log.isDebugEnabled()) log.debug(\"Uploading file: \"+filePath+\", filesize: \"+fileSize/1000+\"KB\");\n\t\t\t\n //write out file\n InputStream stream = theFile.getInputStream();\n OutputStream bos = new FileOutputStream(filePath);\n int bytesRead = 0;\n byte[] buffer = new byte[Constants.FILEUPLOAD_BUFFER];\n while(isRunning() && ((bytesRead = stream.read(buffer, 0, Constants.FILEUPLOAD_BUFFER)) != -1)) {\n bos.write(buffer, 0, bytesRead);\n sum+=bytesRead;\n setPercent(sum/fileSize);\n }\n bos.close();\n stream.close();\n }\n } catch(Exception ex) {\n setRunning(false);\n log.error(\"Error while uploading: \"+ex.getMessage());\n ex.printStackTrace();\n }\n }", "public void saveBeforeCompile() { }", "public void saveBeforeCompile() { }", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "@Override\n protected void done() {\n super.done();\n if (!this.isCancelled()) {\n openMergeModifiedFile(); \n }\n }", "protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }", "public void link() throws Exception {\n ZipOutputStream output = new ZipOutputStream( new FileOutputStream( outfile ) );\n if ( compression ) {\n output .setMethod( ZipOutputStream .DEFLATED );\n output .setLevel( Deflater .DEFAULT_COMPRESSION );\n } else {\n output .setMethod( ZipOutputStream .STORED );\n }\n Enumeration merges = mergefiles .elements();\n while ( merges .hasMoreElements() ) {\n String path = (String) merges .nextElement();\n File f = new File( path );\n if ( f.getName().endsWith( \".jar\" ) || f.getName().endsWith( \".zip\" ) ) {\n //Do the merge\n mergeZipJarContents( output, f );\n }\n else {\n //Add this file to the addfiles Vector and add it \n //later at the top level of the output file.\n addAddFile( path );\n }\n }\n Enumeration adds = addfiles .elements();\n while ( adds .hasMoreElements() ) {\n String name = (String) adds .nextElement();\n File f = new File( name );\n if ( f .isDirectory() ) {\n //System.out.println(\"in jlink: adding directory contents of \" + f.getPath());\n addDirContents( output, f, f.getName() + '/', compression );\n }\n else {\n addFile( output, f, \"\", compression );\n }\n }\n if ( output != null ) {\n try {\n output .close();\n } catch( IOException ioe ) {}\n }\n }", "private void addFilesToWriter()\n throws Exception {\n Set<Map.Entry<String, Map.Entry<String, byte[]>>> set = files.entrySet();\n for (Map.Entry<String, Map.Entry<String, byte[]>> me : set) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\n \"Content-Disposition: form-data; name=\\\"\" + me.getKey()\n + \"\\\"; filename=\\\"\" + me.getValue().getKey() + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\n \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(me.getValue().getKey()))\n .append(LINE_FEED);\n writer.append(LINE_FEED);\n writer.flush();\n\n outputStream.write(me.getValue().getValue(), 0, me.getValue().getValue().length);\n outputStream.flush();\n\n writer.append(LINE_FEED);\n writer.flush();\n }\n }", "private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\t\t\tpublic void run() \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"reading..\" +next.getFileName());\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t//ts1.finalWrite(next.getFileName(),(int)file.length());\n\t\t\t\t\t\t\tInputStream in = new FileInputStream(readFile);\n\t\t\t\t\t\t\tint i;\n\t\t\t\t\t\t\tint fileNameLength =readFile.length();\n\t\t\t\t\t\t\tlong fileLength = file.length();\n\t\t\t\t\t\t\tlong total = (2+fileNameLength+fileLength);\n\t\t\t\t\t\t\t//System.out.println(\"toal length\" +total);\n\t\t\t\t\t\t\tqu.put((byte)total);\n\t\t\t\t\t\t\tqu.put((byte)readFile.length()); // file name length\n\t\t\t\t\t\t\tqu.put((byte)file.length()); //file content length\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int j=0;j<readFile.length();j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)readFile.charAt(j)); //writing file Name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile((i=in.read())!=-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)i);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IOException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public void FilesBufferWrite2Append() throws IOException {\n \ttry { \t\n \t\t\n \t \t/* This logic will check whether the file\n \t \t \t * exists or not. If the file is not found\n \t \t \t * at the specified location it would create\n \t \t \t * a new file*/\n \t \t \tif (!file.exists()) {\n \t \t\t file.createNewFile();\n \t \t \t}\n \t\t\n \t \t \t//KP : java.nio.file.Files.write - NIO is buffer oriented & IO is stream oriented!]\n \t\tString str2Write = \"\\n\" + LocalDateTime.now().toString() + \"\\t\" + outPrintLn + \"\\n\";\n \t\tFiles.write(Paths.get(outFilePath), str2Write.getBytes(), StandardOpenOption.APPEND);\n \t\t\n \t}catch (IOException e) {\n\t \t// TODO Auto-generated catch block\n\t \te.printStackTrace();\t\t\n\t\t\tSystem.out.print(outPrintLn);\n\t\t\tSystem.out.println(outPrintLn);\t\n \t}\n }", "public synchronized void addBuildDirectoryCP(File f) { buildCP.add(f); }", "private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }", "protected void onCompileInternal() {\r\n\t}", "protected abstract void writeFile();", "@Override\n public void finish() {\n storeProperties();\n // retrieve the full list of files according to the selected mode\n List<org.jajuk.base.File> files = getFiles();\n if (files == null) {\n return;\n }\n // define the target directory\n final Date curDate = new Date();\n // Do not use ':' character in destination directory, it's\n // forbidden under Windows\n final SimpleDateFormat stamp = new SimpleDateFormat(\"yyyyMMdd-HHmm\", Locale.getDefault());\n final String dirName = \"Party-\" + stamp.format(curDate);\n final java.io.File destDir = new java.io.File(((String) data.get(Variable.DEST_PATH)), dirName);\n if (!destDir.mkdir()) {\n Log.warn(\"Could not create destination directory \" + destDir);\n }\n Log.debug(\"Going to copy \" + files.size() + \" files to directory {{\"\n + destDir.getAbsolutePath() + \"}}\");\n // perform the actual copying\n UtilPrepareParty.copyFiles(files, destDir, isTrue(Variable.NORMALIZE_FILENAME),\n isTrue(Variable.ONE_MEDIA_ENABLED) && isTrue(Variable.CONVERT_MEDIA),\n (String) data.get(Variable.ONE_MEDIA), (String) data.get(Variable.CONVERT_COMMAND));\n }", "private void writerThreadCallback() {\n /*\n // Method dump skipped, instructions count: 164\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.dumpsysledger.DumpsysLedger.writerThreadCallback():void\");\n }", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "public void onFinish() {\n \t\tmdrFile.write();\n \n \t\t// Close everything\n \t\tfor (Closeable file : toClose)\n \t\t\tUtils.closeFile(file);\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 }", "@Override\n\tpublic void postExecution() throws CommandListenerException {\n\t\tString extraContents = \"0xbeef\";\n\t\tByteArrayInputStream inputStream = new ByteArrayInputStream(extraContents.getBytes());\n\t\tSourcesFile sources = fedoraProjectRoot.getSourcesFile();\n\t\tfor (String filename: sources.getAllSources()) {\n\t\t\tIFile sourceFile;\n\t\t\t\tsourceFile = (IFile)fedoraProjectRoot.getContainer().findMember(new Path(filename));\n\t\t\tif (sourceFile != null) {\n\t\t\t\ttry {\n\t\t\t\t\tsourceFile.appendContents(inputStream, IResource.FORCE, new NullProgressMonitor());\n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tfedoraProjectRoot.getContainer().refreshLocal(IResource.DEPTH_ONE, null);\n\t\t} catch (CoreException e) {\n\t\t\t// ignore\n\t\t}\n\n\t}", "public void performOperation() {\n processFile(this.scopedFile);\n }", "@Override\n public void writeDataToTxtFile() {\n\n }", "public void indexFileOrDirectory(String fileName, String packageType) throws IOException {\n //===================================================\n //gets the list of files in a folder (if user has submitted\n //the name of a folder) or gets a single file name (is user\n //has submitted only the file name)\n //===================================================\n this.setThreadCount(this.queue.size());\n int originalNumDocs = writer.numDocs();\n startTime = System.currentTimeMillis();\n for (File f : queue) {\n LogReader lr = new LogReader(f.getAbsolutePath());\n \n Thread t = new Thread(new Runnable(){//Using thread \n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tcurrentThreadCount = currentThreadCount + 1;\n\t\t\t\t\tSystem.out.println(\"Number of thread: \" + currentThreadCount);\n\t\t\t\t\ttry {\n\t\t for (int cnt = 0; ; cnt++) {\n\t\t \tif(lr == null){\n\t\t \t\tSystem.out.println(\"hello\");\n\t\t \t}\n\t\t ArrayList<Package> list = lr.PackagesWrapper(2000);\n\t\t if (list == null || list.size() <= 0)\n\t\t {\n\t\t break;\n\t\t }\n\n\t\t int size = list.size();\n\t\t ArrayList<Document> docs = new ArrayList<Document>();\n\t\t for (int i = 0; i < size; i++)\n\t\t {\n\t\t Package p = list.get(i);\n\t\t Document doc = new Document();\n\t\t deWrapString(packageType, p, doc);\n\t\t \n\t\t docs.add(doc);\n\t\t }\n\n\t\t writer.addDocuments(docs);\n\n\t\t if (cnt != 0 && cnt % 10 == 0) {\n\t\t flush();\n\t\t currentTime = System.currentTimeMillis();\n\t\t \n\t\t System.out.println(\"Current document: \" + writer.numDocs() + \n\t\t \t\t\", current indexing rate: \" + (writer.numDocs()/ (currentTime - startTime)) * 1000);\n\t\t }\n\t\t }\n\t\t System.out.println(\"Added: \" + f);\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t System.out.println(\"Could not add: \" + f);\n\t\t } finally {\n\t\t \tthreadCount--;\n\t\t }\n\t\t\t\t}\n \t\n });\n t.start(); \n /*\n try {\n for (int cnt = 0; ; cnt++) {\n ArrayList<Package> list = lr.PackagesWrapper(2000);\n if (list == null || list.size() <= 0)\n {\n break;\n }\n\n int size = list.size();\n ArrayList<Document> docs = new ArrayList<Document>();\n for (int i = 0; i < size; i++)\n {\n Package p = list.get(i);\n Document doc = new Document();\n this.deWrapString(packageType, p, doc);\n \n docs.add(doc);\n }\n\n writer.addDocuments(docs);\n\n if (cnt % 10 == 0) {\n flush();\n System.out.println(\"bulk count: \" + cnt);\n }\n }\n System.out.println(\"Added: \" + f);\n } catch (Exception e) {\n System.out.println(\"Could not add: \" + f);\n } finally {\n\n }*/\n }\n \n /*\n int newNumDocs = writer.numDocs();\n System.out.println(\"\");\n System.out.println(\"************************\");\n System.out.println((newNumDocs - originalNumDocs) + \" documents added.\");\n System.out.println(\"************************\");\n queue.clear();\n */\n }", "static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.size(); i++){\n\t \t\tout.write(operations.get(i).getDetails() );\n\t \t}\n\t\t\t\n\t\t\t//Close the output stream\n\t\t\tout.close();\n\t\t}\n \tcatch (Exception e){//Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\tSystem.out.print(\"Operations file written.\\n\");\n\n \t\n }", "private static void prepareOutputFile() {\n try {\n outputFileBuffer = new BufferedWriter(new FileWriter(PATH+OUTPUT_FILE_NAME));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public synchronized void addProjectFilesCP(File f) { projectFilesCP.add(f); }", "@Test\n void fileWriter() {\n\n\n ArrayList<String> fileLines = Name_Sorter.fileRead(this.readFile, \"src/main/java/oop/assignment3/ex41/base/testFile-ex41\");\n Collections.sort(fileLines);\n this.writeFile = Name_Sorter.fileWriter(this.writeFile, fileLines, \"src/main/java/oop/assignment3/ex41/base/ex41-testOutputFile.txt\");\n boolean actualOutput = this.writeFile != null;\n Assertions.assertTrue(actualOutput);\n }", "public void postRun() {\n if (manageFileSystem && fs != null) {\n try {\n fs.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close AlluxioFileSystem: %s\", e.getMessage()));\n }\n }\n // only to close the FileOutputStream when manageRecordFile=true\n if (manageRecordFile && recordOutput != null) {\n try {\n recordOutput.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close File %s: %s\", recordFileName, e.getMessage()));\n }\n }\n }", "private void writeProc() throws Exception {\n\t\tWriter writer = new Writer(this.procPath,this.procDataList);\n\t\twriter.running();\n\t}", "private void fileWrite(String outDir, String fileName, boolean isExtern)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile hFile = new File(outDir + fileName + \".h\");\n\t\t\tFile cFile = new File(outDir + fileName + \".c\");\n\t\t\t\n\t\t\t// create new file\n\t\t\thFile.createNewFile();\n\t\t\tcFile.createNewFile();\n\t\t\t\n\t\t\t// create file writer\n\t\t\tFileWriter hFileWriter = new FileWriter(hFile);\n\t\t\tFileWriter cFileWriter = new FileWriter(cFile);\n\n\t\t\tString variable = new String(\"const unsigned char \" + fileName + \"[\" + String.format(\"0x%x\", this.dataContent.length) + \"]\");\n\t\t\t\n\t\t\t// write .h file\n\t\t\thFileWriter.write(\"#ifndef _\" + fileName + \"_\\r\\n\");\n\t\t\thFileWriter.write(\"#define _\" + fileName + \"_\\r\\n\");\n\t\t\tif(isExtern)\n\t\t\t{\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t\thFileWriter.write(\"#ifdef __cplusplus\\r\\n\");\n\t\t\t\thFileWriter.write(\"extern \\\"C\\\" {\\r\\n\");\n\t\t\t\thFileWriter.write(\"#endif\\r\\n\");\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t}\n\t\t\t\n\t\t\thFileWriter.write(\"extern \" + variable + \";\\r\\n\");\n\t\t\t\n\t\t\tif(isExtern)\n\t\t\t{\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t\thFileWriter.write(\"#ifdef __cplusplus\\r\\n\");\n\t\t\t\thFileWriter.write(\"}\\r\\n\");\n\t\t\t\thFileWriter.write(\"#endif\\r\\n\");\n\t\t\t\thFileWriter.write(\"\\r\\n\");\n\t\t\t}\n\t\t\thFileWriter.write(\"#endif\\t// _\" + fileName + \"_\\r\\n\");\n\t\t\thFileWriter.flush();\n\n\t\t\t// write .c file\n\t\t\tcFileWriter.write(variable + \" = {\");\n\t\t\tint counter = 0;\n\t\t\tfor(byte value : this.dataContent)\n\t\t\t{\n\t\t\t\tif(--counter < 0)\n\t\t\t\t{\n\t\t\t\t\tcFileWriter.write(\"\\r\\n\\t\");\n\t\t\t\t\tcounter = 15;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcFileWriter.write(String.format(\"0x%02x,\", value));\n\t\t\t}\n\t\t\tcFileWriter.write(\"\\r\\n};\\r\\n\");\n\t\t\tcFileWriter.flush();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed file write : \" + e.getMessage());\n\t\t}\n\t}", "public void process(final IFile file) {\n try { \n \t\n \tIRunnableWithProgress runnable = new IRunnableWithProgress(){\n \t\tpublic void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n \t\t\ttry {\n \t\t\t\tSubMonitor progress = SubMonitor.convert(monitor, 100);\n \t\t\t\tResource csResource = getResource(file);\n \n \t\t\t\tMarkerHelper.unmark(csResource);\n \t\t\t\tif (containsProblems(csResource)) {\n \t\t\t\t\tMarkerHelper.mark(csResource);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t \n \t\t\t\tfinal ConcreteSyntax concreteSyntax = (ConcreteSyntax) csResource.getContents().get(0);\n \t\t\t\tfinal String csPackageName = getPackageName(concreteSyntax);\n \t\t\t\tfinal String projectName = csPackageName;\n \t\t\t \n \t\t\t\tif (projectName == null) { \n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//create a project\n \t\t\t\tIProject project = createProject(progress, projectName);\n \t\t\t \n \t\t\t\t//generate the resource class, parser, and printer\n \t\t\t\tResourcePackage pck = new ResourcePackage(concreteSyntax, csPackageName, getSrcFolder(project), copyMapFromPreferenceStore());\n \t\t\t\tResourcePackageGenerator.generate(pck, progress.newChild(TICKS_GENERATE_RESOURCE));\n \t\t\t \n \t\t\t\t//errors from parser generator?\n \t\t\t\tif (containsProblems(csResource)) {\n \t\t\t\t\tMarkerHelper.mark(csResource);\n \t\t\t\t}\n \t\t\t \n \t\t\t boolean overridePluginConfig = EMFTextEditUIPlugin.getDefault().getPreferenceStore().getBoolean(EMFTextEditUIPlugin.OVERRIDE_PLUGIN_CONFIG_NAME);\n \t\t\t \n \t\t\t\tcreateMetaFolder(progress, project);\n \t\t\t\tcreateManifest(progress, concreteSyntax, projectName, overridePluginConfig, project);\n \t\t\t\tcreatePluginXML(progress, concreteSyntax, projectName, overridePluginConfig, project, file);\n \t\t\t\t\n \t\t\t\tmarkErrors(concreteSyntax);\n \t\t\t\t\n \t\t\t\tcreateMetaModelCode(progress, concreteSyntax);\n \t\t\t\t\n \t\t\t\tproject.refreshLocal(IProject.DEPTH_INFINITE, progress.newChild(TICKS_REFRESH_PROJECT));\n \t\t\t}\n \t\t\t catch (CoreException e) {\n \t\t\t \tthrow new InvocationTargetException(e);\n \t\t\t }\n \t\t}\n \n \t\t\t\tprivate String getPackageName(final ConcreteSyntax cSyntax) {\n \t\t\t\t\treturn (cSyntax.getPackage().getBasePackage() == null ? \"\" : cSyntax.getPackage().getBasePackage() + \".\") + cSyntax.getPackage().getEcorePackage().getName() + \".resource.\" + cSyntax.getName();\n \t\t\t\t}\n \n \t};\n \t\n \tPlatformUI.getWorkbench().getProgressService().busyCursorWhile(runnable);\n }\n catch (InvocationTargetException e){\n \te.getTargetException().printStackTrace();\n }\n catch (InterruptedException e){\n \te.printStackTrace();\n }\n }", "public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }", "public void generateAndwriteToFile() {\n List<GeneratedJavaFile> gjfs = generate();\n if (gjfs == null || gjfs.size() == 0) {\n return;\n }\n for (GeneratedJavaFile gjf : gjfs) {\n writeToFile(gjf);\n }\n }", "@Override\n\tpublic void finish() throws DPFTRuntimeException {\n\t\tDPFTLogger.info(this, \"Updating Outbound Control Records...\");\n\t\tDPFTOutboundDboSet rSet = (DPFTOutboundDboSet) this.getPreviousAction().getResultSet();\n\t\tDPFTOutboundControlDboSet ctrlSet = rSet.getControlTableRecords(\"process_status='\" + GlobalConstants.DPFT_OBND_STAT_RUN + \"'\");\n\t\tctrlSet.taskComplete();\n\t\tctrlSet.close();\n\t\t\n\t\t//send Notification\n\t\tString cmp_code = ctrlSet.getDbo(0).getString(\"camp_code\");\n\t\tfor(String sf: success_ftp_files){\n\t\t\tObject[] params = {sf, this.getOutFileRemoteDir()};\n\t\t\tDPFTUtil.pushNotification(\n\t\t\t\t\tDPFTUtil.getCampaignOwnerEmail(cmp_code), \n\t\t\t\t\tnew DPFTMessage(\"CUSTOM\", \"TFB00011I\", params)\n\t\t\t);\n\t\t}\n\t\tsuccess_ftp_files.clear();\n\t}", "public void execute() {\r\n if (!Os.isFamily(Os.FAMILY_WINDOWS)) {\r\n throw new BuildException(\"CMT supported only on windows platforms.\");\r\n }\r\n validate();\r\n try {\r\n input = File.createTempFile(\"Files\", \".list\");\r\n generateFileList();\r\n runCmtCommand();\r\n if (this.htmlOutputDir != null) {\r\n runCmt2HtmlCommand();\r\n }\r\n } catch (IOException ioe) {\r\n throw new BuildException(\"Not able to generate file list for 'cmt'. \", ioe);\r\n } catch (BuildException be) {\r\n if (failOnError) {\r\n throw new BuildException(\"Exception occured while running 'cmt' tool. \", be);\r\n }\r\n log(\"Exception occured while running 'cmt' tool. \", Project.MSG_ERR);\r\n } finally {\r\n if (input != null) {\r\n input.delete();\r\n }\r\n }\r\n }", "private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}", "public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }", "void mergeOut() {\n String outputName = outputDir + flist.get(0).getName().substring(0,\n flist.get(0).getName().lastIndexOf(\".\"));\n if (outputType.equals(\"Text\")) {\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n for (int j = 1; j < images.length; j++) {\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n }\n bWriter.close();\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n bWriter.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n for (int j = 1; j < images.length; j++) {\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n try {\n document.save(outputName + \".pdf\");\n document.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "public void updateFile() {\n try {\n FileWriter fw = new FileWriter(path);\n for (Task t : taskList.getTasks()) {\n fw.write(t.toTxt());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"File cannot be found\");\n }\n }", "public void Run(String filePath){\n\n //read in the input file from the user declared path\n ReadInputFile(filePath);\n\n //save data for refactoring process\n refact = inputFile;\n\n //Prompt the user and wait\n System.out.println(\"Beginning refactoring process...\\n\\n\");\n DisplaySleep();\n\n //refactor the entire async task file\n ImportLibrary();\n CacheAsyncTaskFunctions();\n HandleAysncFromOnCreate();\n HandleBuilder(LOADER_CALLBACK);\n HandleBuilder(LOADER_CLASS);\n\n //write to the new file\n try{\n PrintWriter writer = new PrintWriter(\"RefactoredOutput.java\", \"UTF-8\");\n\n for(String in: inputFile){\n writer.print(in);\n }\n writer.close();\n }\n catch(IOException ex){\n System.out.println(ex);\n }\n\n //let the user know that the program has finished running\n System.out.println(\"AsyncTask Refactoring Process Complete!\");\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(JOB_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (JobDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(String.valueOf(transaction.getTitle()));\n\t\t\t\t\t\trecord.add(transaction.getEmployeeName());\n\t\t\t\t\t\trecord.add(transaction.getJobType());\n\t\t\t\t\t\trecord.add(transaction.getPlannedStartTime());\n\t\t\t\t\t\trecord.add(transaction.getActualEndTime());\n\t\t\t\t\t\trecord.add(transaction.getJobStatus() != null ? transaction.getJobStatus().name()\n\t\t\t\t\t\t\t\t: JobStatus.OPEN.name());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!! \" + e);\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "public void run() throws IOException {\n copyFile(JAR_PATH, JAR_DESTINATION);\n copyFile(LICENSE_PATH, LICENSE_DESTINATION);\n copyFile(LISTFILE_PATH, LISTFILE_DESTINATION);\n copyFile(README_PATH, README_DESTINATION);\n writeFileContents(RUN_CONTENTS, RUN_DESTINATION);\n }", "private void writeFiles(String projectName, File projectRootDirectory, AdoptionContext context, File classPath,\n\t\t\tFile project) throws IOException {\n\t\tString ls = System.getProperty(\"line.separator\");\n\t\tStringBuilder projectSb = new StringBuilder();\n\t\tprojectSb.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\").append(ls);\n\t\tprojectSb.append(\"<projectDescription>\").append(ls);\n\t\tprojectSb.append(\" <name>\").append(projectName).append(\"</name>\").append(ls);\n\t\tprojectSb.append(\" <comment>\").append(\"Auto generated by QuickAdopt plugin\").append(\"</comment>\").append(ls);\n\t\tprojectSb.append(\" <projects/>\").append(ls);\n\t\tprojectSb.append(\" <natures>\").append(ls);\n\t\tprojectSb.append(\" <nature>org.eclipse.jdt.core.javanature</nature>\").append(ls);\n\t\tprojectSb.append(\" </natures>\").append(ls);\n\t projectSb.append(\" <buildSpec>\").append(ls);\n\t projectSb.append(\" <buildCommand>\").append(ls);\n\t projectSb.append(\" <name>org.eclipse.jdt.core.javabuilder</name>\").append(ls);\n\t projectSb.append(\" <arguments/>\").append(ls);\n\t projectSb.append(\" </buildCommand>\").append(ls);\n\t projectSb.append(\" </buildSpec>\").append(ls);\n\t projectSb.append(\" <linkedResources/>\").append(ls);\n\t projectSb.append(\"</projectDescription>\").append(ls);\n\t\t\n\t\t\n\t\tStringBuilder claspathSb = new StringBuilder();\n\t\tclaspathSb.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\").append(ls);\n\t\tclaspathSb.append(\"<classpath>\").append(ls);\n\t\tclaspathSb.append(\" <classpathentry kind=\\\"con\\\" path=\\\"org.eclipse.jdt.launching.JRE_CONTAINER\\\"/>\").append(ls);\n\t\tfor(File sourceFolder: context.sourceFolderAdoptables){\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tFile parent = sourceFolder;\n\t\t\tboolean first=true;\n\t\t\twhile (parent!=null && !projectRootDirectory.equals(parent)){\n\t\t\t\tif (!first){\n\t\t\t\t\tsb.insert(0,\"/\");\n\t\t\t\t}\n\t\t\t\tfirst=false;\n\t\t\t\tsb.insert(0,parent.getName());\n\t\t\t\tparent=parent.getParentFile();\n\t\t\t}\n\t\t\tString relativePath = sb.toString();\n\t\t\tclaspathSb.append(\" <classpathentry kind=\\\"src\\\" path=\\\"\").append(relativePath).append(\"\\\"/>\").append(ls);\n\t\t}\n\t\tclaspathSb.append(\" <classpathentry kind=\\\"output\\\" path=\\\"bin\\\"/>\").append(ls);\n\t\tclaspathSb.append(\"</classpath>\").append(ls);\n\t\t\n\t\tSystem.out.println(\".project=\"+classPath);\n\t\tSystem.out.println(\".classpath=\"+classPath);\n\t\t\n\t\ttry(BufferedWriter bw = new BufferedWriter(new FileWriter(project))){\n\t\t\tbw.write(projectSb.toString());\n\t\t\tSystem.out.println(\"written:\"+project);\n\t\t}\n\t\t\n\t\ttry(BufferedWriter bw = new BufferedWriter(new FileWriter(classPath))){\n\t\t\tbw.write(claspathSb.toString());\n\t\t\tSystem.out.println(\"written:\"+classPath);\n\t\t}\n\t\tFileUtil.copyFile(classPath, new File(classPath.getParentFile(),\".classpath_quickadopt\"));\n\t\tFileUtil.copyFile(project, new File(project.getParentFile(),\".project_quickadopt\"));\n\t}", "@Override\n public void imageComplete() throws IOException {\n\tif (done) throw new IOException(errorMsg(\"imageComplete\"));\n\tdone = true;\n\tsynchronized(recorder) {\n\t continueWriting = true;\n\t recorder.notify();\n\t}\n\tsynchronized(this) {\n\t try {\n\t\twhile (writingDone == false) {\n\t\t wait();\n\t\t}\n\t } catch(InterruptedException ie) {\n\t\twriteException = ie;\n\t } catch (IllegalMonitorStateException ime) {\n\t\twriteException = ime;\n\t }\n\t if (writeException != null) {\n\t\tString msg = errorMsg(\"cannotCreateFST\", getType());\n\t\tthrow new\n\t\t IOException(msg, writeException);\n\t }\n\t}\n }", "private static void taskContentsFileTransfer() {\n // Transfer text file to temporary file\n try {\n String taskContentsFilePath, taskContents;\n BufferedReader taskContentsLocation = new BufferedReader(new FileReader(FILE_PATH_CONTENT));\n taskContentsFilePath = taskContentsLocation.readLine();\n\n if (taskContentsFilePath != null) {\n BufferedReader taskContentsReader = new BufferedReader(new FileReader(taskContentsFilePath));\n\n taskContents = taskContentsReader.readLine();\n while (taskContents != null) {\n fileContent.add(taskContents);\n taskContents = taskContentsReader.readLine();\n }\n taskContentsReader.close();\n // Clear file\n PrintWriter pw = new PrintWriter(taskContentsFilePath);\n pw.close();\n }\n taskContentsLocation.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void runTask() throws Exception {\n String scannedFileDirectoryPath = \"/mnt/digibuffer/tmp\";\n Path scanFileDirectory = Paths.get(scannedFileDirectoryPath);\n taskLog(\"Process existing files in %s\\n\", scannedFileDirectoryPath);\n processFiles(scanFileDirectory);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\tString siteName = null;\n\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(CONSOLIDATED_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (ReportResult transaction : content) {\n\t\t\t\t\t\tif (StringUtils.isEmpty(siteName) || !siteName.equalsIgnoreCase(transaction.getSiteName())) {\n\t\t\t\t\t\t\tcsvFilePrinter.printRecord(\"\");\n\t\t\t\t\t\t\tcsvFilePrinter\n\t\t\t\t\t\t\t\t\t.printRecord(\"CLIENT - \" + projName + \" SITE - \" + transaction.getSiteName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getLocatinName());\n\t\t\t\t\t\trecord.add(transaction.getAssignedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getCompletedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getOverdueJobCount());\n\t\t\t\t\t\trecord.add(transaction.getTat());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "App () throws Exception {\n timelines = new LinkedList<>();\n deleteElements = new LinkedList<>();\n file.createNewFile();\n }", "@Override\n public void initialize() {\n // TODO Auto-generated method stub\n String name = (String)getConfigParameterValue(\"OutputPath\");\n File file = new File(name);\n try {\n bout = new BufferedWriter(new FileWriter(file));\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n throw new UIMARuntimeException(e);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n throw new UIMARuntimeException(e);\n }\n output = new HashSet<String>();\n }", "@Override\n public void compilationFinished(boolean aborted, int errors, int warnings, @NotNull CompileContext compileContext) {\n IntelliJEvent e = new IntelliJEvent(System.currentTimeMillis(), TYPE, \"finished\");\n e.addExtraData(\"aborted\", String.valueOf(aborted));\n e.addExtraData(\"errors\", String.valueOf(errors));\n e.addExtraData(\"warnings\", String.valueOf(warnings));\n Persistence.getInstance().add(e);\n }", "public void doFiles(){\r\n serversDir = new File(rootDirPath+\"/servers/\");\r\n serverList = new File(rootDirPath+\"serverList.txt\");\r\n if(!serversDir.exists()){ //if server Directory doesn't exist\r\n serversDir.mkdirs(); //create it\r\n }\r\n updateServerList();\r\n }", "public void run()\n {\n try\n {\n // Load the manifest file\n File manifest = new File(UploaderMain.getManifestName());\n if (!manifest.exists())\n {\n ErrorPrinter.printError(ErrorCode.fileNotFound, \"manifest does not exist\");\n System.exit(0);\n }\n\n // Read names of files from manifest\n Map<String, File> files = new HashMap<String, File>();\n BufferedReader manifestReader = new BufferedReader(new FileReader(manifest));\n String line;\n long totalLength = 0;\n while ((line = manifestReader.readLine()) != null)\n {\n if (line.startsWith(\"//\") || line.trim().isEmpty()) continue; // ignore comments\n StringTokenizer token = new StringTokenizer(line, \"@\");\n String destinationName = token.nextToken();\n String localName = token.nextToken();\n File f = new File(localName);\n if (!f.exists())\n {\n \tErrorPrinter.printError(ErrorCode.fileNotFound, \"file \" + localName + \" not found\");\n \tcontinue;\n }\n totalLength += f.length();\n files.put(destinationName, f);\n }\n manifestReader.close();\n\n dOut.writeInt(files.size());\n dOut.writeLong(totalLength);\n\n for (String s : files.keySet())\n {\n File f = files.get(s);\n \n try\n {\n // Send the name and length of the file\n dOut.writeUTF(s);\n dOut.writeLong(f.length());\n\n // Send the file over the network\n FileInputStream reader = new FileInputStream(f);\n byte[] buffer = new byte[BUFFER_SIZE];\n int numRead;\n long numSent = 0;\n while (numSent < f.length())\n {\n numRead = reader.read(buffer);\n dOut.write(buffer, 0, numRead);\n numSent += numRead;\n }\n\n reader.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Error sending file \" + f.getName());\n }\n }\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public static boolean addFile(TranslationFile bf) {\n System.out.println(\"File added to database.\");\n DatabaseOperations.addOrUpdateFileName(bf.getFileID(), bf.getFileName());\n String sql = \"INSERT OR REPLACE INTO corpus1(id, fileID, fileName, thai, english, committed, removed, rank) VALUES(?,?,?,?,?,?,?,?)\";\n\n try (Connection conn = DatabaseOperations.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n conn.setAutoCommit(false);\n\n // this makes sure that the segments in the file, when retrieved from the db, can be ordered in the proper order.\n // simply increments by 1 on each segment. \n int rank = 0;\n // keeps count of the number of segs added so that the SQL can run a batch transaction (which is much more efficient than individual transactions).\n // when i=1000, or at the last segment, the SQL is then run as one batch transaction.\n int i = 0;\n\n for (Segment seg : bf.getActiveSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"false\"\n pstmt.setInt(7, 0);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getActiveSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n\n // resetting counters\n i = 0;\n rank = 0;\n for (Segment seg : bf.getHiddenSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"true\"\n pstmt.setInt(7, 1);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getHiddenSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n conn.commit();\n return true;\n\n } catch (SQLException e) {\n System.out.println(\"AddFileAsBatch: \" + e.getMessage());\n return false;\n }\n }", "@Override\n\tpublic void action() throws DPFTRuntimeException {\n\t\tDPFTAction prev_action = this.getPreviousAction();\n\t\tHashMap<String, String> file_out_list = new HashMap<String, String>();\n\t\tHashMap<String, String> file_charset_list = new HashMap<String, String>();\n\t\tsuccess_ftp_files.clear();\n\t\tif(prev_action instanceof DPFTActionTableWatch){\n\t\t\tDPFTDboSet rs = prev_action.getResultSet();\n\t\t\t\n//\t\t\tif(rs.count() > 0){\n\t\t\t\t/*has data to write out*/\n\t\t\t\tinitMetaSetting();\n\t\t\t\tDPFTFileFormatter formatter = getFileFormatter();\n\t\t\t\tif(formatter == null)\n\t\t\t\t\tthrow new DPFTInvalidSystemSettingException(\"SYSTEM\", \"DPFT0012E\");\n\t\t\t\t\n\t\t\t\tformatter.setFileEncoding(getFileEncoding());\n\t\t\t\tformatter.format(rs);\t\t\t\n\t\t\t\tfile_out_list = formatter.getFormatFileList();\n\t\t\t\tfile_charset_list = formatter.getFormatFileCharset();\n\t\t\t\t\n\t\t\t\tHashMap<DPFTFileFormatter, DPFTFileFTPUtil> fmtrs = getAdditionalDataFormatters();\n\t\t\t\tif(fmtrs != null){\n\t\t\t\t\tDPFTLogger.info(this, \"Output additional data file...\");\n\t\t\t\t\tfor(DPFTFileFormatter fmtr: fmtrs.keySet()){\n\t\t\t\t\t\tif(fmtr == null)\n\t\t\t\t\t\t\tthrow new DPFTInvalidSystemSettingException(\"SYSTEM\", \"DPFT0012E\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tfmtr.format(rs);\n\t\t\t\t\t\tHashMap<String, String> fl = fmtr.getFormatFileList();\n\t\t\t\t\t\tHashMap<String, String> fc = fmtr.getFormatFileCharset();\n\t\t\t\t\t\tfor(String k1 : fl.keySet()){\n\t\t\t\t\t\t\tfile_out_list.put(k1, fl.get(k1));\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String k2 : fc.keySet()){\n\t\t\t\t\t\t\tfile_out_list.put(k2, fc.get(k2));\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/*Write out files*/\n\t\t\t\tdoFileOut(file_out_list, file_charset_list);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*Compress file to .zip format if needed*/\n\t\t\t\tString[] flist = null;\n\t\t\t\tif(formatter.needDataCompression())\n\t\t\t\t\tflist = doZipFiles(formatter.retrieveDataCompressionInfo(), formatter.getZFileName());\n\t\t\t\telse\n\t\t\t\t\tflist = formatter.getFiles();\n\t\t\t\t\t\n\t\t\t\t/*FTP*/\n\t\t\t\tDPFTFileFTPUtil ftpUtil = getFTPUtil();\n\t\t\t\tif(ftpUtil != null){\n\t\t\t\t\tString[] ctrl_list = formatter.getControlFiles();\n\t\t\t\t\tgetFTPUtil().doFTP_Out(ctrl_list, flist);\n\t\t\t\t\tsuccess_ftp_files.add(flist[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Compress Additional files to .zip format if needed*/\n\t\t\t\tif(fmtrs != null){\n\t\t\t\t\tfor(DPFTFileFormatter fmtr: fmtrs.keySet()){\n\t\t\t\t\t\tString[] addi_flist = null;\n\t\t\t\t\t\tif(fmtr.needDataCompression())\n\t\t\t\t\t\t\taddi_flist = doZipFiles(fmtr.retrieveDataCompressionInfo(), fmtr.getZFileName());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\taddi_flist = fmtr.getFiles();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t/*FTP*/\n\t\t\t\t\t\tDPFTFileFTPUtil addi_ftpUtil = fmtrs.get(fmtr);\n\t\t\t\t\t\tif(addi_ftpUtil != null){\n\t\t\t\t\t\t\tString[] ctrl_list = fmtr.getControlFiles();\n\t\t\t\t\t\t\taddi_ftpUtil.doFTP_Out(ctrl_list, addi_flist);\n\t\t\t\t\t\t\tsuccess_ftp_files.add(addi_flist[0]);\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\tthis.changeActionStatus(GlobalConstants.DPFT_ACTION_STAT_COMP);\n\t}", "@Override\n public void run() {\n OutputStream outputStream = driveContents.getOutputStream();\n Writer writer = new OutputStreamWriter(outputStream);\n try {\n writer.write(\"Hello abhay!\");\n writer.close();\n } catch (IOException e) {\n Log.e(TAG, e.getMessage());\n }\n\n MetadataChangeSet changeSet = new MetadataChangeSet.Builder()\n .setTitle(\"abhaytest2\")\n .setMimeType(\"text/plain\")\n .setStarred(true).build();\n\n // create a file in root folder\n Drive.DriveApi.getRootFolder(mGoogleApiClient)\n .createFile(mGoogleApiClient, changeSet, driveContents)\n .setResultCallback(fileCallback);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\t// if(StringUtils.isNotEmpty(empId)) {\n\t\t\t\t// filePath += \"/\" + empId;\n\t\t\t\t// }\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(EMPLOYEE_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (EmployeeDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\t// log.debug(\"Writing transaction record for Employee id :\"+\n\t\t\t\t\t\t// transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getEmpId());\n\t\t\t\t\t\trecord.add(transaction.getName());\n\t\t\t\t\t\trecord.add(transaction.getDesignation());\n\t\t\t\t\t\trecord.add(transaction.getManagerName());\n\t\t\t\t\t\trecord.add(transaction.getProjectName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getActive());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public void addExternalFilesCP(File f) { externalFilesCP.add(f); }", "public void appendLogFile(String str)\n{\n if(fileWriter != null)\n {\n try { \n \n fileWriter.append(str); \n \n } catch (Exception e) { \n \n System.out.println(\"Error in CsvFileWriter !!!\"); \n e.printStackTrace(); \n \n } finally { \n \n try {\n \n fileWriter.flush(); \n //fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n } \n }\n}", "public void commit()\n\t{\n\t\tif (committed)\n\t\t\treturn;\n\t\t// handle the error case first\n\t\tif (error)\n\t\t{\n//\t\t\tSystem.out.println(\"Error - removing \" + source + \" and \" + generates);\n\t\t\tif (source.exists())\n\t\t\t\tsource.delete();\n\t\t\tif (generates.exists())\n\t\t\t\tgenerates.delete();\n\t\t}\n\t\telse if (source.exists() && generates.exists()) // the typical something might have changed case\n\t\t{\n\t\t\tif (dirty)\n\t\t\t{ // they are different, move ...\n//\t\t\t\tSystem.out.println(\"Built - moving \" + generates + \" to \" + source);\n\t\t\t\tboolean fd = source.delete();\n\t\t\t\tif (!fd)\n\t\t\t\t\tthrow new UtilException(\"Could not delete the file \" + source + \" when renaming \" + generates);\n\t\t\t\tboolean renameWorked = generates.renameTo(source);\n\t\t\t\tif (!renameWorked)\n\t\t\t\t\tthrow new UtilException(\"Could not rename \" + generates + \" to \" + source);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n//\t\t\t\tSystem.out.println(\"No change - removing \" +generates);\n\t\t\t\t// they're the same, the new one is uninteresting\n\t\t\t\tgenerates.delete();\n\t\t\t}\n\t\t}\n\t\telse if (!source.exists() && generates.exists()) // we didn't have a comparison file\n\t\t{\n//\t\t\tSystem.out.println(\"Clean build - saving \" + generates + \" as \" + source);\n\t\t\tboolean renameWorked = generates.renameTo(source);\n\t\t\tif (!renameWorked)\n\t\t\t\tthrow new UtilException(\"Could not rename \" + generates + \" to \" + source);\n\t\t}\n\t\telse\n\t\t\tthrow new UtilException(\"I don't think this case should be able to happen: Comparing \" + source + (source.exists()?\"(exists)\":\"(missing)\") + \" \" + generates + (generates.exists()?\"(exists)\":\"(missing)\"));\n\t\tcommitted = true;\n\t}", "@Override\n public void executeEvent() {\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n }", "@Override\n public synchronized void handleThreadRecursionHasCompleted() {\n //ensure that all branches have been explored before writing output\n this.numberOfBranchesCompleted++;\n RecursionStore.updateBranchesComplete(this.numberOfBranchesCompleted);\n if (this.numberOfBranchesCompleted != this._totalNumberOfStateTreeBranches) {\n return;\n }\n // write output file\n generateOutputAndClose();\n }", "@Override\n public void run(){\n int status = 0;\n try{\n FileWriter writer = new FileWriter(file);\n writer.append(data);\n writer.flush();\n writer.close();\n Log.d(\"MainActivity\",\"File saved to \"+file.getAbsolutePath());\n //Log.v(\"DataActivity\", data);\n status = 1;\n }catch (IOException e){\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n Message msg = new Message();\n msg.what = status;\n msg.obj = file.getAbsolutePath();\n msg.arg1 = type;\n Log.d(\"File\", file.getAbsolutePath());\n if (writeToFileHandler != null){\n writeToFileHandler.sendMessage(msg);\n }\n }", "public void run()\r\n {\n setErrors(0);\r\n if (!setStatus(\"INITIALIZING\"))\r\n {\r\n return;\r\n }\r\n\r\n String _dirAnalysis = _file.getParent();\r\n String _baseName = FileUtil.getBaseName(_file);\r\n File dirWork = new File(_dirAnalysis, _baseName + \".import.work\");\r\n File workFile = new File(dirWork.getAbsolutePath(), _file.getName());\r\n\r\n boolean completeStatus = false;\r\n try\r\n {\r\n if (!dirWork.exists() && !dirWork.mkdir())\r\n {\r\n getLogger().error(\"Failed create working folder \"+dirWork.getAbsolutePath()+\".\");\r\n return;\r\n }\r\n\r\n try\r\n {\r\n FileUtils.copyFile(_file, workFile);\r\n }\r\n catch (IOException x)\r\n {\r\n getLogger().error(\"Failed to move Mascot result file to working folder as \"+workFile.getAbsolutePath(), x);\r\n return;\r\n }\r\n\r\n // let's import the .dat file\r\n super.run();\r\n if (getErrors() == 0)\r\n {\r\n\r\n if (!workFile.delete())\r\n {\r\n getLogger().error(\"Failed to delete \" + workFile.getAbsolutePath());\r\n return;\r\n }\r\n else if (!dirWork.delete())\r\n {\r\n getLogger().error(\"Failed to delete \" + dirWork.getAbsolutePath());\r\n return;\r\n }\r\n else\r\n {\r\n setStatus(TaskStatus.complete);\r\n }\r\n completeStatus = true;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n getLogger().error(\"MS2 import failed\", e);\r\n }\r\n finally\r\n {\r\n if (!completeStatus)\r\n {\r\n setStatus(TaskStatus.error);\r\n }\r\n if (workFile.exists())\r\n {\r\n workFile.delete();\r\n }\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\tHSSFWorkbook wb = null;\n\t\tHSSFWorkbook outWb = new HSSFWorkbook();\n\t\ttry {\n\t\t\twb = new HSSFWorkbook(new FileInputStream(options.getInputFile()));\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(wb != null) {\n\t\t\tHSSFSheet newSheet = outWb.createSheet(\"copy\");\n\t\t\t// copy sheet from original file\n\t\t\tExcelUtil.copySheets(newSheet, wb.getSheetAt(0));\n\t\t\tgroupRows(newSheet);\n\t\t\tList<Integer> errorRows = processData(newSheet);\n\t\t\tcreateReport(outWb, errorRows);\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t// write file\n\t\tFileOutputStream fileOut = null;\n\t\ttry {\n\t\t\tfileOut = new FileOutputStream(\"workbook.xls\");\n\t\t\toutWb.write(fileOut);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\t\t\t \n\t\t try {\n\t\t\t\tfileOut.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} \n\t\t\n\t}", "private void finalizeFileSystemFile() throws IOException {\n Path finalConfigPath = getFinalConfigPath(tempConfigPath);\n fileSystem.rename(tempConfigPath, finalConfigPath);\n LOG.info(\"finalize temp configuration file successfully, finalConfigPath=\"\n + finalConfigPath);\n }", "@Override\n\t\t\t\tprotected void apply(List<Entry<WyilFile>> matches, Collection<Task> tasks) throws IOException {\n\t\t\t\t\tJavaScriptCompileTask task = new JavaScriptCompileTask(project, binary, matches.get(0));\n\t\t\t\t\ttask.setDebug(debug);\n\t\t\t\t\ttask.setIncludes(jsIncludes);\n\t\t\t\t\ttasks.add(task);\n\t\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (AttendanceDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for Employee id :\" + transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getCreatedDate());\n\t\t\t\t\t\trecord.add(String.valueOf(transaction.getEmployeeEmpId()));\n\t\t\t\t\t\trecord.add(transaction.getEmployeeFullName());\n\t\t\t\t\t\trecord.add(DateUtil.convertUTCToIST(transaction.getCheckInTime()));\n\t\t\t\t\t\trecord.add(DateUtil.convertUTCToIST(transaction.getCheckOutTime()));\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\t\n\tvoid merge() throws IOException\n\t{\n\t\tdouble startup = Util.curtime();\n\t\t_logMail.pf(\"Starting merge operation for dataset %s\\n\", _segDataQ.getDataSet());\n\t\tString dropcutoff = TimeUtil.nDaysBefore(_dayCode, 60);\n\t\t\n\t\tBufferedWriter pwrite = _segDataQ.getPathMan().getGimpWriter(_dayCode);\n\t\t\n\t\tint writecount = 0;\n\t\t\n\t\twhile(_segDataQ.hasNext())\n\t\t{\n\t\t\tSegmentPack bupnext = _segDataQ.nextPack();\n\t\t\t\n\t\t\twhile(!_sortFileMap.isEmpty() && _sortFileMap.firstKey().compareTo(bupnext.wtpid) < 0)\n\t\t\t{\n\t\t\t\t// This is a new WTP id that is not in the Master file, and was found for the first time today\n\t\t\t\tMap.Entry<String, List<String>> ent = _sortFileMap.pollFirstEntry();\n\t\t\t\t\n\t\t\t\tSegmentPack bupnew = _segDataQ.buildEmpty(ent.getKey());\n\t\t\t\tbupnew.integrateNewData(ent.getValue(), _dayCode);\n\t\t\t\twritecount += bupnew.write(pwrite, dropcutoff);\n\t\t\t\t_newUsers++;\n\t\t\t\t_newTotal++;\n\t\t\t}\n\t\t\t\n\t\t\tif(!_sortFileMap.isEmpty() && _sortFileMap.firstKey().equals(bupnext.wtpid))\n\t\t\t{\n\t\t\t\t// Here there is data in both the Master file and the day's slurped data\n\t\t\t\tMap.Entry<String, List<String>> ent = _sortFileMap.pollFirstEntry();\n\t\t\t\tbupnext.integrateNewData(ent.getValue(), _dayCode);\n\t\t\t\t_updateUsers++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t_noUpdateUsers++;\t\n\t\t\t}\n\t\t\t\n\t\t\t_newTotal++;\n\t\t\twritecount += bupnext.write(pwrite, dropcutoff);\n\t\t\t\n\t\t\tif((_segDataQ.getPollUserCount() % 10000) == 0)\n\t\t\t{\n\t\t\t\tUtil.pf(\".\");\n\t\t\t\t//double userpersec = bqueue.polledUsers /((Util.curtime()-startup)/1000);\n\t\t\t\t//Util.pf(\"Finished with %d users, %.03f users per second\\n\",\n\t\t\t\t//\tbqueue.polledUsers, userpersec);\n\t\t\t}\n\t\t}\n\t\t\n\t\tUtil.pf(\"\\n\");\n\t\t\n\t\twhile(!_sortFileMap.isEmpty())\n\t\t{\n\t\t\t// Write out remaining data.\n\t\t\tMap.Entry<String, List<String>> ent = _sortFileMap.pollFirstEntry();\n\t\t\t\n\t\t\tSegmentPack bupnew = _segDataQ.buildEmpty(ent.getKey());\n\t\t\tbupnew.integrateNewData(ent.getValue(), _dayCode);\t\t\t\n\t\t\t\t\t\n\t\t\t// TODO: this doesn't inform us about whether or not a user actually has any data associated with him\n\t\t\twritecount += bupnew.write(pwrite, dropcutoff);\t\n\t\t\t_newTotal++;\t\t\t\t\n\t\t}\n\t\t\n\t\tpwrite.close();\n\t\t\n\t\t// TODO: put these stats back in\n\t\t_logMail.pf(\"Finished merge, stats: \\n\\t%d updated users\\n\\t%d non-updated\\n\\t%d prev total\\n\\t%d new total\\n\",\n\t\t\t_updateUsers, _noUpdateUsers, _segDataQ.polledUsers, _newTotal);\n\t\t\n\t\t_logMail.pf(\"Master file size: \\n%d lines before\\n%d lines after\\n\", _segDataQ.linesRead, writecount);\n\t\t\n\t}", "private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}", "public void createPatient() throws IOException\n {\n addPatientToList();\n \n //creates the patient's empty folders and files\n File userFolder = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB); \n File patientEvaluation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm\");\n File patientProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressNotes\"); \n \n try\n \t{\n \tuserFolder.mkdir();\n patientEvaluation.mkdir();\n patientProgressReports.mkdir();\n \t//result = true;\n \t} \n \tcatch(SecurityException se)\n \t{\n \t//handle it\n \t} \n \t\n File listOfProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressReports.txt\");\n FileWriter writer = new FileWriter(listOfProgressReports, true);\t \n BufferedWriter bufferedreader = new BufferedWriter(writer);\n writer.append(\"\");\n bufferedreader.close();\n writer.close();\n \n \n /*if(result) \n \t{ \n \t\tSystem.out.println(\"DIR created\"); \n \t}*/\n \n //creates the patient's empty evaluation form files\n File signedStatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signed.txt\");\n FileWriter w = new FileWriter(signedStatus, true);\t \n BufferedWriter b = new BufferedWriter(w);\n w.append(\"false\");\n b.close();\n w.close();\n \n File firstName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/first.txt\");\n FileWriter writ = new FileWriter(firstName, true);\t \n BufferedWriter bw = new BufferedWriter(writ);\n writ.append(currentPatientFirstName);\n bw.close();\n writ.close();\n \n File lastName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/last.txt\");\n FileWriter writ1 = new FileWriter(lastName, true);\t \n BufferedWriter bw1 = new BufferedWriter(writ1);\n writ1.append(currentPatientLastName);\n bw1.close();\n writ1.close();\n \n File age = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/age.txt\");\n FileWriter writ2 = new FileWriter(age, true);\t \n BufferedWriter bw2 = new BufferedWriter(writ2);\n writ2.append(\"\");\n bw2.close();\n writ2.close();\n \n File dob = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/dateofbirth.txt\");\n FileWriter writ3 = new FileWriter(dob, true);\t \n BufferedWriter bw3 = new BufferedWriter(writ3);\n writ3.append(\"\");\n bw3.close();\n writ3.close();\n \n File maritalstatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/maritalstatus.txt\");\n FileWriter writ4 = new FileWriter(maritalstatus, true);\t \n BufferedWriter bw4 = new BufferedWriter(writ4);\n writ4.append(\"\");\n bw4.close();\n writ4.close();\n \n File ethnicity = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity.txt\");\n FileWriter writ5 = new FileWriter(ethnicity, true);\t \n BufferedWriter bw5 = new BufferedWriter(writ5);\n writ5.append(\"\");\n bw5.close();\n writ5.close();\n\n File ethnicityother = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity-other.txt\");\n FileWriter writt = new FileWriter(ethnicityother, true);\t \n BufferedWriter bww = new BufferedWriter(writt);\n writt.append(\"\");\n bww.close();\n writt.close();\n \n File sex = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sex.txt\");\n FileWriter writ6 = new FileWriter(sex, true);\t \n BufferedWriter bw6 = new BufferedWriter(writ6);\n writ6.append(\"\");\n bw6.close();\n writ6.close();\n \n File referredBy = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby.txt\");\n FileWriter writ7 = new FileWriter(referredBy, true);\t \n BufferedWriter bw7 = new BufferedWriter(writ7);\n writ7.append(\"\");\n bw7.close();\n writ7.close();\n \n File referredByTherapist = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-therapist.txt\");\n FileWriter writ8 = new FileWriter(referredByTherapist, true);\t \n BufferedWriter bw8 = new BufferedWriter(writ8);\n writ8.append(\"\");\n bw8.close();\n writ8.close();\n \n File referredByOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-other.txt\");\n FileWriter writ9 = new FileWriter(referredByOther, true);\t \n BufferedWriter bw9 = new BufferedWriter(writ9);\n writ9.append(\"\");\n bw9.close();\n writ9.close();\n \n //dr. prince\n File reasonForReferral = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reasonforreferral.txt\");\n FileWriter writ10 = new FileWriter(reasonForReferral, true);\t \n BufferedWriter bw10 = new BufferedWriter(writ10);\n writ10.append(\"\");\n bw10.close();\n writ10.close();\n \n File sourceOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation.txt\");\n FileWriter writ11 = new FileWriter(sourceOfInformation, true);\t \n BufferedWriter bw11 = new BufferedWriter(writ11);\n writ11.append(\"\");\n bw11.close();\n writ11.close();\n \n File sourceOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation-other.txt\");\n FileWriter writ12 = new FileWriter(sourceOfInformationOther, true);\t \n BufferedWriter bw12 = new BufferedWriter(writ12);\n writ12.append(\"\");\n bw12.close();\n writ12.close();\n \n File reliabilityOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation.txt\");\n FileWriter writ13 = new FileWriter(reliabilityOfInformation, true);\t \n BufferedWriter bw13 = new BufferedWriter(writ13);\n writ13.append(\"\");\n bw13.close();\n writ13.close();\n \n File reliabilityOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation-other.txt\");\n FileWriter writ14 = new FileWriter(reliabilityOfInformationOther, true);\t \n BufferedWriter bw14 = new BufferedWriter(writ14);\n writ14.append(\"\");\n bw14.close();\n writ14.close();\n \n File historyOfPresentIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/historyofpresentillness.txt\");\n FileWriter writ15 = new FileWriter(historyOfPresentIllness, true);\t \n BufferedWriter bw15 = new BufferedWriter(writ15);\n writ15.append(\"\");\n bw15.close();\n writ15.close();\n \n File signsSymptoms = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signsandsymptoms.txt\");\n FileWriter writ16 = new FileWriter(signsSymptoms, true);\t \n BufferedWriter bw16 = new BufferedWriter(writ16);\n writ16.append(\"\");\n bw16.close();\n writ16.close();\n \n File currentMedications = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/currentmedications.txt\");\n FileWriter writ17 = new FileWriter(currentMedications, true);\t \n BufferedWriter bw17 = new BufferedWriter(writ17);\n writ17.append(\"\");\n bw17.close();\n writ17.close();\n \n File pastHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryof.txt\");\n FileWriter writ18 = new FileWriter(pastHistoryOf, true);\t \n BufferedWriter bw18 = new BufferedWriter(writ18);\n writ18.append(\"\");\n bw18.close();\n writ18.close();\n \n File pastHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryoftext.txt\");\n FileWriter writ19 = new FileWriter(pastHistoryOfText, true);\t \n BufferedWriter bw19 = new BufferedWriter(writ19);\n writ19.append(\"\");\n bw19.close();\n writ19.close();\n \n File medicationTrialsTable = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialstable.txt\");\n FileWriter writ20 = new FileWriter(medicationTrialsTable, true);\t \n BufferedWriter bw20 = new BufferedWriter(writ20);\n writ20.append(\"\");\n bw20.close();\n writ20.close();\n \n File medicationTrialsComments = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialscomments.txt\");\n FileWriter writ21 = new FileWriter(medicationTrialsComments, true);\t \n BufferedWriter bw21 = new BufferedWriter(writ21);\n writ21.append(\"\");\n bw21.close();\n writ21.close();\n \n File substanceUseHistory = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/substanceusehistory.txt\");\n FileWriter writ22 = new FileWriter(substanceUseHistory, true);\t \n BufferedWriter bw22 = new BufferedWriter(writ22);\n writ22.append(\"\");\n bw22.close();\n writ22.close();\n \n File deniesHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryof.txt\");\n FileWriter writ23 = new FileWriter(deniesHistoryOf, true);\t \n BufferedWriter bw23 = new BufferedWriter(writ23);\n writ23.append(\"\");\n bw23.close();\n writ23.close();\n \n File deniesHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryoftext.txt\");\n FileWriter writ24 = new FileWriter(deniesHistoryOfText, true);\t \n BufferedWriter bw24 = new BufferedWriter(writ24);\n writ24.append(\"\");\n bw24.close();\n writ24.close();\n \n File socialHistoryText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorytext.txt\");\n FileWriter writ25 = new FileWriter(socialHistoryText, true);\t \n BufferedWriter bw25 = new BufferedWriter(writ25);\n writ25.append(\"\");\n bw25.close();\n writ25.close();\n \n File socialHistoryParents = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistoryparents.txt\");\n FileWriter writ26 = new FileWriter(socialHistoryParents, true);\t \n BufferedWriter bw26 = new BufferedWriter(writ26);\n writ26.append(\"\");\n bw26.close();\n writ26.close();\n \n File socialHistorySiblings = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorysiblings.txt\");\n FileWriter writ27 = new FileWriter(socialHistorySiblings, true);\t \n BufferedWriter bw27 = new BufferedWriter(writ27);\n writ27.append(\"\");\n bw27.close();\n writ27.close();\n \n File socialHistoryChildren = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorychildren.txt\");\n FileWriter writ28 = new FileWriter(socialHistoryChildren, true);\t \n BufferedWriter bw28 = new BufferedWriter(writ28);\n writ28.append(\"\");\n bw28.close();\n writ28.close();\n \n File familyHistoryOfMentalIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/familyhistoryofmentalillness.txt\");\n FileWriter writ29 = new FileWriter(familyHistoryOfMentalIllness, true);\t \n BufferedWriter bw29 = new BufferedWriter(writ29);\n writ29.append(\"\");\n bw29.close();\n writ29.close();\n \n }", "@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }", "public void processFile() {\r\n\t\t//process word count here\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\tString line;\r\n\t\twordCount = customFile.getWordCount();\r\n\t\tList<Future<Long>> listOfFutures = new ArrayList<Future<Long>>();\r\n\t\t// Choose the executor and the number of threads that best suits the processor and purpose\r\n\t\t// work stealing pool took about 875 ms, cached threadpool too about 1100 ms\r\n\t\t// fixed thread pool took about 1000 ms with 10 threads and 840ms with 4 threads\r\n\t\t\r\n\t\t// ExecutorService executor = Executors.newCachedThreadPool();\r\n\t\t// ExecutorService executor = Executors.newWorkStealingPool();\r\n\t\t ExecutorService executor = Executors.newFixedThreadPool(4); \r\n\t\t\r\n\t\ttry (BufferedReader bufferedReader = new BufferedReader(new FileReader(customFile.getFile()))) {\r\n\t\t\twhile((line= bufferedReader.readLine()) != null) {\r\n\t\t\t\tline = line.trim();\r\n\t\t\t\tline = line.toLowerCase();\r\n\t\t\t\tif(line == \"\") continue;\r\n\t\t\t\tsetOfLines.put(line);\r\n\t\t\t\tFuture<Long> future = executor.submit(this);\r\n\t\t\t\tlistOfFutures.add(future);\r\n\t\t\t\t}\r\n\t\t\t// wait until all the futures return.\r\n\t\t\tfor (Future <Long> future : listOfFutures) {\r\n\t\t\t\tfuture.get();\r\n\t\t\t}\r\n\t\t\t// stop accepting new tasks, close the executor\r\n\t\t\texecutor.shutdown();\r\n\t\t}\r\n\t\tcatch (IOException e1) {\r\n\t\t\tcustomFile.setErrorString(\"There was an error reading this file, the file could be open or\"\r\n\t\t\t\t\t+ \" blocked by other resources\");\r\n\t\t\tlogger.error(e1);\r\n\t\t}\r\n\t\tcatch (ExecutionException |InterruptedException e1) { \r\n\t\t\tcustomFile.setErrorString(\"Unknown error occured while reading this file\");\r\n\t\t\tlogger.error(e1);\r\n\t\t}\r\n\r\n\t\tfor(String word : wordCount.keySet() ) {\r\n\t\t\ttotalWords = totalWords + wordCount.get(word);\r\n\t\t\tif(wordCount.get(word)<thresholdForWordRepetition) {\r\n\t\t\t\t\twordCount.remove(word);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tlogger.debug(\"total words = \" + totalWords) ;\r\n\t\tcustomFile.setTotalWords(totalWords);\r\n\t\tif(totalWords>thresholdForLongFile) {\r\n\t\t\tcustomFile.setWordCount(wordCount);\r\n\t\t\tparentLongFilesList.add(customFile);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcustomFile.setWordCount(null);\r\n\t\t\tparentShortFilesList.add(customFile);\r\n\t\t}\r\n\t\tlong stopTime = System.currentTimeMillis();\r\n\t long elapsedTime = stopTime - startTime;\r\n\t logger.debug(\"processed file \"+ customFile.getName() + \" in \" + elapsedTime + \"ms\");\r\n\t}", "public Long putFile(ExtFileObjectCom extFile)\r\n \t{ \r\n \t\tif (extFile== null)\r\n \t\t\tthrow new ExternalFileMgrException(ERR_EMPTY_EXTFILE);\r\n \t\tif (extFile.getFile()== null)\r\n \t\t\tthrow new ExternalFileMgrException(ERR_NO_FILE);\r\n \r\n logger.debug(\"calling putFile(\"+extFile.getFile().getName()+\") was called...\");\r\n \t\t\r\n \t\t//Datei in den Branch kopieren\r\n \t\tString strBranch= extFile.getBranch();\r\n \t\tFile branch= new File(this.externalDataFolder, strBranch);\r\n \t\tif (!branch.exists())\r\n \t\t\tthrow new ExternalFileMgrException(ERR_BRANCH_NOT_EXIST+ branch);\r\n \t\t\r\n \t\t//writing bytes to new file\r\n \t\tFile outFile= this.createNewFileName(branch, extFile.getFileName());\r\n \t\t\r\n \t\ttry {\r\n \t\t\textFile.getFile(outFile.getCanonicalPath());\r\n \t\t} catch (IOException e) {\r\n \t\t\tthrow new ExternalFileMgrException(e);\r\n \t\t}\r\n \t\t\r\n \t\tExtFileObjectDAO extFileDao= new ExtFileObjectImpl(extFile, outFile.getName());\r\n \t\treturn(externalFileMgrDao.putExtFile(extFileDao));\r\n \t}", "public static void write() throws Exception {\r\n \tif (FTPManager.upload())\r\n \t\tSystem.out.println(\"Written.\");\r\n \telse\r\n \t\tSystem.out.println(\"Failed.\");\r\n }", "void flush() {\r\n synchronized (sync) {\r\n updatedFiles.clear();\r\n }\r\n }", "public void getFile(){\n\t\t\n\t\tParser parser = new Parser(f, this, taskPool);\n\t\tWorker w;\n\t\tfor (int i = 0; i < this.getTasks().getNumWorker(); i++){\n\t\t\t w = new Worker(position, this);\n\t\t\t w.setWorkerNum(i);\n\t\t\t workers.add(w);\n\t\t\t} \n\t\t\n\t\tworkPanel = new WorkPanel(tasks, this, workers);\n\t\tworkPanel.setBounds(0, 0, 600, 600);\n\t\tThread twp = new Thread(workPanel);\n\t\ttwp.start();\n\n\t\tmainPanel.add(workPanel);\n\t\t\n\t\t\tfor (int k = 0; k < workers.size(); k++){\n\t\t\t\tworkers.get(k).start();\n\t\t\t}\n\n\t}", "@Override\r\n\tpublic void Write_text(String CustomerCode, String Device, String Lot, String CP, File DataSorce,String FileName)\r\n\t\t\tthrows IOException {\n\t\tFile[] Filelist=DataSorce.listFiles();\r\n\t\tfor (int k = 0; k < Filelist.length; k++) {\t\t\t\t\t\r\n\t\t\tparseRawdata parseRawdata=new parseRawdata(Filelist[k]);\r\n\t\t\tLinkedHashMap<String, String> properties=parseRawdata.getProperties();\r\n\t\t\t\r\n\t\t\tString Wafer_ID_R=properties.get(\"Wafer ID\");\r\n\t\t\tString waferid=properties.get(\"Wafer ID\");\r\n\t\t\tString[][] MapCell_R=parseRawdata.getAllDiesDimensionalArray();\r\n\t\t\tString Flat_R=null;\r\n\t\t\tString notch=properties.get(\"Notch\");\r\n\t\t\tif (notch.equals(\"0-Degree\")) {\r\n\t\t\t\tFlat_R=\"Up\";\r\n\t\t\t}else if (notch.equals(\"90-Degree\")) {\r\n\t\t\t\tFlat_R=\"Right\";\r\n\t\t\t}else if (notch.equals(\"180-Degree\")) {\r\n\t\t\t\tFlat_R=\"Down\";\r\n\t\t\t}else {\r\n\t\t\t\tFlat_R=\"Left\";\r\n\t\t\t}\r\n\t\t\tInteger PassDie_R=Integer.parseInt(properties.get(\"Pass Die\"));\t\r\n\t\t\tInteger RightID_R=Integer.valueOf(properties.get(\"RightID\"));\r\n\t\t\tInteger Col_R=(Integer.parseInt(properties.get(\"Map Cols\"))) ;\r\n\t\t\tInteger Row_R=(Integer.parseInt(properties.get(\"Map Rows\")));\r\n\t\t\t\r\n\t\t\tMapCell_R=TurnNighteenDegree.turnNegativeNighteen(MapCell_R, Row_R, Col_R);\t\t\r\n\t\t\tInteger temp=Row_R;\r\n\t\t\tRow_R=Col_R;\r\n\t\t\tCol_R=temp;\r\n\t\t\t\r\n\t\t\tString FailDie_R=properties.get(\"Fail Die\");\r\n\t\t\tString FinalID=RightID_R.toString();\r\n\t\t\tString TestStartTime_R=properties.get(\"Test Start Time\");\r\n\t\t\tString Wafer_Load_Time_R=properties.get(\"Test Start Time\");\r\n\t\t\tTreeMap<Integer, Integer> Bin_Summary_R=parseRawdata.getBinSummary();\r\n\t\t\tString OPerater_R=properties.get(\"Operator\");\r\n\t\t\tString Yeild_R=properties.get(\"Wafer Yield\");\r\n\t\t\tString TestEndTime_R=properties.get(\"Test End Time\");\r\n\t\t\tInteger gross_die=Integer.parseInt(properties.get(\"Gross Die\"));\r\n\t\t\tString waferSize_R=properties.get(\"WF_Size\");\r\n\t\t\tString slotId=properties.get(\"Slot\");\r\n\t\t\tTextReportModel9TurnN90 model1=new TextReportModel9TurnN90();\r\n\t\t\tString VERSION=\"NA\";\r\n\t\t\tif (RightID_R<10) {\r\n\t\t\t\tFinalID=\"0\"+RightID_R.toString();\r\n\t\t\t}\r\n\t\t\tHashMap<String, String> NameMap=model1.InitMap(Lot, FinalID, CP, Wafer_Load_Time_R, Device, Wafer_ID_R, VERSION);\r\n\t\t\tSet<String> keyset1=NameMap.keySet();\r\n\t\t\tString FinalName=FileName;\r\n\t\t\tfor (String key : keyset1) {\r\n\t\t\t\tif (FinalName.contains(key)) {\r\n\t\t\t\t\tFinalName=FinalName.replace(key, NameMap.get(key));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tFile Result_Text=new File(reportBath+CustomerCode+\"/\"+Device+\"/\"+Lot+\"/\"+CP+\"/\"+FinalName);\r\n\r\n\t\t\tPrintWriter out=null;\r\n\t\t\ttry {\r\n\t\t\t\tout=new PrintWriter(new FileWriter(Result_Text));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tout.print(\" \");\r\n\t\t\tfor(int i = 1;i<Col_R;i++)\r\n\t\t\t{\r\n\t\t\t\tif (i<10) {\r\n\t\t\t\t\tout.print(\" 0\"+i);\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tout.print(\" \"+i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\" \");\r\n\t\t\tfor(int i = 1;i<Col_R;i++)\r\n\t\t\t{\r\n\t\t\t\tout.print(\"++-\");\r\n\t\t\t}\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tfor (int i = 0; i < Row_R; i++) {\r\n\t\t\t\tif (i<10) {\r\n\t\t\t\t\tout.print(\"00\"+i+\"|\");\r\n\t\t\t\t}else if (i>9&&i<100) {\r\n\t\t\t\t\tout.print(\"0\"+i+\"|\");\r\n\t\t\t\t}else {\r\n\t\t\t\t\tout.print(i+\"|\");\r\n\t\t\t\t}\r\n\t\t\t\tfor (int j = 0; j < Col_R; j++) {\r\n\t\t\t\t\tif (MapCell_R[i][j]==null) {\r\n\t\t\t\t\t\tout.print(String.format(\"%3s\",\" \"));\r\n\t\t\t\t\t}else if (MapCell_R[i][j].equals(\"S\")||MapCell_R[i][j].equals(\"M\")) {\r\n\t\t\t\t\t\tout.print(String.format(\"%3s\",\" \"));\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tif (Integer.valueOf(MapCell_R[i][j])>9) {\r\n\t\t\t\t\t\t\tout.print(String.format(\"%3s\", MapCell_R[i][j]));\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tout.print(String.format(\"%3s\", \"0\"+MapCell_R[i][j]));\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\tout.print(\"\\r\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tout.print(\"============ Wafer Information () ===========\"+\"\\r\\n\");\r\n\t\t\tout.print(\" Device: \"+Device+\"\\r\\n\");\r\n\t\t\tout.print(\" Lot NO: \"+Lot+\"\\r\\n\");\r\n\t\t\tout.print(\" Slot No: \"+(slotId.length()==1?\"0\"+slotId:slotId)+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer ID: \"+waferid+\"\\r\\n\");\r\n\t\t\tout.print(\" Operater: \"+OPerater_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Size: \"+waferSize_R+\" Inch\"+\"\\r\\n\");\r\n\t\t\tout.print(\" Flat Dir: \"+Flat_R+\"\\r\\n\");\r\n//\t\t\tif (Flat_R.equals(\"LEFT\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+270+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"RIGHT\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+90+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"UP\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+0+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"DOWN\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+180+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n\t\t\tout.print(\" Wafer Test Start Time: \"+TestStartTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Test Finish Time: \"+TestEndTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Load Time: \"+TestStartTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Unload Time: \"+TestEndTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Total test die: \"+gross_die+\"\\r\\n\");\r\n\t\t\tout.print(\" Pass Die: \"+PassDie_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Fail Die: \"+FailDie_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Yield: \"+Yeild_R+\"\\r\\n\");\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\" Bin (0~63) Data Deatil Summary\"+\"\\r\\n\");\r\n\t\t\tout.print(\"=======================================================================\"+\"\\r\\n\");\r\n\t\t \r\n\t\t\tString Bin_Sum=\"\";\r\n\t\t\tString Bin_yield_percent=\"\";\r\n\t\t\tfor (int i = 0; i < 64; i++) {\r\n\t\t\t\tString Every_Bininfor=\"\";\r\n\t\t\t\tInteger Sum=0;\r\n\t\t\t\tif (Bin_Summary_R.containsKey(i+1)) {\r\n\t\t\t\t\tSum=Bin_Summary_R.get(i+1);\r\n\t\t\t\t}\r\n\t\t\t\tfor(int j=0;j<5-(\"\"+Sum).length();j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEvery_Bininfor+=\"0\";\r\n\t\t\t\t}\r\n\t\t\t\tBin_Sum+=Every_Bininfor+Sum+\" | \";\r\n\t\t\t\tString percent=String.format(\"%.2f\", ((double)Sum*100/gross_die));\r\n\t\t\t\tif (percent.length()!=5) {\t\t\r\n\t\t\t\t\tpercent=\"0\"+percent;\r\n\t\t\t\t}\r\n\t\t\t\tBin_yield_percent+= percent+\"% | \";\r\n\t\t\t\t\r\n\t\t\t\tif ((i+1)>9) {\r\n\t\t\t\t\tout.print(\"Bin \"+(i+1)+\" | \");\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tout.print(\"Bin \"+(i+1)+\" | \");\r\n\t\t\t\t}\r\n\t\t\t\tif ((i+1)%8==0) {\r\n\t\t\t\r\n\t\t\t\t\tout.print(\"\\r\\n\");\t\t\r\n\t\t\t\t\tout.print(Bin_Sum);\r\n\t\t\t\t\tBin_Sum=\"\";\t\r\n\t\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t\t\tout.print(Bin_yield_percent);\r\n\t\t\t\t\tBin_yield_percent=\"\";\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tif ((i+1)%8==0) {\r\n\t\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t\t\tout.print(\"=======================================================================\"+\"\\r\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t\tFTP_Release(CustomerCode, Device, Lot, CP, Result_Text);\r\n\t\t}\r\n\r\n\t}", "@Override\n public void run() {\n updateTotalSizeOfFilesInDir(child);\n }", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public synchronized void addProjectCP(File f) { projectCP.add(f); }", "private void updateFile(CrowdinFile _file) {\n String fileN = _file.getFile().getName();\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Initializing: \" + fileN);\n // Making sure the file is a master file and not a translation\n if (_file.getClass().equals(CrowdinFile.class)) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Init dir\");\n initDir(_file.getCrowdinPath());\n try {\n if (_file.getFile().exists()) {\n \n //escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersBeforeSyncFromCodeToCrowdin\");\n \n if (!getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Add file: \" + _file.getCrowdinPath());\n String result = getHelper().addFile(_file);\n if (result.contains(\"success\")) {\n getLog().info(\"File \" + fileN + \" created succesfully.\");\n initTranslations(_file);\n } else {\n getLog().warn(\"Cannot create file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n }\n } else {\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"*** Update file: \" + _file.getCrowdinPath());\n }\n String result = getHelper().updateFile(_file);\n System.out.println(result);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" updated succesfully.\");\n else\n getLog().warn(\"Cannot update file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n \n //remove escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersAfterSyncFromCodeToCrowdin\");\n \n }\n } else {\n if (getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Delete file: \" + _file.getCrowdinPath());\n String result = getHelper().deleteFile(_file);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" deleted succesfully.\");\n else\n getLog().warn(\"Cannot delete file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n }\n }\n } catch (MojoExecutionException e) {\n getLog().error(\"Error while updating file '\" + _file.getFile().getPath() + \"'. Exception:\\n\" + e.getMessage());\n }\n }\n }", "void endCompilation()\n {\n this.componentEditor.requestFocus();\n this.componentEditor.requestFocusInWindow();\n this.actionCompile.setEnabled(true);\n this.compiling.set(false);\n }", "@Override\n public void prepare() {\n //Caching as file resource.\n File file = this.getResource().file;\n logger.info(\"Preparing {} streams for file: {}\", this.getTransferType(), file.getName());\n\n if (this.getTransferType() == ResourceTransferType.OUTBOUND) {\n //Sending\n try {\n buffer = new byte[BUFFER_SIZE];\n sent = 0;\n inputChannel = new FileInputStream(file).getChannel();\n inputBuffer = inputChannel.map(FileChannel.MapMode.READ_ONLY, 0, inputChannel.size());\n } catch (FileNotFoundException e) { //File doesn't exist.\n //Calling a transfer error.\n callError(e);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n //Receiving\n //Checking if file already exists.\n written = 0;\n saved = 0;\n if (getResource().isLocal()) {\n getResource().calcNetworkId();\n if (getResource().getNetworkID().equals(getTunnel().getDestination())) {\n //The file is already stored locally.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), -2));\n this.close();\n return;\n }\n }\n\n //Creating or replacing the file.\n buffer = new byte[BUFFER_SIZE * 16];\n if (file.exists()) {\n file.delete();\n }\n try { //Creating new file.\n file.createNewFile();\n outputStream = new FileOutputStream(file);\n } catch (IOException e) {\n //Calling a transfer error.\n callError(e);\n return;\n }\n\n //Requesting the first chunk.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), 0));\n }\n }", "public CreateInputFiles()\n\t{\n\t\ttry\n\t\t{\n\t\t\tEXCEL_FILE = new FileInputStream(new File(INPUT_FILE_NAME));\n\t\t\t/* Log File */\n\t\t\tLOG_WRITER = writerCreator(LOG_FILE, BLANK);\n\t\t\tLOG_WRITER.write(START_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\tSystem.out.println(NEW_LINE + START_TIME + new java.util.Date() + LINE_SEPERATOR);\n\n\t\t\t/* Service Part Creation */\n\t\t\tSERVICE_PART_WRITER = writerCreator(SERVICE_PARTS_CREATION_INPUT_FILE,\n\t\t\t\t\tSERVICE_PART_CREATION_CONFIG);\n\n\t\t\t/* Service Form Update */\n\t\t\tSERVICE_FORM_WRITER = writerCreator(SERVICE_FORM_PROPERTIES_INPUT_FILE,\n\t\t\t\t\tSERVICE_FORM_UPDATE_CONFIG);\n\n\t\t\t/* PS_UPLOAD - Service Structures Creation \n\t\t\tPS_STRUCTURE_WRITER = writerCreator(PS_STRUCTURE_CREATION_INPUT_FILE,\n\t\t\t\t\tPS_STRUCTURE_CREATION_CONFIG); */\n\n\t\t\t/* Service Structures Creation */\n\t\t\tSTRUCTURE_WRITER = writerCreator(STRUCTURE_CREATION_INPUT_FILE,\n\t\t\t\t\tSTRUCTURE_CREATION_CONFIG);\n\n\t\t\t/* EngParts' Service Form Creation and Attachment*/\n\t\t\tEP_SERVICE_FORM_WRITER = writerCreator(EP_SERVICE_FORM_CREATION_INPUT_FILE,\n\t\t\t\t\tEP_SERVICE_FORM_CREATION_CONFIG);\n\n\t\t\t/* Service Parts' Global Alternate */\n\t\t\tSP_GLOBAL_ALT_WRITER = writerCreator(SP_GLOBAL_ALT_INPUT_FILE, BLANK);\n\n\t\t\t/* Service Parts' Group ID update */\n\t\t\tSP_GROUP_ID_WRITER = writerCreator(SP_GROUP_ID_INPUT_FILE, SP_GROUP_ID_UPDATE_CONFIG);\n\n\t\t\t/* Relate Service Parts to three types of attachments*/\n\t\t\tSP_ATTACHMENT_WRITER = writerCreator(SP_ATTACHMENT_INPUT_FILE, SP_ATTACHMENT_CONFIG);\n\n\t\t\t/* Made From Relation Creation */\n\t\t\tMADE_FROM_RELATION_WRITER = writerCreator(MADE_FROM_REL_INPUT_FILE,\n\t\t\t\t\tMADE_FROM_REL_CONFIG);\n\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(EXCEPTION + e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void addSubmit(IFile file, IP4Connection connection)\n throws Exception {\n IP4File p4File = (IP4File) connection.getResource(file);\n if (p4File.getHeadRevision() > 0) {\n throw new Exception(\"Head revision greater than zero before adding\");\n }\n p4File.add(0);\n p4File.refresh();\n if (!p4File.openedForAdd()) {\n throw new Exception(\"File not opened for add\");\n }\n IP4PendingChangelist defaultList = connection.getPendingChangelist(0);\n defaultList.submit(\"Created random file\", new IP4File[] { p4File },new NullProgressMonitor());\n p4File.refresh();\n if (p4File.getHeadRevision() != 1) {\n throw new Exception(\"Head revision not 1 after submit\");\n }\n }", "@Override\n public void addJavaFileComment(CompilationUnit compilationUnit) {\n\n }" ]
[ "0.6585053", "0.64682657", "0.64465374", "0.608221", "0.5961005", "0.5836857", "0.57786506", "0.572178", "0.564374", "0.564374", "0.5640453", "0.5640453", "0.56158584", "0.5566822", "0.5566822", "0.55436975", "0.55176866", "0.55138147", "0.55068964", "0.5475743", "0.5461285", "0.54067314", "0.539595", "0.5382229", "0.5348083", "0.5347322", "0.5332137", "0.53273296", "0.5319271", "0.52887243", "0.5287856", "0.5285764", "0.5278477", "0.5208996", "0.52082443", "0.517994", "0.51736784", "0.5170181", "0.5169679", "0.51602966", "0.5155631", "0.51502794", "0.5140598", "0.513594", "0.5121148", "0.51124597", "0.5110876", "0.51086104", "0.50946814", "0.5073698", "0.5070949", "0.50670874", "0.5053975", "0.5046518", "0.5030148", "0.5025747", "0.5012659", "0.5008397", "0.50060546", "0.5004151", "0.4999007", "0.49959275", "0.49953806", "0.49910676", "0.49861446", "0.49860284", "0.49744105", "0.49743533", "0.49697095", "0.49682176", "0.4967885", "0.49663305", "0.49643636", "0.4958885", "0.49475488", "0.4947036", "0.4936128", "0.49255702", "0.4924946", "0.4924228", "0.49236417", "0.49196377", "0.49184382", "0.49162075", "0.49142933", "0.49045947", "0.49016735", "0.49009866", "0.48980805", "0.48975775", "0.48971513", "0.48937002", "0.4891355", "0.48910362", "0.48901847", "0.4887232", "0.48854247", "0.4873345", "0.48707303", "0.48672548", "0.48609337" ]
0.0
-1
The compilation thread calls this method to add a file to write. This will return (almost) immediately if the AsynchronousFileWriter is not "full." Otherwise, this method will write the files on the calling thread until the pending number of bytes has been reduced and then notify the asynchronous saving thread. The file writer thread will be started the first time this is called.
public abstract void addFileToWrite(AsynchronousFileWriter.FileData fileData, CompilerMessageLogger logger);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startFileWrite() {\r\n this.setStatus(false);\r\n this.isFileOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n }// run()\r\n });// Thread\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isFileOutStarted = false;\r\n }\r\n }", "public void FilesBufferWrite2Append() throws IOException {\n \ttry { \t\n \t\t\n \t \t/* This logic will check whether the file\n \t \t \t * exists or not. If the file is not found\n \t \t \t * at the specified location it would create\n \t \t \t * a new file*/\n \t \t \tif (!file.exists()) {\n \t \t\t file.createNewFile();\n \t \t \t}\n \t\t\n \t \t \t//KP : java.nio.file.Files.write - NIO is buffer oriented & IO is stream oriented!]\n \t\tString str2Write = \"\\n\" + LocalDateTime.now().toString() + \"\\t\" + outPrintLn + \"\\n\";\n \t\tFiles.write(Paths.get(outFilePath), str2Write.getBytes(), StandardOpenOption.APPEND);\n \t\t\n \t}catch (IOException e) {\n\t \t// TODO Auto-generated catch block\n\t \te.printStackTrace();\t\t\n\t\t\tSystem.out.print(outPrintLn);\n\t\t\tSystem.out.println(outPrintLn);\t\n \t}\n }", "@Override\n public void imageComplete() throws IOException {\n\tif (done) throw new IOException(errorMsg(\"imageComplete\"));\n\tdone = true;\n\tsynchronized(recorder) {\n\t continueWriting = true;\n\t recorder.notify();\n\t}\n\tsynchronized(this) {\n\t try {\n\t\twhile (writingDone == false) {\n\t\t wait();\n\t\t}\n\t } catch(InterruptedException ie) {\n\t\twriteException = ie;\n\t } catch (IllegalMonitorStateException ime) {\n\t\twriteException = ime;\n\t }\n\t if (writeException != null) {\n\t\tString msg = errorMsg(\"cannotCreateFST\", getType());\n\t\tthrow new\n\t\t IOException(msg, writeException);\n\t }\n\t}\n }", "public static RestorableTsFileIOWriter getWriterForAppendingDataOnCompletedTsFile(File file)\n throws IOException {\n long position = file.length();\n\n try (TsFileSequenceReader reader = new TsFileSequenceReader(file.getAbsolutePath(), false)) {\n // this tsfile is complete\n if (reader.isComplete()) {\n reader.loadMetadataSize();\n position = reader.getFileMetadataPos();\n }\n }\n\n if (position != file.length()) {\n // if the file is complete, we will remove all file metadatas\n try (FileChannel channel =\n FileChannel.open(Paths.get(file.getAbsolutePath()), StandardOpenOption.WRITE)) {\n channel.truncate(position - 1); // remove the last marker.\n }\n }\n return new RestorableTsFileIOWriter(file);\n }", "@Field(1) \n\tpublic GOutputStreamClass write_async(Pointer<GOutputStreamClass.write_async_callback > write_async) {\n\t\tthis.io.setPointerField(this, 1, write_async);\n\t\treturn this;\n\t}", "public abstract void waitForFilesToBeWritten(CompilerMessageLogger logger) throws InterruptedException;", "@Override\n public void run(){\n int status = 0;\n try{\n FileWriter writer = new FileWriter(file);\n writer.append(data);\n writer.flush();\n writer.close();\n Log.d(\"MainActivity\",\"File saved to \"+file.getAbsolutePath());\n //Log.v(\"DataActivity\", data);\n status = 1;\n }catch (IOException e){\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n Message msg = new Message();\n msg.what = status;\n msg.obj = file.getAbsolutePath();\n msg.arg1 = type;\n Log.d(\"File\", file.getAbsolutePath());\n if (writeToFileHandler != null){\n writeToFileHandler.sendMessage(msg);\n }\n }", "public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }", "public synchronized void finishWriting() {\n readerNumber++; // readerNumber = -1 + 1 = 0; \n// readerNumber must be 0 at this point \n this.notifyAll(); // notify possible waiting writers or waiting readers \n }", "private void addFileToQueue(JavaScriptObject nativeFile) {\n this.nativeFilesQueued.add(nativeFile);\n this.nativeFilesQueuedById.put(nativeFile.<File>cast().getId(), nativeFile);\n\n // need to keep the global stats up to date manually\n nativeSetProperty(getStats(), FILES_QEUED, this.nativeFilesQueued.size());\n\n // If requested, notify the app each time a new file is added to the queue\n if (this.fileQueuedHandler != null) {\n this.fileQueuedHandler.onFileQueued(\n new FileQueuedEvent(\n nativeUpdateFileProperties(nativeFile,\n File.Status.QUEUED.toInt()).<File>cast()\n )\n );\n }\n }", "@Override\r\n public void run() {\r\n\r\n // Thread: writes files\r\n if (Controller.this.isFileWriteInUse) {\r\n // System.out.println(\"isFileWriteInUse\");\r\n\r\n if (Controller.this.cw.getWritesOnlyFiles()) {// as long as\r\n // thread is\r\n // running\r\n int i = Controller.this.cw.writeFileProgress / 2;\r\n Controller.this.writeIntoFiles.setValue(i);\r\n Controller.this.writeIntoFiles.repaint();\r\n } else {\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tWriting into files finished.\");\r\n Controller.this.isFileWriteInUse = false;\r\n Controller.this.writeIntoFiles.setVisible(false);\r\n if (!Controller.this.isDBWriteInUse)\r\n Controller.this.setStatus(true);\r\n }\r\n } // fi isFileWriteInUse\r\n else\r\n // Thread: writes from file in DB\r\n if (Controller.this.isDBWriteInUse) {// as long write process in DB\r\n // runs\r\n // System.out.println(\"isDBWriteInUse\");\r\n\r\n // critical, because dbc_in is not available as object in the\r\n // beginning\r\n boolean dbc_inStillWork;\r\n try {\r\n dbc_inStillWork = Controller.this.dbc_in.stillWorks;\r\n } catch (Exception e) {\r\n dbc_inStillWork = false;\r\n }\r\n\r\n if (Controller.this.cw.getWritesOnlyFiles() || dbc_inStillWork) {// as\r\n // long\r\n // as\r\n // the\r\n // thread\r\n // is\r\n // running\r\n int i;\r\n if (dbc_inStillWork) {\r\n i = (Controller.this.cw.writeFileProgress / 2)\r\n + ((Controller.this.dbc_in.singleProgress * 50) / Controller.this.dbc_in.maxProgerss);\r\n } else {\r\n i = Controller.this.cw.writeFileProgress / 2;\r\n }\r\n Controller.this.writeIntoDBProgress.setValue(i);\r\n Controller.this.writeIntoDBProgress.repaint();\r\n } else {\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tWriting into DB finished.\");\r\n Controller.this.isDBWriteInUse = false;\r\n Controller.this.writeIntoDBProgress.setVisible(false);\r\n if (!Controller.this.isFileWriteInUse)\r\n Controller.this.setStatus(true);\r\n\r\n if (Controller.this.dBInError) {\r\n this.tImer.cancel();\r\n System.err.print(\"\\t FAILED!\\n\");\r\n Controller.this.setStatus(true);\r\n Controller.this.dBInError = false;\r\n\r\n // dBOutError=false;\r\n }\r\n\r\n } // esle\r\n } else\r\n // Thread: lloads from DB and writes in nodelist.tmp and\r\n // edgelist.tmp\r\n if (Controller.this.isDBReadInUse) {// as lng as read process is\r\n // active\r\n // System.out.println(\"isDBReadInUse\");\r\n\r\n Controller.this.loadFromDBProgress.setVisible(true);\r\n if (Controller.this.dbc_out.stillWorks) {\r\n // System.out.println(\"Loading from DB active ...\");\r\n int i = (Controller.this.dbc_out.singleProgress * 100) / Controller.this.dbc_out.maxProgerss;\r\n if (i < 1)\r\n i = 1;\r\n Controller.this.loadFromDBProgress.setValue(i);\r\n Controller.this.loadFromDBProgress.repaint();\r\n } else {\r\n // tImer.cancel();\r\n System.out.println(\"*\\tLoading from DB finished.\");\r\n Controller.this.isDBReadInUse = false;\r\n Controller.this.loadFromDBProgress.setVisible(false);\r\n\r\n if (Controller.this.dBOutError) {\r\n this.tImer.cancel();\r\n System.err.print(\"\\t FAILED!\\n\");\r\n\r\n Controller.this.setStatus(true);\r\n\r\n Controller.this.isGraphStarted = false;\r\n Controller.this.isDiagStarted = false;\r\n Controller.this.isFileWriteInUse = false;\r\n Controller.this.dBOutError = false;\r\n\r\n // dBInError=true;\r\n\r\n }\r\n }\r\n }\r\n // Thread: runs Chinese Whispers\r\n else if (!Controller.this.dBOutError && !Controller.this.dBInError) {\r\n // System.out.println(\"!dBOutError&&!dBInError\");\r\n\r\n Controller.this.calculateCWProgress.setVisible(true);\r\n Controller.this.CalculateCWLabel.setVisible(true);\r\n\r\n if (Controller.this.cw.isActive) {\r\n if (Controller.this.cw.getIteration() > 0)\r\n Controller.this.calculateCWProgress.setValue(\r\n (Controller.this.cw.getCurrentIteration() * 100) / Controller.this.cw.getIteration());\r\n Controller.this.calculateCWProgress.repaint();\r\n } else { // cw not active\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tCalculating algorithm finished.\");\r\n Controller.this.calculateCWProgress.setVisible(false);\r\n Controller.this.CalculateCWLabel.setVisible(false);\r\n\r\n if (Controller.this.isGraphStarted) {\r\n // System.out.println(\"isGraphStarted\");\r\n Controller.this.setStatus(true);\r\n Controller.this.isAlgStartedForGraph = true;\r\n Controller.this.isGraphStarted = false;\r\n try {\r\n Thread t1 = new Thread(new MyGraphGUI(Controller.this.display_sub_current,\r\n (ChineseWhispers) Controller.this.cw.clone(), Controller.this.display_edges_temp,\r\n Controller.this.scale_temp, 30, Controller.this.display_degree_temp));\r\n t1.start();\r\n } catch (CloneNotSupportedException e) {\r\n e.printStackTrace();\r\n }\r\n } // fi isGraphStarted\r\n\r\n if (Controller.this.isDiagStarted) {\r\n // System.out.println(\"isDiagStarted\");\r\n Controller.this.setStatus(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.isDiagStarted = false;\r\n try {\r\n Thread t2 = new Thread(new Diagram((ChineseWhispers) Controller.this.cw.clone()));\r\n t2.start();\r\n } catch (CloneNotSupportedException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n } // fi isDiagStarted\r\n if (Controller.this.isFileOutStarted) {\r\n // System.out.println(\"isFileOutStarted\");\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n // isFileWriteInUse=false;\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n Controller.this.isFileOutStarted = false;\r\n } // fi isFileOutStarted\r\n if (Controller.this.isDBOutStarted) {\r\n // System.out.println(\"isDBOutStarted\");\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isDBWriteInUse = true;\r\n Controller.this.writeIntoDBProgress.setVisible(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(false, false, false);\r\n String pw = \"\";\r\n for (int i = 0; i < Controller.this.rpasswdfield.getPassword().length; i++)\r\n pw += Controller.this.rpasswdfield.getPassword()[i];\r\n\r\n Controller.this.dbc_in = new DBConnect(Controller.this.rhostfield.getText(),\r\n Controller.this.rdatabasefield.getText(), Controller.this.ruserfield.getText(),\r\n pw, Integer.parseInt(Controller.this.rportfield.getText()),\r\n Controller.this.otablenamefield.getText(), COLUMN_NAMES_FOR_DB_OUT);\r\n\r\n // File: Controller.CLASSES_TMP_FILENAME\r\n // Columns: Controller.COLUMN_NAMES_FOR_DB_OUT\r\n try {\r\n Controller.this.dbc_in.stillWorks = true;\r\n Controller.this.dbc_in.maxProgerss = Controller.this.cw.countNodesWithClasses;\r\n Controller.this.dbc_in.writeFromFileIntoDB();\r\n } catch (IOWrapperException iow_e) {\r\n System.err.println(\"Error while writing into DB!\\nConnection failed!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nConnection failed!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n } // end catch WrapperException\r\n catch (IOIteratorException ioi_e) {\r\n System.err.println(\"Error while writing into DB!\\nCould not iterate over results!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nCould not iterate over results!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n }\r\n Controller.this.isDBOutStarted = false;\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n Controller.this.isDBOutStarted = false;\r\n } // end isDBOutStarted\r\n\r\n } // esle CW not active\r\n\r\n } // fi (!dBOutError && !dBInError)\r\n\r\n }", "@Override\n protected String doInBackground(String... strings) {\n String enter=\"\\n\";\n FileWriter filewriter=null;\n try {\n filewriter=new FileWriter(fRead,true);\n filewriter.append(strings[0].toString()); // Write into the file\n filewriter.append(enter); // On press enter it will append\n /*\n flush()Flushes this output stream and forces any buffered output bytes\n to be written out.\n */\n filewriter.flush();\n }\n catch (IOException e) {\n e.printStackTrace();\n }finally { // finally will execute wheather any function executes or not .\n try {\n filewriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return null;\n }", "public void appendLogFile(String str)\n{\n if(fileWriter != null)\n {\n try { \n \n fileWriter.append(str); \n \n } catch (Exception e) { \n \n System.out.println(\"Error in CsvFileWriter !!!\"); \n e.printStackTrace(); \n \n } finally { \n \n try {\n \n fileWriter.flush(); \n //fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n } \n }\n}", "public synchronized void addMetadataToQueue(FileMetadata fileMetadata){\n queue.add(fileMetadata);\n notifyAll();\n }", "protected abstract void writeFile();", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "void appendFlushed() throws IOException {\n synchronized (flushed) {\n if (flushed.length() > 0) {\n final String s = flushed.toString();\n flushed.setLength(0);\n Platform.runLater(() -> {\n textArea.appendText(s);\n int textLength = textArea.getText().length();\n if (textLength > MAX_TEXT_LENGTH) {\n textArea.setText(textArea.getText(textLength - MAX_TEXT_LENGTH / 2, textLength));\n }\n });\n }\n }\n }", "void waitToWrite();", "@Override\r\n public void write(byte[] buffer) throws IOException {\r\n inWrite1 = true;\r\n try {\r\n super.write(buffer);\r\n if (!inWrite3) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, buffer.length);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, buffer.length, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite1 = false;\r\n } catch (IOException e) {\r\n inWrite1 = false;\r\n throw e;\r\n }\r\n }", "public void asyncWrite(\n Object requestId, int address, byte[] data, int length, TrcEvent completionEvent,\n TrcNotifier.Receiver completionHandler)\n {\n final String funcName = \"asyncWrite\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"ctxt=%s,addr=%d,data=%s,length=%d,event=%s\",\n requestId == null? \"null\": requestId, address, Arrays.toString(data), length, completionEvent);\n }\n\n if (requestQueue != null)\n {\n Request request = new Request(requestId, false, address, data, length, completionEvent, completionHandler);\n requestQueue.add(request, this::requestHandler, false);\n }\n else\n {\n throw new UnsupportedOperationException(\"asyncWrite is not support without a request queue.\");\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n }", "@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshWriteLock(lockKey, finalWriteToken, lockTimeoutSec);\r\n\t\t\t}", "public void writeFile(View view) {\n WriteFileTask task = new WriteFileTask();\n task.execute();\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Begin writing file...\", Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n protected Void doInBackground(Void... params) {\n File file = new File(getApplicationContext().getFilesDir(), FILENAME);\n\n PrintWriter writer = null;\n try {\n writer = new PrintWriter(file);\n for (int i = 1; i <= 10; i++) {\n writer.println(i);\n Thread.sleep(250);\n publishProgress(i * 10);\n }\n }\n catch (FileNotFoundException | InterruptedException ex) {\n Log.e(LOG_TAG, \"createFile:\" + ex.toString());\n }\n finally {\n if (writer != null) {\n writer.close();\n }\n }\n return null;\n }", "@Override\n public void commit() throws IOException {\n if (!committed && currentFile != null) {\n long pos = currentFile.getLineReadPos();\n currentFile.setPos(pos);\n currentFile.setLastUpdated(updateTime);\n committed = true;\n }\n }", "@Override\n public void onClick(View v) {\n if(createFile())\n {\n new exportContactsAsync(BaseActivity.progressDialog).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n }", "@Override\n public StorageOutputStream append(File file) throws IOException {\n\treturn null;\n }", "protected void work() {\n try {\n if(theFile!=null) { \n //construct filePath, fileSize\n int fileSize = theFile.getFileSize();\n if(fileSize==0) fileSize=1;\n String filePath = path+\"/\"+theFile.getFileName();\n if(log.isDebugEnabled()) log.debug(\"Uploading file: \"+filePath+\", filesize: \"+fileSize/1000+\"KB\");\n\t\t\t\n //write out file\n InputStream stream = theFile.getInputStream();\n OutputStream bos = new FileOutputStream(filePath);\n int bytesRead = 0;\n byte[] buffer = new byte[Constants.FILEUPLOAD_BUFFER];\n while(isRunning() && ((bytesRead = stream.read(buffer, 0, Constants.FILEUPLOAD_BUFFER)) != -1)) {\n bos.write(buffer, 0, bytesRead);\n sum+=bytesRead;\n setPercent(sum/fileSize);\n }\n bos.close();\n stream.close();\n }\n } catch(Exception ex) {\n setRunning(false);\n log.error(\"Error while uploading: \"+ex.getMessage());\n ex.printStackTrace();\n }\n }", "@Override\n public void executeEvent() {\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n }", "protected abstract void handleWriteCompleted() throws IOException, BadAttributeException;", "public void addToBuffer(String filename, SensorData sensorData){\n ObjectOutputStream outstream;\n try {\n File bufferFile = new File(filename);\n //Checks to see if the buffer file already exists. \n if(bufferFile.exists())\n {\n //Create an AppendableObjectOutputStream to add the the end of the buffer file as opposed to over writeing it. \n outstream = new AppendableObjectOutputStream(new FileOutputStream (filename, true));\n } else {\n //Create an ObjectOutputStream to create a new Buffer file. \n outstream = new ObjectOutputStream(new FileOutputStream (filename)); \n }\n //Adds the SensorData to the end of the buffer file.\n outstream.writeObject(sensorData);\n outstream.close();\n } catch(IOException io) {\n System.out.println(io);\n }\n }", "@Override\n public void onWriteSuccess(String fileName, byte fileType) {\n MsgUtils.sendMsg(handler, fileType);\n }", "@Override\n\tpublic void notifyOfThreadComplete(NotifyingThread notifyingThread, Exception e)\n\t{\n\t\tLOG.info(\"[ready flag writer] thread finished\");\n\n\t\tif (e != null)\n\t\t{\n\t\t\tLOG.error(\"[ready flag writer] Exception raised in thread: {}\", e);\n\t\t}\n\n\t}", "public synchronized void beginWrite() {\n\t\tSystem.out.println(\"WRITER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint writeTurn = currentTurn;\n\t\tcurrentTurn++;\n\n\t\twhile(writeTurn != nextTurn || numReaders > 0 || numWriters > 0 ){ \n\t\t\t/********WAIT CALL*********/\n\t\t\ttry {\n//\t\t\tSystem.out.println(\"WRITER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\tthis.wait();\n//\t\t\tSystem.out.println(\"WRITER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t/**************************/\n\t\t}\n\t\t\n\t\t//Only increment when the writer is not blocked\n\t\t// (it is at front of queue)\n\t\tnumWriters++;\n\n\t}", "@Override\n public void uploadPart(RefCountedFSOutputStream file) throws IOException {\n // this is to guarantee that nobody is\n // writing to the file we are uploading.\n checkState(file.isClosed());\n\n final CompletableFuture<PartETag> future = new CompletableFuture<>();\n uploadsInProgress.add(future);\n\n final long partLength = file.getPos();\n currentUploadInfo.registerNewPart(partLength);\n\n file.retain(); // keep the file while the async upload still runs\n uploadThreadPool.execute(new UploadTask(s3AccessHelper, currentUploadInfo, file, future));\n }", "@Override\n public synchronized void handleThreadRecursionHasCompleted() {\n //ensure that all branches have been explored before writing output\n this.numberOfBranchesCompleted++;\n RecursionStore.updateBranchesComplete(this.numberOfBranchesCompleted);\n if (this.numberOfBranchesCompleted != this._totalNumberOfStateTreeBranches) {\n return;\n }\n // write output file\n generateOutputAndClose();\n }", "public void sendFile() throws Exception {\n\t\tthis.logger.info(\"Sender: sending file\");\n\t\tlong senderStartTime = System.nanoTime();\n\t\tboolean done = false;\n\t\tDatagramPacket dp;\n\t\twhile (!done) {\n\t\t\twhile (!this.pw.windowFull() && (dp = this.readyPacket()) != null) {\n\t\t\t\tthis.pw.appendPacket(this.packetNumber, dp); // add the packet to the window\n\t\t\t\tthis.logger.debug(\"Adding packet: \" + this.packetNumber);\n\t\t\t\tthis.packetNumber = (this.packetNumber + 1) % 128;\n\t\t\t}\n\t\t\tthis.pw.transmitWindow(this.socket);\n\t\t\tthis.lastSent = System.nanoTime();\n\t\t\tthis.receivePacket();\n\t\t\tdone = this.pw.doneYet(); // all packages have been acknowledged\n\t\t\tthis.logger.debug(\"Done yet: \" + done + \" \" + this.doneReading);\n\t\t\tif (done && !this.doneReading) {\n\t\t\t\tdone = this.doneReading; // still need to read some packets\n\t\t\t}\n\t\t}\n\t\tthis.signalFinished(); // signal done sending file\n\t\tlong senderEndTime = System.nanoTime();\n\t\tdouble seconds = (senderEndTime - senderStartTime) / NS_TO_S;\n\t\tthis.logger.info(\"Sender: file sending complete\");\n\t\tthis.logger.info(String.format(\"Total time to send file: %.3f seconds\", seconds));\n\t\tthis.logger.info(\"Total file size: \"+ this.totalBytesRead +\" bytes\");\n\t}", "public void OnFileComplete();", "public void startDBWrite() {\r\n this.setStatus(false);\r\n this.isDBOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n // setStatus(true);\r\n\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isDBWriteInUse = true;\r\n Controller.this.writeIntoDBProgress.setVisible(true);\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(false, false, false);\r\n String pw = \"\";\r\n for (int i = 0; i < Controller.this.rpasswdfield.getPassword().length; i++)\r\n pw += Controller.this.rpasswdfield.getPassword()[i];\r\n\r\n Controller.this.dbc_in = new DBConnect(Controller.this.rhostfield.getText(),\r\n Controller.this.rdatabasefield.getText(), Controller.this.ruserfield.getText(), pw,\r\n Integer.parseInt(Controller.this.rportfield.getText()),\r\n Controller.this.otablenamefield.getText(), COLUMN_NAMES_FOR_DB_OUT);\r\n\r\n // File: Controller.CLASSES_TMP_FILENAME\r\n // Columns: Controller.COLUMN_NAMES_FOR_DB_OUT\r\n try {\r\n Controller.this.dbc_in.stillWorks = true;\r\n Controller.this.dbc_in.maxProgerss = Controller.this.cw.countNodesWithClasses;\r\n Controller.this.dbc_in.writeFromFileIntoDB();\r\n } catch (IOWrapperException iow_e) {\r\n System.err.println(\"Error while writing into DB!\\nConnection failed!\");\r\n JOptionPane.showMessageDialog(null, \"Error while writing into DB!\\nConnection failed!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n } catch (IOIteratorException ioi_e) {\r\n System.err.println(\"Error while writing into DB!\\nCould not iterate over results!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nCould not iterate over results!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n }\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isDBOutStarted = false;\r\n }\r\n }", "public void flush() throws IOException {\n\t\tmFile.seek(mOffset);\n\t\tmWriter.write(mBuffer, 0, mBufferLength);\n\t\tmOffset += mBufferLength;\n\t\tmBufferLength = 0;\n\t}", "public void asyncWrite(Object requestCtxt, byte[] data, int length, TrcEvent event, TrcNotifier.Receiver handler)\n {\n asyncWrite(requestCtxt, -1, data, length, event, handler);\n }", "public void onFinish() {\n \t\tmdrFile.write();\n \n \t\t// Close everything\n \t\tfor (Closeable file : toClose)\n \t\t\tUtils.closeFile(file);\n \t}", "@Override\n protected void responseDidFinish(boolean async) {\n // Provide delegate with notification that all file lines have been received\n if (getFileLineReceivedDelegate() != null) {\n getFileLineReceivedDelegate().fileLineReceived(null, false);\n }\n super.responseDidFinish(async);\n }", "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}", "void uploadFinished(StreamingEndEvent event, File uploadedTemporaryFile);", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "public void sendDone()\n\t{\n\t\tmSendBusy = false;\n\t\tStatistics.numPacketsSent++;\n\t\tmWriteHandler.call(mHandlerArg);\n\t}", "private void addFilesToWriter()\n throws Exception {\n Set<Map.Entry<String, Map.Entry<String, byte[]>>> set = files.entrySet();\n for (Map.Entry<String, Map.Entry<String, byte[]>> me : set) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\n \"Content-Disposition: form-data; name=\\\"\" + me.getKey()\n + \"\\\"; filename=\\\"\" + me.getValue().getKey() + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\n \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(me.getValue().getKey()))\n .append(LINE_FEED);\n writer.append(LINE_FEED);\n writer.flush();\n\n outputStream.write(me.getValue().getValue(), 0, me.getValue().getValue().length);\n outputStream.flush();\n\n writer.append(LINE_FEED);\n writer.flush();\n }\n }", "void notifyWrite();", "private void append(byte[] bts) {\n checkFile();\n try {\n outputStream.write(bts);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public synchronized int flush()\n {\n int fileCount = files.size();\n int cb = (maxFiles * maxChars * SysLib.CBCHAR) + \n (maxFiles * SysLib.CBINT);\n byte b[] = new byte[cb];\n int inodeOffset = 0;\n int fileNameOffset = fileCount * SysLib.CBINT;\n\n for (int i = 0; i < fileCount; i++)\n {\n byte strBytes[] = files.get(i).getBytes();\n int cbStr = strBytes.length;\n\n SysLib.int2bytes(cbStr, b, inodeOffset);\n inodeOffset += SysLib.CBINT;\n\n // Don't write zero-length strings\n if (strBytes.length > 0)\n {\n System.arraycopy(strBytes, 0, b, fileNameOffset, cbStr);\n\n fileNameOffset += cbStr;\n }\n }\n\n if (inode.write(0, b) < 0)\n {\n return -1;\n }\n\n return 0;\n }", "public void Write() throws IOException {\n\tRandomAccessFile ancFile = new RandomAccessFile(filename, \"rw\");\n\ttry {\n\t \n\t ancFile.writeInt(numOfControl);\n\t for (int kk=0; kk < numOfControl; kk++ ) {\n\t\tparamFile[kk].Write(ancFile);\n\t }\n\t ancFile.close();\n\t return;\n\t}\n\tcatch ( IOException ex ) {\n\t System.out.println(\"Error writing Ancillary File \" + \n\t\t\t filename );\n\t ex.printStackTrace();\n\t throw new IOException();\n\t}\n\t\n }", "public void createPatient() throws IOException\n {\n addPatientToList();\n \n //creates the patient's empty folders and files\n File userFolder = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB); \n File patientEvaluation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm\");\n File patientProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressNotes\"); \n \n try\n \t{\n \tuserFolder.mkdir();\n patientEvaluation.mkdir();\n patientProgressReports.mkdir();\n \t//result = true;\n \t} \n \tcatch(SecurityException se)\n \t{\n \t//handle it\n \t} \n \t\n File listOfProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressReports.txt\");\n FileWriter writer = new FileWriter(listOfProgressReports, true);\t \n BufferedWriter bufferedreader = new BufferedWriter(writer);\n writer.append(\"\");\n bufferedreader.close();\n writer.close();\n \n \n /*if(result) \n \t{ \n \t\tSystem.out.println(\"DIR created\"); \n \t}*/\n \n //creates the patient's empty evaluation form files\n File signedStatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signed.txt\");\n FileWriter w = new FileWriter(signedStatus, true);\t \n BufferedWriter b = new BufferedWriter(w);\n w.append(\"false\");\n b.close();\n w.close();\n \n File firstName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/first.txt\");\n FileWriter writ = new FileWriter(firstName, true);\t \n BufferedWriter bw = new BufferedWriter(writ);\n writ.append(currentPatientFirstName);\n bw.close();\n writ.close();\n \n File lastName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/last.txt\");\n FileWriter writ1 = new FileWriter(lastName, true);\t \n BufferedWriter bw1 = new BufferedWriter(writ1);\n writ1.append(currentPatientLastName);\n bw1.close();\n writ1.close();\n \n File age = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/age.txt\");\n FileWriter writ2 = new FileWriter(age, true);\t \n BufferedWriter bw2 = new BufferedWriter(writ2);\n writ2.append(\"\");\n bw2.close();\n writ2.close();\n \n File dob = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/dateofbirth.txt\");\n FileWriter writ3 = new FileWriter(dob, true);\t \n BufferedWriter bw3 = new BufferedWriter(writ3);\n writ3.append(\"\");\n bw3.close();\n writ3.close();\n \n File maritalstatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/maritalstatus.txt\");\n FileWriter writ4 = new FileWriter(maritalstatus, true);\t \n BufferedWriter bw4 = new BufferedWriter(writ4);\n writ4.append(\"\");\n bw4.close();\n writ4.close();\n \n File ethnicity = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity.txt\");\n FileWriter writ5 = new FileWriter(ethnicity, true);\t \n BufferedWriter bw5 = new BufferedWriter(writ5);\n writ5.append(\"\");\n bw5.close();\n writ5.close();\n\n File ethnicityother = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity-other.txt\");\n FileWriter writt = new FileWriter(ethnicityother, true);\t \n BufferedWriter bww = new BufferedWriter(writt);\n writt.append(\"\");\n bww.close();\n writt.close();\n \n File sex = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sex.txt\");\n FileWriter writ6 = new FileWriter(sex, true);\t \n BufferedWriter bw6 = new BufferedWriter(writ6);\n writ6.append(\"\");\n bw6.close();\n writ6.close();\n \n File referredBy = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby.txt\");\n FileWriter writ7 = new FileWriter(referredBy, true);\t \n BufferedWriter bw7 = new BufferedWriter(writ7);\n writ7.append(\"\");\n bw7.close();\n writ7.close();\n \n File referredByTherapist = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-therapist.txt\");\n FileWriter writ8 = new FileWriter(referredByTherapist, true);\t \n BufferedWriter bw8 = new BufferedWriter(writ8);\n writ8.append(\"\");\n bw8.close();\n writ8.close();\n \n File referredByOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-other.txt\");\n FileWriter writ9 = new FileWriter(referredByOther, true);\t \n BufferedWriter bw9 = new BufferedWriter(writ9);\n writ9.append(\"\");\n bw9.close();\n writ9.close();\n \n //dr. prince\n File reasonForReferral = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reasonforreferral.txt\");\n FileWriter writ10 = new FileWriter(reasonForReferral, true);\t \n BufferedWriter bw10 = new BufferedWriter(writ10);\n writ10.append(\"\");\n bw10.close();\n writ10.close();\n \n File sourceOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation.txt\");\n FileWriter writ11 = new FileWriter(sourceOfInformation, true);\t \n BufferedWriter bw11 = new BufferedWriter(writ11);\n writ11.append(\"\");\n bw11.close();\n writ11.close();\n \n File sourceOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation-other.txt\");\n FileWriter writ12 = new FileWriter(sourceOfInformationOther, true);\t \n BufferedWriter bw12 = new BufferedWriter(writ12);\n writ12.append(\"\");\n bw12.close();\n writ12.close();\n \n File reliabilityOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation.txt\");\n FileWriter writ13 = new FileWriter(reliabilityOfInformation, true);\t \n BufferedWriter bw13 = new BufferedWriter(writ13);\n writ13.append(\"\");\n bw13.close();\n writ13.close();\n \n File reliabilityOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation-other.txt\");\n FileWriter writ14 = new FileWriter(reliabilityOfInformationOther, true);\t \n BufferedWriter bw14 = new BufferedWriter(writ14);\n writ14.append(\"\");\n bw14.close();\n writ14.close();\n \n File historyOfPresentIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/historyofpresentillness.txt\");\n FileWriter writ15 = new FileWriter(historyOfPresentIllness, true);\t \n BufferedWriter bw15 = new BufferedWriter(writ15);\n writ15.append(\"\");\n bw15.close();\n writ15.close();\n \n File signsSymptoms = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signsandsymptoms.txt\");\n FileWriter writ16 = new FileWriter(signsSymptoms, true);\t \n BufferedWriter bw16 = new BufferedWriter(writ16);\n writ16.append(\"\");\n bw16.close();\n writ16.close();\n \n File currentMedications = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/currentmedications.txt\");\n FileWriter writ17 = new FileWriter(currentMedications, true);\t \n BufferedWriter bw17 = new BufferedWriter(writ17);\n writ17.append(\"\");\n bw17.close();\n writ17.close();\n \n File pastHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryof.txt\");\n FileWriter writ18 = new FileWriter(pastHistoryOf, true);\t \n BufferedWriter bw18 = new BufferedWriter(writ18);\n writ18.append(\"\");\n bw18.close();\n writ18.close();\n \n File pastHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryoftext.txt\");\n FileWriter writ19 = new FileWriter(pastHistoryOfText, true);\t \n BufferedWriter bw19 = new BufferedWriter(writ19);\n writ19.append(\"\");\n bw19.close();\n writ19.close();\n \n File medicationTrialsTable = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialstable.txt\");\n FileWriter writ20 = new FileWriter(medicationTrialsTable, true);\t \n BufferedWriter bw20 = new BufferedWriter(writ20);\n writ20.append(\"\");\n bw20.close();\n writ20.close();\n \n File medicationTrialsComments = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialscomments.txt\");\n FileWriter writ21 = new FileWriter(medicationTrialsComments, true);\t \n BufferedWriter bw21 = new BufferedWriter(writ21);\n writ21.append(\"\");\n bw21.close();\n writ21.close();\n \n File substanceUseHistory = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/substanceusehistory.txt\");\n FileWriter writ22 = new FileWriter(substanceUseHistory, true);\t \n BufferedWriter bw22 = new BufferedWriter(writ22);\n writ22.append(\"\");\n bw22.close();\n writ22.close();\n \n File deniesHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryof.txt\");\n FileWriter writ23 = new FileWriter(deniesHistoryOf, true);\t \n BufferedWriter bw23 = new BufferedWriter(writ23);\n writ23.append(\"\");\n bw23.close();\n writ23.close();\n \n File deniesHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryoftext.txt\");\n FileWriter writ24 = new FileWriter(deniesHistoryOfText, true);\t \n BufferedWriter bw24 = new BufferedWriter(writ24);\n writ24.append(\"\");\n bw24.close();\n writ24.close();\n \n File socialHistoryText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorytext.txt\");\n FileWriter writ25 = new FileWriter(socialHistoryText, true);\t \n BufferedWriter bw25 = new BufferedWriter(writ25);\n writ25.append(\"\");\n bw25.close();\n writ25.close();\n \n File socialHistoryParents = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistoryparents.txt\");\n FileWriter writ26 = new FileWriter(socialHistoryParents, true);\t \n BufferedWriter bw26 = new BufferedWriter(writ26);\n writ26.append(\"\");\n bw26.close();\n writ26.close();\n \n File socialHistorySiblings = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorysiblings.txt\");\n FileWriter writ27 = new FileWriter(socialHistorySiblings, true);\t \n BufferedWriter bw27 = new BufferedWriter(writ27);\n writ27.append(\"\");\n bw27.close();\n writ27.close();\n \n File socialHistoryChildren = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorychildren.txt\");\n FileWriter writ28 = new FileWriter(socialHistoryChildren, true);\t \n BufferedWriter bw28 = new BufferedWriter(writ28);\n writ28.append(\"\");\n bw28.close();\n writ28.close();\n \n File familyHistoryOfMentalIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/familyhistoryofmentalillness.txt\");\n FileWriter writ29 = new FileWriter(familyHistoryOfMentalIllness, true);\t \n BufferedWriter bw29 = new BufferedWriter(writ29);\n writ29.append(\"\");\n bw29.close();\n writ29.close();\n \n }", "void onBytesWritten(int bytesWritten);", "public void writeChannel() {\n try {\n java.io.FileWriter chWriter = new java.io.FileWriter(chFile);\n chWriter.write(chStored);\n chWriter.close();\n JTVProg.logPrint(this, 3, \"файл канала [\" + this.chName + \"] успешно сохранен\");\n } catch (IOException ex) {\n JTVProg.logPrint(this, 0, \"ошибка записи файла канала [\" + this.chName + \"]\");\n } finally {\n JTVProg.configer.markWrited(this.chFillOrder - 1);\n }\n }", "public void sequenceWriter(String sequence) {\n try {\n Files.write(file, ((sequence + \"\\r\\n\")).getBytes(), StandardOpenOption.APPEND);\n } catch (IOException e) {\n System.out.println(\"Error:\" + e);\n }\n }", "public void signalFinished() throws IOException {\n\t\t// signal the file is done\n\t\tbyte[] data = new byte[PACKET_SIZE];\n\t\tdata[0] = (byte) this.sequence; // set the sequence number\n\t\tdata[1] = (byte) END_BYTES; // send number of bytes read\n\t\tDatagramPacket dp = new DatagramPacket(data, data.length, this.ia, receiverPort);\n\t\tthis.logger.debug(\"Signaling the file is done transferring\");\n\t\ttry {\n\t\t\tthis.socket.send(dp);\n\t\t\tthis.socket.receive(this.in_packet);\n\t\t\tif (!this.in_packet.getAddress().equals(this.ia)) {\n\t\t\t\tthis.logger.debug(\"Not from the send address\");\n\t\t\t\tthis.signalFinished();\n\t\t\t} else {\n\t\t\t\tif (this.in_packet.getData()[0] == this.sequence) {\n\t\t\t\t\tthis.logger.debug(\"Package was ack\");\n\t\t\t\t\tthis.sequence = (this.sequence + 1) % 2; // update the sequence number\n\t\t\t\t} else {\n\t\t\t\t\tthis.logger.debug(\"Acknowledgement for wrong package\");\n\t\t\t\t\tthis.signalFinished();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(SocketTimeoutException e) {\n\t\t\tthis.logger.debug(\"Timeout occurred so resending packet\");\n\t\t\tthis.signalFinished();\n\t\t}\n\t\tthis.logger.debug(\"Done sending file\");\n\t}", "public Long putFile(ExtFileObjectCom extFile)\r\n \t{ \r\n \t\tif (extFile== null)\r\n \t\t\tthrow new ExternalFileMgrException(ERR_EMPTY_EXTFILE);\r\n \t\tif (extFile.getFile()== null)\r\n \t\t\tthrow new ExternalFileMgrException(ERR_NO_FILE);\r\n \r\n logger.debug(\"calling putFile(\"+extFile.getFile().getName()+\") was called...\");\r\n \t\t\r\n \t\t//Datei in den Branch kopieren\r\n \t\tString strBranch= extFile.getBranch();\r\n \t\tFile branch= new File(this.externalDataFolder, strBranch);\r\n \t\tif (!branch.exists())\r\n \t\t\tthrow new ExternalFileMgrException(ERR_BRANCH_NOT_EXIST+ branch);\r\n \t\t\r\n \t\t//writing bytes to new file\r\n \t\tFile outFile= this.createNewFileName(branch, extFile.getFileName());\r\n \t\t\r\n \t\ttry {\r\n \t\t\textFile.getFile(outFile.getCanonicalPath());\r\n \t\t} catch (IOException e) {\r\n \t\t\tthrow new ExternalFileMgrException(e);\r\n \t\t}\r\n \t\t\r\n \t\tExtFileObjectDAO extFileDao= new ExtFileObjectImpl(extFile, outFile.getName());\r\n \t\treturn(externalFileMgrDao.putExtFile(extFileDao));\r\n \t}", "public void startWriterSimulator() throws IOException, InterruptedException {\n \n // producer thread: Write to a file (ie simulate the behavior of the AndofflineApp running on the phone)\n \tnew Thread(new Runnable() {\n\n \t\tpublic void run() {\n \t\t\tSystem.out.println(\"Starting Android File Writer simulator on file: \"+pcounter_log); \t\t\t\t\n \t\t\t\n \t\t\tFileWriter fw;\n \t\t\t\t\n \t\t\ttry {\n \t\t\t\t fw = new FileWriter(pcounter_log);\t\t\n \t\t\t\t\n \t\t\t\t for(int i=0; i<10000;i++){\n \t\t\t\t\tfw.append(\"sms: \"+i +\"\\n\");\n \t\t\t\t\tfw.flush();\n \t\t\t\t\tThread.sleep(5000);\n \t\t\t\t }\n \t\t\t\t\n \t\t\t} catch (Exception e) { \n \t\t\t\tSystem.out.println(\"Error writing SD card file\");\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}).start();\n\n\t}", "@Override\n protected void done() {\n super.done();\n if (!this.isCancelled()) {\n openMergeModifiedFile(); \n }\n }", "public void writeMessages () {\n try {\n ByteBuffer frame;\n while ((frame = _outq.peek()) != null) {\n // if we've been closed, stop trying to write\n if (!_chan.isOpen()) return;\n _chan.write(frame);\n if (frame.remaining() > 0) {\n // partial write, requeue ourselves and finish the job later\n _cmgr.requeueWriter(this);\n return;\n }\n _outq.poll(); // remove fully written frame\n }\n\n } catch (NotYetConnectedException nyce) {\n // this means that our async connection is not quite complete, just requeue ourselves\n // and try again later\n _cmgr.requeueWriter(this);\n\n } catch (IOException ioe) {\n // because we may still be lingering in the connection manager's writable queue, clear\n // out our outgoing queue so that any final calls to writeMessages NOOP\n _outq.clear();\n // now let the usual suspects know that we failed\n _input.onSendError(ioe);\n onClose(ioe);\n }\n }", "@Override\n\tpublic void run( ) {\n\t\tConnect();\n\t\tSendFile( filePath );\n\t\tDisconnect();\n\t}", "private void createWriter() throws IOException {\n if (outputFile.exists()) {\n outputFile.delete();\n }\n FileWriter outFw = null;\n try {\n outFw = new FileWriter(outputFile.getAbsolutePath());\n } catch (IOException e) {\n LOG.error(\"Can not create writer for {} {}\", outputFile.getAbsolutePath(), e);\n throw e;\n }\n this.bufferedWriter = new BufferedWriter(outFw);\n writeOutputLine(\"User Agent - started\");\n }", "private void writeToFile() {\n boolean flag = true;\n int expectedPacket = (lastPacket)? sequenceNo: Constants.WINDOW_SIZE;\n for (int i = 0; i < expectedPacket; i++) {\n if(!receivedPacketList.containsKey(i)) {\n flag = false;\n }\n }\n if (flag) {\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \"Write to file Possible\");\n try (BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(fileSavePath, true))) {\n for (int i = 0; i < receivedPacketList.size(); i++) {\n //System.out.println(new String(receivedPacketList.get(i)));\n stream.write(receivedPacketList.get(i));\n }\n receivedPacketList.clear();\n stream.close();\n } catch (FileNotFoundException ex) {\n \n } catch (IOException ex) {\n \n }\n receivedPacketList.clear();\n expectedList.clear();\n }\n }", "public void flushFile(Class<?> cn) throws IOException {\n log.info(Constants.BAD_FILE);\n log.info(Constants.FLUSH_FILE);\n FileWriter file = new FileWriter(getPath(cn));\n file.flush();\n }", "private boolean enqueueWrite(ChannelHandlerContext ctx, HttpObject msg, ChannelPromise promise) {\n if (ctx.channel().isWritable() && queuedWrites.isEmpty()) {\n ctx.write(msg, promise);\n return true;\n } else {\n queuedWrites.add(new WriteOperation(msg, promise));\n return false;\n }\n }", "@Override // com.facebook.p447b.p449b.DiskStorage.AbstractC3936b\n /* renamed from: a */\n public void mo27428a(WriterCallback jVar, Object obj) throws IOException {\n try {\n FileOutputStream fileOutputStream = new FileOutputStream(this.f17429a);\n try {\n CountingOutputStream cVar = new CountingOutputStream(fileOutputStream);\n jVar.write(cVar);\n cVar.flush();\n long a = cVar.mo27531a();\n fileOutputStream.close();\n if (this.f17429a.length() != a) {\n throw new C3928d(a, this.f17429a.length());\n }\n } catch (Throwable th) {\n fileOutputStream.close();\n throw th;\n }\n } catch (FileNotFoundException e) {\n DefaultDiskStorage.this.f17417f.mo27388a(CacheErrorLogger.EnumC3922a.WRITE_UPDATE_FILE_NOT_FOUND, DefaultDiskStorage.f17413b, \"updateResource\", e);\n throw e;\n }\n }", "public static void write() throws Exception {\r\n \tif (FTPManager.upload())\r\n \t\tSystem.out.println(\"Written.\");\r\n \telse\r\n \t\tSystem.out.println(\"Failed.\");\r\n }", "private void writeBytes() {\n\t\tint needToWrite = rawBytes.length - bytesWritten;\n\t\tint actualWrit = line.write(rawBytes, bytesWritten, needToWrite);\n\t\t// if the total written is not equal to how much we needed to write\n\t\t// then we need to remember where we were so that we don't read more\n\t\t// until we finished writing our entire rawBytes array.\n\t\tif (actualWrit != needToWrite) {\n\t\t\tCCSoundIO.debug(\"writeBytes: wrote \" + actualWrit + \" of \" + needToWrite);\n\t\t\tshouldRead = false;\n\t\t\tbytesWritten += actualWrit;\n\t\t} else {\n\t\t\t// if it all got written, we should continue reading\n\t\t\t// and we reset our bytesWritten value.\n\t\t\tshouldRead = true;\n\t\t\tbytesWritten = 0;\n\t\t}\n\t}", "private void writeFile(String line, BufferedWriter theOutFile) throws Exception {\n\t\ttheOutFile.append(line);\t\t\t// write the line out\n\t\ttheOutFile.newLine();\t\t\t\t// skip to the next line\t\t\n\t}", "@Override\n public void run() {\n OutputStream outputStream = driveContents.getOutputStream();\n Writer writer = new OutputStreamWriter(outputStream);\n try {\n writer.write(\"Hello abhay!\");\n writer.close();\n } catch (IOException e) {\n Log.e(TAG, e.getMessage());\n }\n\n MetadataChangeSet changeSet = new MetadataChangeSet.Builder()\n .setTitle(\"abhaytest2\")\n .setMimeType(\"text/plain\")\n .setStarred(true).build();\n\n // create a file in root folder\n Drive.DriveApi.getRootFolder(mGoogleApiClient)\n .createFile(mGoogleApiClient, changeSet, driveContents)\n .setResultCallback(fileCallback);\n }", "static void writeFile(List<String> sortList, int fileIndex) throws IOException, InterruptedException {\n\t\tFileWriter filewrite = new FileWriter(new File(DividedfileList.get(fileIndex)));\n\t\tBufferedWriter bufw = new BufferedWriter(filewrite);\n\n\t\tint fileLoc = 0;\n\n\t\twhile (fileLoc != sortList.size()) {\n\t\t\tbufw.write(sortList.get(fileLoc) + \"\\r\\n\");\n\t\t\tfileLoc++;\n\t\t}\n\t\tbufw.close();\n\t}", "public void sendToFile(View view)\n {\n // Do something in response to button click\n\n tv1.append(\"button clicked!\");\n\n // Waits five seconds before we actually set to true\n // This will give enough time to put the phone back in pocket and continue motion\n // Got code from: https://stackoverflow.com/questions/31041884/execute-function-after-5-seconds-in-android\n\n // Create necessary files if needed\n File linAccelFile = accessFile(\"linear_acceleration_data.txt\");\n File accelFile = accessFile(\"uncalibrated_accelerometer_data.txt\");\n File gyroFile = accessFile(\"gyroscope_data.txt\");\n BufferedWriter writer = null;\n try {\n writer = new BufferedWriter(new FileWriter(linAccelFile, true /*append*/));\n writer.write(\"Start of the Linear Acceleration Data Collection\\n\");\n writer.close();\n writer = new BufferedWriter(new FileWriter(accelFile, true /*append*/));\n writer.write(\"Start of the Uncalibrated Acceleration Data Collection\\n\");\n writer.close();\n writer = new BufferedWriter(new FileWriter(gyroFile, true /*append*/));\n writer.write(\"Start of the Gyroscope Data Collection\\n\");\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n tv1.append(\"something went wrong writing to file!\");\n }\n\n if (record)\n record = false;\n else {\n tv1.append(\"writing to file\\n\");\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n tv1.append(\"set to true\\n\");\n record = true;\n }\n }, 5000);\n //record = true;\n }\n\n if (record)\n tv1.append(\"true\\n\");\n else\n tv1.append(\"false\\n\");\n\n // Then we want to only record for 10 seconds (it is 15000 because we have the five second initial delay)\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n tv1.append(\"set to false\\n\");\n record = false;\n }\n }, 15000);\n\n }", "public void complete() throws JournalException {\n try {\n // NOTE: The extending class should be able to handle the case of\n // a failure before we can write this complete marker, logging a\n // file version is probably the sanest way of doing so (if the version\n // of the file we were modifying has changed from the journal entry\n // we must've completed the op, but not written to the log).\n log.write(COMPLETE_TOKEN + \"\\n\");\n } catch (IOException e) {\n throw new JournalException(\"Failed to write completion to journal.\");\n }\n\n // garbage collect\n if (pendingOps.isEmpty()) {\n // we want to empty the file, but keep it around\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to garbage collect log file.\");\n }\n }\n }", "public static final void appendBytes(@org.jetbrains.annotations.NotNull java.io.File r2, @org.jetbrains.annotations.NotNull byte[] r3) {\n /*\n java.lang.String r0 = \"$this$appendBytes\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0)\n java.lang.String r0 = \"array\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r3, r0)\n java.io.FileOutputStream r0 = new java.io.FileOutputStream\n r1 = 1\n r0.<init>(r2, r1)\n java.io.Closeable r0 = (java.io.Closeable) r0\n r2 = 0\n r1 = r0\n java.io.FileOutputStream r1 = (java.io.FileOutputStream) r1 // Catch:{ Throwable -> 0x001f }\n r1.write(r3) // Catch:{ Throwable -> 0x001f }\n kotlin.io.CloseableKt.closeFinally(r0, r2)\n return\n L_0x001d:\n r3 = move-exception\n goto L_0x0021\n L_0x001f:\n r2 = move-exception\n throw r2 // Catch:{ all -> 0x001d }\n L_0x0021:\n kotlin.io.CloseableKt.closeFinally(r0, r2)\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.io.i.appendBytes(java.io.File, byte[]):void\");\n }", "public final synchronized void signalDataAvailable() {\n\n\t\t//\tNotify any waiting threads that the file data ia available\n\t\t\t\n\t\tnotifyAll();\n\t}", "@Override\n\tprotected void done(){\n\t\tString[] s= fileName.split(\"/\");\n\t\tthis.statuslbl.setText(\"Sucessfully created \"+s[s.length-1]+\"!\");\n\t\tprogressBar.setValue(500);\n\t\t\n\t}", "public static void main(String args[])\n {\n String FILENAME = \"myfile.txt\";\n\n // When used, the FileWriter object will immediately put it's output\n // to the file. So FileWriter output attempts to write to the file as\n // fast as possible. Maybe this is a good thing in some\n // circumstances, but I think it would be better to write data in\n // chunks. We employ a BufferedWriter object to capture the\n // FileWriter output into a collection of bytes that can be written\n // to the file.\n FileWriter fWriter = null;\n BufferedWriter bWriter = null;\n\n // Wrapping our attempt to write to the file inside a try / catch\n // statement allows us to trap some errors if they happen\n try\n {\n // Here is the content that we will write to the file.\n String fileContent = \"Dude, I'm totally writing to a file!!\";\n\n // These lines instantiate FileWriter and BufferedWriter objects.\n // When instantiating the FileWriter object we pass in the file\n // name that we are writing to. If no path is given in our\n // filename, the file will be created and written in the root\n // directory.\n fWriter = new FileWriter(FILENAME);\n\n // The BufferedWriter object is instantiated on this line and the\n // FileWriter object is passed in as an argument.\n bWriter = new BufferedWriter(fWriter);\n\n // Now that we have our buffer and writer objects created, we can\n // attempt to write content to the file. Here is what\n // (I think) this is doing. The BufferedWriter object will receive\n // the content to be written, and then pass that content as a\n // whole to the FileWriter so it can be written to the file as a\n // chunk. If we did not do it this way, the content would be read\n // passed into the FileWriter object, converted to bytes on the\n // fly, and immediately written, byte by byte as it is converted,\n // to the file. By buffering we are increasing the performance of\n // this action.\n bWriter.write(fileContent);\n }\n\n // The catch statement will trap and display any exception that is\n // created when we are attempting to create our writer objects, open\n // or create the file, or write content.\n catch(Exception e)\n {\n System.out.println(\"Unable to write to file : \" + e.getMessage());\n }\n\n // This 'finally' statement will always happen, regardless of what\n // happens in our try/catch statement. If we put this code into the\n // try statement and we received an error, it would never be\n // processed. Additionally, if we put this code at the bottom of our\n // program and ran into an error half way through, it would never be\n // processed. Placing the code into a finally statement allows us to\n // ensure that it is run every time.\n finally\n {\n // Another try and catch statement to trap any error that happens\n // when closing the files.\n try\n {\n // The last thing we want to do is close out our writer\n // objects. This is a best practice since if you leave the\n // writer open you are at best wasting system resources, and\n // at worst you could lock this file for editing while other\n // resources are trying to use it. We check to make sure it\n // is not already disposed of, and then we call the close()\n // method.\n if (bWriter != null) {\n bWriter.close();\n }\n\n if (fWriter != null) {\n fWriter.close();\n }\n }\n // Our final catch reveals any errors that popped up when we were\n // attempting to close the writer and buffer objects.\n catch (Exception e)\n {\n System.out.println(\"Unable to close writer objects :\"\n + e.getMessage());\n }\n }\n }", "public void saveLink() {\n\t\t\t// check to see if the file exists locally\n\t\t\tString localFile = localUrl + \"/\" + filePath;\n\n\t\t\tboolean finished = false;\n\t\t\twhile (!finished) {\n\t\t\t\ttry {\n\n\t\t\t\t\tFile file = new File(localFile);\n\t\t\t\t\t// build remote path\n\t\t\t\t\tString finalRemoteUrl = remoteUrl;\n\t\t\t\t\tif (filePath.startsWith(\"/\")) {\n\t\t\t\t\t\tURL url = new URL(finalRemoteUrl);\n\t\t\t\t\t\tfinalRemoteUrl = url.getProtocol() + \"://\" + url.getHost();\n\t\t\t\t\t}\n\n\t\t\t\t\tString remoteFile = finalRemoteUrl + filePath;\n\t\t\t\t\tif (file.canRead() && !file.isDirectory()) {\n\t\t\t\t\t\tLong fileLength = file.length();\n\t\t\t\t\t\t// if it does, check to see if it is complete based on\n\t\t\t\t\t\t// length of file\n\t\t\t\t\t\tlogger.trace(\"file/dir already exists: {}\", localFile);\n\t\t\t\t\t\tURLConnection connection = buildConnection(remoteFile);\n\t\t\t\t\t\tMap<String, List<String>> map = connection.getHeaderFields();\n\t\t\t\t\t\tif (map.get(\"Content-Length\") == null) {\n\t\t\t\t\t\t\tlogger.debug(\"no header fields were returned when attempting to access: {}\", remoteFile);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLong remoteLength = Long.parseLong(map.get(\"Content-Length\").iterator().next());\n\n\t\t\t\t\t\t// if it is not complete, resume downloading\n\t\t\t\t\t\tif (remoteLength > fileLength || fileLength == 0) {\n\t\t\t\t\t\t\ttransferFromRemoteToLocal(remoteFile, localFile, fileLength, remoteLength);\n\t\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.trace(\"file is already complete, moving on\");\n\t\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if it is does not exist, create the directory or file\n\t\t\t\t\t\tlogger.trace(\"file does not exist: {}\", localFile);\n\n\t\t\t\t\t\t// take care of the directory structure\n\t\t\t\t\t\tFiles.createParentDirs(new File(localFile));\n\n\t\t\t\t\t\t// save the file\n\t\t\t\t\t\tlogger.trace(\"preparing to write remote file {} to local file {}\", new Object[] { remoteFile,\n\t\t\t\t\t\t\t\tlocalFile });\n\n\t\t\t\t\t\ttransferFromRemoteToLocal(remoteFile, localFile);\n\t\t\t\t\t\tlogger.trace(\"file created: {}\", localFile);\n\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// timeout took place. pause, then let the loop execute\n\t\t\t\t\t// again\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tlogger.error(\"exception while processing a link\", e);\n\t\t\t\t\tfinished = true;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tlogger.error(\"exception while processing a link\", e);\n\t\t\t\t\tlogger.debug(\"will try again in {} milliseconds\", TIMEOUT_TIME);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(TIMEOUT_TIME);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\tlogger.error(\"failed while trying to wait {} milliseconds\", TIMEOUT_TIME);\n\t\t\t\t\t}\n\t\t\t\t\tlogger.debug(\"just woke up, trying again\");\n\t\t\t\t\tfinished = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter.incrementAndGet();\n\t\t\tlogger.debug(\"successfully downloaded the file {} from {} to {} - {}\", new Object[] { filePath, remoteUrl,\n\t\t\t\t\tlocalUrl, completionMessage() });\n\n\t\t\tLinesToFileWriter lineWriter = new LinesToFileWriter(localUrl, COMPLETED_PATH_LIST, true);\n\t\t\t// write line to completed file list\n\t\t\tlineWriter.writeLine(filePath);\n\t\t\tlineWriter.close();\n\t\t}", "@Override\n public void onProgress(int bytesWritten , int totalSize)\n {\n }", "public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n public void write(byte[] buffer, int off, int len) throws IOException {\r\n inWrite3 = true;\r\n try {\r\n super.write(buffer, off, len);\r\n if (!inWrite1) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, len);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, len, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite3 = false;\r\n } catch (IOException e) {\r\n inWrite3 = false;\r\n throw e;\r\n }\r\n }", "private static void prepareOutputFile() {\n try {\n outputFileBuffer = new BufferedWriter(new FileWriter(PATH+OUTPUT_FILE_NAME));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private boolean uploadProgressEventCallback(File file, double bytesComplete, double bytesTotal) {\n long now = System.currentTimeMillis();\n long bytesSinceLastEvent =\n (long) (bytesComplete - nativeGetPropertyAsDouble(file, \"previousBytesComplete\"));\n double\n timeSinceLastEvent =\n (now - nativeGetPropertyAsDouble(file, \"timeSinceLastEvent\")) / 1000.0;\n double elapsedTime = (now - nativeGetPropertyAsDouble(file, \"startTime\")) / 1000.0;\n double currentSpeed = (bytesSinceLastEvent * 8) / timeSinceLastEvent;\n if (!Double.isInfinite(currentSpeed) && !Double.isNaN(currentSpeed)) {\n nativeAddValueToArray(file, \"movingAverageHistory\", currentSpeed);\n }\n nativeSetProperty(file, \"bytesSinceLastEvent\", bytesSinceLastEvent);\n nativeSetProperty(file, \"previousBytesComplete\", bytesComplete);\n nativeSetProperty(file, \"timeSinceLastEvent\", now);\n\n // consoleDebug(currentSpeed + \"\");\n\n // Set properties\n nativeSetProperty(file, \"averageSpeed\",\n (bytesComplete * 8) / elapsedTime); // Bits per seconds\n nativeSetProperty(file, \"currentSpeed\", currentSpeed); // Bytes per seconds since last event\n nativeSetProperty(file, \"movingAverageSpeed\",\n calculateMovingAverage(nativeGetPropertyAsArray(file,\n \"movingAverageHistory\"))\n ); // Bytes per second\n nativeSetProperty(file, \"percentUploaded\",\n bytesComplete / bytesTotal * 100); // Bytes per seconds\n nativeSetProperty(file, \"sizeUploaded\", bytesComplete); // Bytes uploaded so far\n nativeSetProperty(file, \"timeElapsed\", elapsedTime); // Time since upload started\n nativeSetProperty(file, \"timeRemaining\",\n (bytesTotal - bytesComplete) / (bytesComplete / elapsedTime));\n\n\n return this.uploadProgressHandler == null\n || this.uploadProgressHandler\n .onUploadProgress(\n new UploadProgressEvent(file, (long) bytesComplete, (long) bytesTotal));\n }", "@Override\n public void update(ActorRef actor, Status status) {\n try (Writer w = Files.newBufferedWriter(progressPath, Charset.defaultCharset(), StandardOpenOption.APPEND);\n ProgressWriter log = new ProgressWriter(w)) {\n log.write(actor, status);\n } catch (IOException e) {\n DebugUIFactory.log.error(\"IOError on appending to progress file\", e);\n }\n }", "public void appendData_File(String BSSID){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.FILE_NAME, Context.MODE_APPEND));\n BSSID+=\",\";\n outputStreamWriter.write(BSSID);\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n finally {\n try{\n if(outputStreamWriter!=null)\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }\n }", "private void threadRun ()\n {\n\tfor (;;)\n\t{\n\t String str;\n\n\t synchronized (myToBeAppended)\n\t {\n\t\tint len = myToBeAppended.length ();\n\t\tif (len < NO_WAIT_BUFFER_SIZE)\n\t\t{\n\t\t try\n\t\t {\n\t\t\tif (len == 0)\n\t\t\t{\n\t\t\t myToBeAppended.wait ();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t myToBeAppended.wait (WAIT_TIME);\n\t\t\t}\n\t\t }\n\t\t catch (InterruptedException ex)\n\t\t {\n\t\t\t// ignore it\n\t\t }\n\t\t int newlen = myToBeAppended.length ();\n\t\t if (newlen == 0)\n\t\t {\n\t\t\tcontinue;\n\t\t }\n\t\t if ( (newlen > len)\n\t\t\t&& (newlen < NO_WAIT_BUFFER_SIZE))\n\t\t {\n\t\t\tcontinue;\n\t\t }\n\t\t}\n\t\tstr = myToBeAppended.toString ();\n\t\tmyToBeAppended.setLength (0);\n\t }\n\n\t synchronized (myDocument)\n\t {\n\t\ttry\n\t\t{\n\t\t int insertAt = myDocument.getLength ();\n\t\t myDocument.insertString (insertAt, str, myNormalStyle);\n\t\t myDocument.setLogicalStyle (insertAt + 1, myNormalStyle);\n\t\t}\n\t\tcatch (BadLocationException ex)\n\t\t{\n\t\t new ShouldntHappenException (ex).printStackTrace ();\n\t\t}\n\t }\n\n\t if (myWindow != null)\n\t {\n\t\tAsEvent.setVisible (myWindow, true);\n\t }\n\t}\n }", "@Field(3) \n\tpublic Pointer<GOutputStreamClass.flush_async_callback > flush_async() {\n\t\treturn this.io.getPointerField(this, 3);\n\t}", "void addFile(int numberLines);", "void onSavingCompleted(List<File> files);", "public abstract void writeToFile( );", "private boolean writeWithoutWaiting(final String line, final LogTailer tailer) {\n final Future<Boolean> result = this.e.submit(new Callable<Boolean>() {\n\n @Override\n public Boolean call() throws Exception {\n BufferedWriter w = null;\n try {\n if (!LogWriter.this.target.exists()) {\n LogWriter.this.target.createNewFile();\n // give the tailer some time to figure out that the file\n // already exists\n Thread.sleep(1000);\n }\n w = new BufferedWriter(new FileWriter(LogWriter.this.target, true));\n w.write(line);\n w.newLine();\n LogWriter.LOGGER.info(\"Written log message '{}'.\", line);\n return true;\n } catch (final IOException ex) {\n LogWriter.LOGGER.warn(\"Failed writing log message '{}'.\", line, ex);\n return false;\n } finally {\n IOUtils.closeQuietly(w);\n }\n }\n\n });\n try {\n return result.get();\n } catch (final Exception ex) {\n LogWriter.LOGGER.warn(\"Failed writing log message '{}'.\", line, ex);\n return false;\n }\n }", "private void append (String str)\n {\n\tsynchronized (myToBeAppended)\n\t{\n\t myToBeAppended.append (str);\n\t myToBeAppended.notifyAll ();\n\t}\n }", "public void addAssetAsync(final String assetPath, final String localAssetPath) {\n Runnable addAssetRunnable = new Runnable() {\n @Override\n public void run() {\n psDoAddAsset(assetPath, localAssetPath);\n }\n };\n try {\n phoneSynchronizer.sendEventually(addAssetRunnable);\n } catch (PhoneCommunicationException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onWriteFailed(byte fileType, byte errCode) {\n }", "@Override\n public void append( ByteBuffer rtnBuffer) {\n \n //Add the parent\n super.append(rtnBuffer);\n \n //Add the file id\n rtnBuffer.put( handlerId );\n \n //Add the file byte value\n rtnBuffer.put(socksBytes );\n \n }", "public void createCsvFile(String fileName) { \n \n try { \n \n fileWriter = new FileWriter(fileName); \n \n //Write the CSV file header \n fileWriter.append(FILE_HEADER.toString()); \n \n //Add a new line separator after the header \n fileWriter.append(NEW_LINE_SEPARATOR); \n \n System.out.println(\"CSV file was created successfully !!!\"); \n \n } catch (Exception e) { \n \n System.out.println(\"Error in CsvFileWriter !!!\"); \n e.printStackTrace(); \n \n } finally { \n \n try {\n \n fileWriter.flush(); \n //fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n } \n \n}", "@Override\n protected Void call() {\n if(download_queue.isEmpty()) return null;\n \n //Proceed to create a file with a list of addresses\n Writer writer = null;\n String file_dir = Configuration.root_dir + \"Download_list.txt\";\n try{\n writer = new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\n file_dir), \"utf-8\"));\n String server_root = Configuration.getInstance().getSina_server_root();\n //Traverse through the download list and write each download address to file\n String content = \"\";\n for(int i = 0; i < download_queue.size(); i++){\n SoundTrack track = download_queue.get(i);\n String address = server_root + track.getLocalFileName();\n content += address;\n if(i < (download_queue.size() - 1)){\n content += \"\\n\";\n }\n }\n //Write to file\n writer.write(content);\n \n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } finally{\n try {\n if(writer != null)\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n //Run wget command to download the listed files\n String command = \"wget\";\n command += \" -P \" + Configuration.root_dir + \"SoundTracks/\";\n command += \" -i list\";\n try {\n Process p = Runtime.getRuntime().exec(command);\n p.waitFor();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InterruptedException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return null;\n }", "private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void DownloadCompleted(ByteBuffer packet) throws RuntimeException, IOException{\n\t\t// (for download completion ack c->s) [header | file_id (4)]\n\t\t// no HEADER\n\t\t\n\t\t// parse the req\n\t\tif (packet.capacity() < 4)\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"file not correctly specified\");\n\t\tint file_id = packet.getInt(0);\n\t\tfor (ServerFile f : totalFiles().keySet()){\n\t\t\tif (f.id() == file_id){\n\t\t\t\tclient.addUpload(f);\n\t\t\t\t// construct response\n\t\t\t\tString send_name = f.name() + '\\0';\n\t\t\t\tbuf = Utility.addHeader(Constants.DOWNLOAD_ACK, send_name.length(), client.getId());\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < send_name.length(); i++){\n\t\t\t\t\tbuf.put(Constants.HEADER_LEN + i, send_name.getBytes()[i]);\n\t\t\t\t}\n\t\t\t\tout.write(buf.array());\n\t\t\t\tout.flush();\n\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\": Correctly processed download ack for \" + file_id);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthrow new RuntimeException(\"file id does not exist\");\n\t}", "public synchronized boolean add(ProjectFilePart o) {\r\n // add one\r\n size++;\r\n // add to the buffer\r\n boolean added = buf.add(o);\r\n // if not too much, return\r\n if (buf.size() < maxBufferSize) {\r\n return added;\r\n }\r\n // save the data\r\n saveData();\r\n // return true\r\n return true;\r\n }" ]
[ "0.5756383", "0.5549855", "0.55225146", "0.5408975", "0.5397712", "0.5397224", "0.5390365", "0.52098584", "0.5157829", "0.5047948", "0.5030068", "0.5028227", "0.50148284", "0.5008972", "0.49874163", "0.4965273", "0.4943949", "0.49348235", "0.48897406", "0.48768684", "0.48742345", "0.48174125", "0.48163787", "0.47644818", "0.4763385", "0.4755298", "0.4741422", "0.47397587", "0.47101068", "0.4696439", "0.46810785", "0.46672854", "0.46607044", "0.46457905", "0.463587", "0.46291167", "0.46185854", "0.4617", "0.45608798", "0.45563573", "0.4542552", "0.45399797", "0.4537369", "0.45276654", "0.4516433", "0.45054156", "0.44888908", "0.4486819", "0.44845042", "0.44789597", "0.44774532", "0.4475317", "0.44697717", "0.44628528", "0.44607034", "0.44361454", "0.44292575", "0.4424662", "0.44184873", "0.44063938", "0.43911374", "0.43818828", "0.43689308", "0.4368814", "0.436004", "0.43523183", "0.43466946", "0.43383357", "0.43373847", "0.43363053", "0.433573", "0.43337032", "0.4328572", "0.4328367", "0.43276513", "0.4325676", "0.43246034", "0.43142498", "0.43130672", "0.43095562", "0.43091524", "0.43060082", "0.42998278", "0.42989114", "0.42988825", "0.42973062", "0.4296827", "0.429365", "0.4290676", "0.42892873", "0.42876017", "0.42840675", "0.42836204", "0.42818415", "0.42769703", "0.4271404", "0.42610154", "0.4256343", "0.42541182", "0.42431772" ]
0.6911041
0
Wait for the file writer to meet the following conditions: stopAcceptingFiles() has been called all files have been written
public abstract void waitForFilesToBeWritten(CompilerMessageLogger logger) throws InterruptedException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void waitToWrite();", "public void startFileWrite() {\r\n this.setStatus(false);\r\n this.isFileOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n }// run()\r\n });// Thread\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isFileOutStarted = false;\r\n }\r\n }", "public void waitForNewFiles() throws IOException {\n \n WatchService watcher = FileSystems.getDefault().newWatchService();\n Path dir = Paths.get(DATA_DIRECTORY);\n \n dir.register(watcher, ENTRY_CREATE);\n \n for (; ; ) {\n \n // wait for key to be signaled\n WatchKey key;\n try {\n key = watcher.take();\n } catch (InterruptedException x) {\n return;\n }\n \n for (WatchEvent<?> event : key.pollEvents()) {\n WatchEvent.Kind<?> kind = event.kind();\n \n \n if (kind == OVERFLOW) {\n continue;\n }\n \n \n WatchEvent<Path> ev = (WatchEvent<Path>) event;\n Path filename = ev.context();\n \n /* Verify that the new file is a text file.*/\n try {\n \n Path child = dir.resolve(filename);\n if (!Files.probeContentType(child).equals(\"text/plain\")) {\n System.err.format(\"New file '%s'\" +\n \" is not a plain text file.%n\", filename);\n continue;\n }\n \n \n } catch (IOException x) {\n System.err.println(x);\n continue;\n }\n \n \n /* Verify file name */\n if (!filename.toString().startsWith(\"posture_\") || !filename.toString().endsWith(\".txt\")) {\n continue;\n }\n \n \n try {\n processNewFile(DATA_DIRECTORY + filename.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }\n \n /* reset the key*/\n boolean valid = key.reset();\n if (!valid) {\n break;\n }\n }\n }", "public synchronized void beginWrite() {\n\t\tSystem.out.println(\"WRITER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint writeTurn = currentTurn;\n\t\tcurrentTurn++;\n\n\t\twhile(writeTurn != nextTurn || numReaders > 0 || numWriters > 0 ){ \n\t\t\t/********WAIT CALL*********/\n\t\t\ttry {\n//\t\t\tSystem.out.println(\"WRITER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\tthis.wait();\n//\t\t\tSystem.out.println(\"WRITER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t/**************************/\n\t\t}\n\t\t\n\t\t//Only increment when the writer is not blocked\n\t\t// (it is at front of queue)\n\t\tnumWriters++;\n\n\t}", "protected void closeNotSuccessful() {\n\t\tthis.writer.deblockQueue();\n\t}", "public synchronized void finishWriting() {\n readerNumber++; // readerNumber = -1 + 1 = 0; \n// readerNumber must be 0 at this point \n this.notifyAll(); // notify possible waiting writers or waiting readers \n }", "private boolean worthWaiting() {\n return !PsiDocumentManager.getInstance(myProject).hasUncommitedDocuments() && !ApplicationManager.getApplication().isWriteAccessAllowed() && !FileEditorsSplitters.isOpenedInBulk(myTextEditor.myFile);\n }", "private void finishFile() {\n\t\twriter.println();\n\t\twriter.println(\"; wait for any key press:\");\n\t\twriter.println(\"mov ah, 0\");\n\t\twriter.println(\"int 16h\");\n\t\twriter.println();\n\t\twriter.println(\"ret\");\n\t}", "public abstract void stopAcceptingFiles();", "public void onFinish() {\n \t\tmdrFile.write();\n \n \t\t// Close everything\n \t\tfor (Closeable file : toClose)\n \t\t\tUtils.closeFile(file);\n \t}", "public final synchronized void signalDataAvailable() {\n\n\t\t//\tNotify any waiting threads that the file data ia available\n\t\t\t\n\t\tnotifyAll();\n\t}", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "@Override\n public void imageComplete() throws IOException {\n\tif (done) throw new IOException(errorMsg(\"imageComplete\"));\n\tdone = true;\n\tsynchronized(recorder) {\n\t continueWriting = true;\n\t recorder.notify();\n\t}\n\tsynchronized(this) {\n\t try {\n\t\twhile (writingDone == false) {\n\t\t wait();\n\t\t}\n\t } catch(InterruptedException ie) {\n\t\twriteException = ie;\n\t } catch (IllegalMonitorStateException ime) {\n\t\twriteException = ime;\n\t }\n\t if (writeException != null) {\n\t\tString msg = errorMsg(\"cannotCreateFST\", getType());\n\t\tthrow new\n\t\t IOException(msg, writeException);\n\t }\n\t}\n }", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "private void waitForWatcherToStart(FileModificationEventWatcher watcher) throws InterruptedException {\n for (int i = 0; i < 10; i++) {\n if (watcher.isWatchRegistered()) {\n break;\n } else {\n Thread.sleep(100);\n }\n }\n if (!watcher.isWatchRegistered()) {\n throw new RuntimeException(\"Failed to start the watcher\");\n }\n }", "boolean hasCompleteFile();", "@Override\n protected boolean continueOnWriteError() {\n return true;\n }", "public synchronized void startFileAndDB(int fileOrDB, Runnable r) {\r\n this.dBInError = false;\r\n if (fileOrDB == 1) {\r\n // System.out.println(\"startFileWrite()\");\r\n this.startFileWrite();\r\n while (/* !dBInError&& */!this.dBOutError && (this.semaphore || (!this.is_alg_started\r\n || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))))) {\r\n try {\r\n Thread.sleep(200);\r\n // System.out.println(\"Started startFileWrite(): Still\r\n // waiting for finishing.\");\r\n // r.wait();\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n } else if (fileOrDB == 2) {\r\n // System.out.println(\"startDBWrite()\");\r\n this.startDBWrite();\r\n while (/* !dBInError&& */!this.dBOutError && (this.semaphore || (!this.is_alg_started\r\n || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))))) {\r\n try {\r\n // r.wait();\r\n Thread.sleep(200);\r\n // System.out.println(\"Started startDBWrite(): Still waiting\r\n // for finishing.\");\r\n } catch (Exception e) {\r\n }\r\n }\r\n }\r\n }", "boolean isFileEnded();", "@Override\r\n public void run() {\r\n\r\n // Thread: writes files\r\n if (Controller.this.isFileWriteInUse) {\r\n // System.out.println(\"isFileWriteInUse\");\r\n\r\n if (Controller.this.cw.getWritesOnlyFiles()) {// as long as\r\n // thread is\r\n // running\r\n int i = Controller.this.cw.writeFileProgress / 2;\r\n Controller.this.writeIntoFiles.setValue(i);\r\n Controller.this.writeIntoFiles.repaint();\r\n } else {\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tWriting into files finished.\");\r\n Controller.this.isFileWriteInUse = false;\r\n Controller.this.writeIntoFiles.setVisible(false);\r\n if (!Controller.this.isDBWriteInUse)\r\n Controller.this.setStatus(true);\r\n }\r\n } // fi isFileWriteInUse\r\n else\r\n // Thread: writes from file in DB\r\n if (Controller.this.isDBWriteInUse) {// as long write process in DB\r\n // runs\r\n // System.out.println(\"isDBWriteInUse\");\r\n\r\n // critical, because dbc_in is not available as object in the\r\n // beginning\r\n boolean dbc_inStillWork;\r\n try {\r\n dbc_inStillWork = Controller.this.dbc_in.stillWorks;\r\n } catch (Exception e) {\r\n dbc_inStillWork = false;\r\n }\r\n\r\n if (Controller.this.cw.getWritesOnlyFiles() || dbc_inStillWork) {// as\r\n // long\r\n // as\r\n // the\r\n // thread\r\n // is\r\n // running\r\n int i;\r\n if (dbc_inStillWork) {\r\n i = (Controller.this.cw.writeFileProgress / 2)\r\n + ((Controller.this.dbc_in.singleProgress * 50) / Controller.this.dbc_in.maxProgerss);\r\n } else {\r\n i = Controller.this.cw.writeFileProgress / 2;\r\n }\r\n Controller.this.writeIntoDBProgress.setValue(i);\r\n Controller.this.writeIntoDBProgress.repaint();\r\n } else {\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tWriting into DB finished.\");\r\n Controller.this.isDBWriteInUse = false;\r\n Controller.this.writeIntoDBProgress.setVisible(false);\r\n if (!Controller.this.isFileWriteInUse)\r\n Controller.this.setStatus(true);\r\n\r\n if (Controller.this.dBInError) {\r\n this.tImer.cancel();\r\n System.err.print(\"\\t FAILED!\\n\");\r\n Controller.this.setStatus(true);\r\n Controller.this.dBInError = false;\r\n\r\n // dBOutError=false;\r\n }\r\n\r\n } // esle\r\n } else\r\n // Thread: lloads from DB and writes in nodelist.tmp and\r\n // edgelist.tmp\r\n if (Controller.this.isDBReadInUse) {// as lng as read process is\r\n // active\r\n // System.out.println(\"isDBReadInUse\");\r\n\r\n Controller.this.loadFromDBProgress.setVisible(true);\r\n if (Controller.this.dbc_out.stillWorks) {\r\n // System.out.println(\"Loading from DB active ...\");\r\n int i = (Controller.this.dbc_out.singleProgress * 100) / Controller.this.dbc_out.maxProgerss;\r\n if (i < 1)\r\n i = 1;\r\n Controller.this.loadFromDBProgress.setValue(i);\r\n Controller.this.loadFromDBProgress.repaint();\r\n } else {\r\n // tImer.cancel();\r\n System.out.println(\"*\\tLoading from DB finished.\");\r\n Controller.this.isDBReadInUse = false;\r\n Controller.this.loadFromDBProgress.setVisible(false);\r\n\r\n if (Controller.this.dBOutError) {\r\n this.tImer.cancel();\r\n System.err.print(\"\\t FAILED!\\n\");\r\n\r\n Controller.this.setStatus(true);\r\n\r\n Controller.this.isGraphStarted = false;\r\n Controller.this.isDiagStarted = false;\r\n Controller.this.isFileWriteInUse = false;\r\n Controller.this.dBOutError = false;\r\n\r\n // dBInError=true;\r\n\r\n }\r\n }\r\n }\r\n // Thread: runs Chinese Whispers\r\n else if (!Controller.this.dBOutError && !Controller.this.dBInError) {\r\n // System.out.println(\"!dBOutError&&!dBInError\");\r\n\r\n Controller.this.calculateCWProgress.setVisible(true);\r\n Controller.this.CalculateCWLabel.setVisible(true);\r\n\r\n if (Controller.this.cw.isActive) {\r\n if (Controller.this.cw.getIteration() > 0)\r\n Controller.this.calculateCWProgress.setValue(\r\n (Controller.this.cw.getCurrentIteration() * 100) / Controller.this.cw.getIteration());\r\n Controller.this.calculateCWProgress.repaint();\r\n } else { // cw not active\r\n this.tImer.cancel();\r\n System.out.println(\"*\\tCalculating algorithm finished.\");\r\n Controller.this.calculateCWProgress.setVisible(false);\r\n Controller.this.CalculateCWLabel.setVisible(false);\r\n\r\n if (Controller.this.isGraphStarted) {\r\n // System.out.println(\"isGraphStarted\");\r\n Controller.this.setStatus(true);\r\n Controller.this.isAlgStartedForGraph = true;\r\n Controller.this.isGraphStarted = false;\r\n try {\r\n Thread t1 = new Thread(new MyGraphGUI(Controller.this.display_sub_current,\r\n (ChineseWhispers) Controller.this.cw.clone(), Controller.this.display_edges_temp,\r\n Controller.this.scale_temp, 30, Controller.this.display_degree_temp));\r\n t1.start();\r\n } catch (CloneNotSupportedException e) {\r\n e.printStackTrace();\r\n }\r\n } // fi isGraphStarted\r\n\r\n if (Controller.this.isDiagStarted) {\r\n // System.out.println(\"isDiagStarted\");\r\n Controller.this.setStatus(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.isDiagStarted = false;\r\n try {\r\n Thread t2 = new Thread(new Diagram((ChineseWhispers) Controller.this.cw.clone()));\r\n t2.start();\r\n } catch (CloneNotSupportedException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n } // fi isDiagStarted\r\n if (Controller.this.isFileOutStarted) {\r\n // System.out.println(\"isFileOutStarted\");\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n // isFileWriteInUse=false;\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n Controller.this.isFileOutStarted = false;\r\n } // fi isFileOutStarted\r\n if (Controller.this.isDBOutStarted) {\r\n // System.out.println(\"isDBOutStarted\");\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isDBWriteInUse = true;\r\n Controller.this.writeIntoDBProgress.setVisible(true);\r\n Controller.this.isAlgStartedForGraph = false;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(false, false, false);\r\n String pw = \"\";\r\n for (int i = 0; i < Controller.this.rpasswdfield.getPassword().length; i++)\r\n pw += Controller.this.rpasswdfield.getPassword()[i];\r\n\r\n Controller.this.dbc_in = new DBConnect(Controller.this.rhostfield.getText(),\r\n Controller.this.rdatabasefield.getText(), Controller.this.ruserfield.getText(),\r\n pw, Integer.parseInt(Controller.this.rportfield.getText()),\r\n Controller.this.otablenamefield.getText(), COLUMN_NAMES_FOR_DB_OUT);\r\n\r\n // File: Controller.CLASSES_TMP_FILENAME\r\n // Columns: Controller.COLUMN_NAMES_FOR_DB_OUT\r\n try {\r\n Controller.this.dbc_in.stillWorks = true;\r\n Controller.this.dbc_in.maxProgerss = Controller.this.cw.countNodesWithClasses;\r\n Controller.this.dbc_in.writeFromFileIntoDB();\r\n } catch (IOWrapperException iow_e) {\r\n System.err.println(\"Error while writing into DB!\\nConnection failed!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nConnection failed!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n } // end catch WrapperException\r\n catch (IOIteratorException ioi_e) {\r\n System.err.println(\"Error while writing into DB!\\nCould not iterate over results!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nCould not iterate over results!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n }\r\n Controller.this.isDBOutStarted = false;\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n Controller.this.isDBOutStarted = false;\r\n } // end isDBOutStarted\r\n\r\n } // esle CW not active\r\n\r\n } // fi (!dBOutError && !dBInError)\r\n\r\n }", "public void compareAllFiles(){\n\n // setting up objects for comparing files\n System.out.println(\"Start of checking process of all files\");\n String file = \"\";\n int fileErrors = 0;\n FileWriter logFile = null;\n BufferedWriter logFileOut = null;\n\n try {\n logFile = new FileWriter(\"java_20/server/logFile.txt\");\n logFileOut = new BufferedWriter(logFile);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n // for loop to check over all files and updates logfiles\n for (int currentFile = 1; currentFile <= fileCount; currentFile++) {\n file = \"java_20/server/receivedFiles/receivedFile\"+currentFile+\".txt\";\n\n try {\n if (compareFile(file,\"java_20/server/standardFile.txt\") == false ){\n fileErrors++;\n logFileOut.write(\"ReceivedFile\"+currentFile+\":\\tERROR!!!!\\n\");\n }\n else\n logFileOut.write(\"ReceivedFile\"+currentFile+\":\\tpassed\\n\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n\n // closing files and messages\n try {\n logFileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(\"Number of errors found: \" + fileErrors);\n System.out.println(\"check \\'logFile.txt\\' for details\");\n\n }", "@Test\n void fileWriter() {\n\n\n ArrayList<String> fileLines = Name_Sorter.fileRead(this.readFile, \"src/main/java/oop/assignment3/ex41/base/testFile-ex41\");\n Collections.sort(fileLines);\n this.writeFile = Name_Sorter.fileWriter(this.writeFile, fileLines, \"src/main/java/oop/assignment3/ex41/base/ex41-testOutputFile.txt\");\n boolean actualOutput = this.writeFile != null;\n Assertions.assertTrue(actualOutput);\n }", "void waitToRead();", "protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }", "public void run(){\n\t\tFileFeeder fileFeeder = new FileFeeder(mySQLConnection,logWindow, fileIssueList, true);\n\t\tThread feederThread = new Thread(fileFeeder);\n\t\tfeederThread.start();\n\t\twhile (moreFilesComing || !fileList.isEmpty()){ //if more data still to process or more data coming\n\t\t\tDataFile dataFile;\n\t\t\tif ((dataFile = fileList.poll()) != null){ //something to actually write\n\t\t\t\tsynchronized(fileList){\n\t\t\t\t\tfileList.notify();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlogWindow.println(\"Processing data from file: \"+dataFile.fileName+\"...\");\n\t\t\t\t\n\t\t\t\tBufferedReader inputStream = null;\n\t\t\t\ttry {\n\t\t\t\t\tinputStream = new BufferedReader(new FileReader(dataFile.file));\n\t\n\t\t\t\t\tString fileDateFormat = getFileInfo(dataFile,inputStream);\n\t\t\t\t\t\n\t\t\t\t\tif (dataFile.frequency!=0 && !dataFile.meterSerial.equals(\"\")){ //if got valid info\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tString fileExistsSQL = \"SELECT * FROM files WHERE site_id = \"+dataFile.siteID+\" AND source_id = \"+dataFile.sourceID+\" AND file_name = '\"+dataFile.fileName+\"' AND meter_sn = '\"+dataFile.meterSerial+\"' AND frequency = \"+dataFile.frequency;\n\t\t\t\t\t\t\tResultSet fileExistsQuery = dbConn.createStatement().executeQuery(fileExistsSQL);\n\t\t\t\t\t\t\tif (fileExistsQuery.next()==false){ //if no files with same site,source,filename,meterserial and frequency exist\n\n\t\t\t\t\t\t\t\tgetValidData(dataFile,fileDateFormat,inputStream);\n\n\t\t\t\t\t\t\t\tif (dataFile.dataList.size()>0){\n\t\t\t\t\t\t\t\t\tlogWindow.println(\"Processing of data complete.\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*try{\n\t\t\t\t\t\t\t\t\t\tString fetchRangeLimitsSQL = \"SELECT min,max FROM ranges WHERE source_id = \"+dataFile.sourceID+\" AND site_id = \"+dataFile.siteID;\n\t\t\t\t\t\t\t\t\t\tResultSet fetchRangeLimitsRS = dbConn.createStatement().executeQuery(fetchRangeLimitsSQL);\n\n\t\t\t\t\t\t\t\t\t\tif (fetchRangeLimitsRS.next()){\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMin = fetchRangeLimitsRS.getDouble(\"min\");\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMax = fetchRangeLimitsRS.getDouble(\"max\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tlogWindow.println(\"No range limits found for \"+dataFile.sourceID+\" or site \"+dataFile.siteID+\". Adding defaults now...\");\t\n\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMin = Source.getRangeMin(dataFile.sourceType,dataFile.measurementType);\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMax = Source.getRangeMax(dataFile.sourceType,dataFile.measurementType,dataFile.frequency);\n\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString setRangeLimitsSQL = \"INSERT INTO ranges (site_id,source_id,min,max) VALUES(\"+dataFile.siteID+\",\"+dataFile.sourceID+\",\"+dataFile.rangeMin+\",\"+dataFile.rangeMax+\")\";\n\t\t\t\t\t\t\t\t\t\t\t\tdbConn.createStatement().executeUpdate(setRangeLimitsSQL);\n\t\t\t\t\t\t\t\t\t\t\t}catch(SQLException sE){ //NON FATAL\n\t\t\t\t\t\t\t\t\t\t\t\tsE.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\tlogWindow.println(\"Warning: could not write range limits to database for file \"+dataFile.fileName+\".\");\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\t\t\t\t\t\tdateFormatter.setTimeZone(TimeZone.getTimeZone(\"GMT+10\"));\n\t\t\t\t\t\t\t\t\t\tdataFile.startDate = dateFormatter.format(dataFile.dataList.get(0).dateTime);\n\t\t\t\t\t\t\t\t\t\tdataFile.endDate = dateFormatter.format(dataFile.dataList.get(dataFile.dataList.size()-1).dateTime);*/\n\n\t\t\t\t\t\t\t\t\t\tfileFeeder.addFile(dataFile); //Send file to feeder\n\n\t\t\t\t\t\t\t\t\t/*} catch (SQLException sE){\n\t\t\t\t\t\t\t\t\t\tsE.printStackTrace();\n\t\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tlogWindow.println(\"Ignored file \"+dataFile.fileName+\". No Data found in file.\");\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tlogWindow.println(\"Ignored file \"+dataFile.fileName+\". This file already exists for source \"+dataFile.sourceID+\" at site \"+dataFile.siteID+\".\");\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch(SQLException sE){\n\t\t\t\t\t\t\t//TODO need error here\n\t\t\t\t\t\t\tsE.printStackTrace();\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\tlogWindow.println(dataFile.frequency+\" \"+dataFile.meterSerial);\n\t\t\t\t\t\tlogWindow.println(\"Ignored file \"+dataFile.fileName+\". Could not determine essential file information.\");\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} catch (IOException err){\n\t\t\t\t\tdataFile.dataList.clear();\n\t\t\t\t\tlogWindow.println(\"Unable to read from file: \"+dataFile.fileName+\"\\r\\nNo data will be written from this file.\");\n\t\t\t\t\tSystem.err.println(\"IOException: \"+err.getMessage());\n\t\t\t\t} finally {\n\t\t\t\t\tif (inputStream != null){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinputStream.close();\n\t\t\t\t\t\t} catch (IOException err) {\n\t\t\t\t\t\t\tSystem.err.println(\"IOException: \"+err.getMessage());\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\ttry{\n\t\t\t\tsynchronized(fileList){ //waiter\n\t\t\t\t\twhile (moreFilesComing && fileList.isEmpty()){\n\t\t\t\t\t\tfileList.notify(); //notify adder just in case things got stuck\n\t\t\t\t\t\tfileList.wait(); //wait for a file to be added to file List.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tsynchronized(fileFeeder.fileList){\n\t\t\tfileFeeder.moreFilesComing = false;\n\t\t\tfileFeeder.fileList.notify();\n\t\t}\n\t\ttry {\n\t\t\tfeederThread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Date endTime = new Date();\n\t\t//logWindow.println(\"Finished sending file(s) to writer for source: \"+sourceID);\n\t\t//logWindow.println(\"Time taken: \"+getTimeString(endTime.getTime()-startTime.getTime()));\n\t}", "@Override\r\n public void run()\r\n {\r\n File server_Dir_Files = new File(client_Info.getDir());\r\n File[] server_Files = server_Dir_Files.listFiles();\r\n boolean check;\r\n ArrayList<String> user_Files = new ArrayList<>();\r\n try\r\n {\r\n DataInputStream data_Receive = new DataInputStream(client_Info.getUserSocket().getInputStream());\r\n\r\n int files_Number = data_Receive.readInt();\r\n for(int i = 0; i < files_Number; i++)\r\n {\r\n user_Files.add(data_Receive.readUTF());\r\n }\r\n\r\n for(int i = 0; i<server_Files.length; i++)\r\n {\r\n check = false;\r\n for(int j = 0; j<user_Files.size(); j++)\r\n {\r\n if(server_Files[i].getName().equals(user_Files.get(j)))\r\n {\r\n check = true;\r\n break;\r\n }\r\n }\r\n if(check == false)\r\n {\r\n Thread send_File = new ServerSendFile(client_Info, server_Files[i].getName());\r\n send_File.start();\r\n }\r\n }\r\n Thread.sleep(3000);\r\n }\r\n catch(IOException | InterruptedException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n last_Operation.clear();\r\n File old_Dir = new File(client_Info.getDir());\r\n File[] old_Dir_Files = old_Dir.listFiles();\r\n\r\n while(true)\r\n {\r\n try\r\n {\r\n Thread.sleep(3000);\r\n File new_Dir = new File(client_Info.getDir());\r\n File[] new_Dir_Files = new_Dir.listFiles();\r\n\r\n if(new_Dir_Files.length > old_Dir_Files.length)\r\n {\r\n for(int i = 0; i < new_Dir_Files.length; i++)\r\n {\r\n check = false;\r\n for(int j = 0; j < old_Dir_Files.length; j++)\r\n {\r\n if(new_Dir_Files[i].getName().equals(old_Dir_Files[j].getName()))\r\n {\r\n check = true;\r\n break;\r\n }\r\n }\r\n if(check == false)\r\n {\r\n if(last_Operation.size() > 1)\r\n {\r\n if(last_Operation.get(0).equals(\"send\") && last_Operation.get(1).equals(new_Dir_Files[i].getName()))\r\n {\r\n last_Operation.remove(0);\r\n last_Operation.remove(0);\r\n continue;\r\n }\r\n }\r\n else\r\n {\r\n Thread send_File = new ServerSendFile(client_Info, new_Dir_Files[i].getName());\r\n send_File.start();\r\n }\r\n }\r\n }\r\n }\r\n old_Dir = new_Dir;\r\n old_Dir_Files = old_Dir.listFiles();\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n protected void done() {\n super.done();\n if (!this.isCancelled()) {\n openMergeModifiedFile(); \n }\n }", "private void waitForFilesToSettle(SequencingObject... filePairs) {\n\t\tSet<SequenceFile> files = null;\n\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t} catch (final InterruptedException e) {\n\n\t\t\t}\n\t\t\tfiles = Arrays.stream(filePairs)\n\t\t\t\t\t.map(p -> sequencingObjectService.read(p.getId()))\n\t\t\t\t\t.map(p -> p.getFiles())\n\t\t\t\t\t.flatMap(l -> l.stream())\n\t\t\t\t\t.collect(Collectors.toSet());\n\t\t} while (!files.stream().allMatch(f -> f.getFastQCAnalysis() != null));\n\t}", "private void ensureWrite() throws IOException {\n if (!reading) return;\n resetForWrite();\n }", "public void uploadMultipleFilesWithOneIncorrectData() throws InterruptedException {\n\t\tlog.info(line);\n\t\tAssert.assertTrue(clickAllActionButton.uploadMultipleFiles(),\n\t\t\t\t\"success and error message are displayed for respective files\");\n\t}", "public void waitToFinish()\n {\n while(!this.finished)\n {\n try\n {\n Thread.sleep(1);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n return;\n }\n }\n }", "boolean fileEnd();", "public void run() {\n\t\twhile(running){\n\t\t\t\n\t\t\tif (!thingsToWrite.isEmpty()){\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tString s = (String) thingsToWrite.get(0);\n\t\t\t\t\tif(s.equals(\"file\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//write \"files\"\n\t\t\t\t\t\toos.writeObject(thingsToWrite.getNRemoveFirst());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//need to wait for synchro //HARDCODED, ideal : 1 command\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//write the dataObject\n\t\t\t\t\t\toos.writeObject(thingsToWrite.getNRemoveFirst());\n\n\t\t\t\t\t\t//need to wait for synchro //HARDCODED, ideal : 1 command\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//write the file\n\t\t\t\t\t\tbyte[] content = ( byte[] )thingsToWrite.getNRemoveFirst();\n\t\t\t\t\t\toos.writeObject(content);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"file Sent\");\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(s.startsWith(\"addRepo\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\toos.writeObject(s);\n\t\t\t\t\t\tthingsToWrite.remove(0);\n\t\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t\toos.writeObject(s);\n\t\t\t\t\t\tthingsToWrite.remove(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (IOException | InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addFilesToWriter()\n throws Exception {\n Set<Map.Entry<String, Map.Entry<String, byte[]>>> set = files.entrySet();\n for (Map.Entry<String, Map.Entry<String, byte[]>> me : set) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\n \"Content-Disposition: form-data; name=\\\"\" + me.getKey()\n + \"\\\"; filename=\\\"\" + me.getValue().getKey() + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\n \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(me.getValue().getKey()))\n .append(LINE_FEED);\n writer.append(LINE_FEED);\n writer.flush();\n\n outputStream.write(me.getValue().getValue(), 0, me.getValue().getValue().length);\n outputStream.flush();\n\n writer.append(LINE_FEED);\n writer.flush();\n }\n }", "private static void prepareOutputFile() {\n try {\n outputFileBuffer = new BufferedWriter(new FileWriter(PATH+OUTPUT_FILE_NAME));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void setQWForFiles(Writer writer)\r\n\t{\r\n\t\tqw = new CountingQuietWriter(writer, errorHandler);\r\n\t}", "public boolean fileIsReady()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(notFound)\n\t\t\t{\n\t\t\t\tisReady = false;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tisReady = reader.ready();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException ioe)\n\t\t{\n\t\t\t//\n\t\t}\n\n\t\treturn isReady;\n\t}", "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}", "public synchronized void finishReading() {\n readerNumber--;\n if (readerNumber == 0) {\n this.notifyAll(); // notify possible waiting writers \n }\n }", "private void waitForWriting(final Locale locale) {\n final UserHistoryDictionary dict = PersonalizationHelper.getUserHistoryDictionary(\n mContext, locale);\n dict.waitAllTasksForTests();\n }", "public void close(){\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tthis.fileWriter.flush();\r\n\t\t\t\tthis.fileWriter.close();\r\n\t\t\t\tthis.fileWriter = null;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot close the file handle \"+this.myfilename+\". Your results might be lost. Cause: \"+e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}", "@Override\n public void saveFile() {\n LOG.fine(\"no.of viewers:\" + viewers.size());\n // assuming the widget that is active is the dirty widget. save it\n for (FileViewer viewer : viewers) {\n if (viewer.isDirty()) {\n saveFile(viewer);\n break;\n }\n }\n }", "void notifyWrite();", "@Override\n public void run() {\n\n\n try {\n WatchService watchService = FileSystems.getDefault().newWatchService();\n Path path = Paths.get(INPUT_FILES_DIRECTORY);\n\n path.register( watchService, StandardWatchEventKinds.ENTRY_CREATE); //just on create or add no modify?\n\n WatchKey key;\n while ((key = watchService.take()) != null) {\n for (WatchEvent<?> event : key.pollEvents()) {\n\n String fileName = event.context().toString();\n notifyController.processDetectedFile(fileName);\n\n }\n key.reset();\n }\n\n } catch (Exception e) {\n //Logger.getGlobal().setUseParentHandlers(false);\n //Logger.getGlobal().log(Level.SEVERE, e.toString(), e);\n\n }\n }", "private void waitBetweenRead() {\n\t\ttry {\n\t\t\twait(250); // wait 250 ms before collecting data again\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "public void returnFile(WriterPoolMember writer)\n throws IOException {\n synchronized(this) {\n if(writer.isOversize()) {\n // maybe retire writer rather than recycle\n if(lastWriterNeededTime<=lastWriterRolloverTime) {\n // no timeouts waiting for recycled writer since last writer rollover\n destroyWriter(writer);\n return;\n } else {\n // reuse writer instance, causing new file to be created\n lastWriterRolloverTime = System.currentTimeMillis();\n }\n }\n }\n if(!availableWriters.offer(writer)) {\n logger.log(Level.WARNING, \"writer unreturnable to available pool; closing early\");\n destroyWriter(writer); \n }\n }", "protected abstract void handleWriteCompleted() throws IOException, BadAttributeException;", "@Test\r\n\tpublic void mainTest() throws ExceptionMP, InterruptedException {\n\t\tBot bot = new Bot();\r\n\t\tThread t = new Thread(bot);\r\n\t\tt.start();\r\n\t\tThread.sleep(10000);\r\n\r\n\t\t// check if the file has been created\r\n\t\tboolean fileCreated = false;\r\n\t\tFile file = new File(Config.getFilepathSystem() + \"/output/\");\r\n\t\tFile[] files = file.listFiles();\r\n\t\tfor (File f : files) {\r\n\t\t\tif (f.getPath().contains(\"portrait_of_finnish_bands\")) {\r\n\t\t\t\tfileCreated = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tassertTrue(fileCreated);\r\n\t}", "@Override\n\t\tpublic void lock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twhile (readers > 0 || writers > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlock.wait();\n\t\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twriters++;\n\t\t\t}\n\t\t}", "protected void work() {\n try {\n if(theFile!=null) { \n //construct filePath, fileSize\n int fileSize = theFile.getFileSize();\n if(fileSize==0) fileSize=1;\n String filePath = path+\"/\"+theFile.getFileName();\n if(log.isDebugEnabled()) log.debug(\"Uploading file: \"+filePath+\", filesize: \"+fileSize/1000+\"KB\");\n\t\t\t\n //write out file\n InputStream stream = theFile.getInputStream();\n OutputStream bos = new FileOutputStream(filePath);\n int bytesRead = 0;\n byte[] buffer = new byte[Constants.FILEUPLOAD_BUFFER];\n while(isRunning() && ((bytesRead = stream.read(buffer, 0, Constants.FILEUPLOAD_BUFFER)) != -1)) {\n bos.write(buffer, 0, bytesRead);\n sum+=bytesRead;\n setPercent(sum/fileSize);\n }\n bos.close();\n stream.close();\n }\n } catch(Exception ex) {\n setRunning(false);\n log.error(\"Error while uploading: \"+ex.getMessage());\n ex.printStackTrace();\n }\n }", "protected void checkOpen() throws IOException {\n if (this.stopRequested.get() || this.abortRequested) {\n throw new IOException(\"Server not running\");\n }\n if (!fsOk) {\n throw new IOException(\"File system not available\");\n }\n }", "private void customWait() throws InterruptedException {\n while (!finished) {\n Thread.sleep(1);\n }\n finished = false;\n }", "synchronized void \n receivedLast() \n {\n closedByWriter = true;\n notifyAll();\n }", "@Override\n\tpublic void run()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\tif (f.lastModified() > lastModified)\n\t\t\t{\n\t\t\t\tprocessFile(false);\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep(60000);\n\t\t\t}\n\t\t\tcatch (InterruptedException ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t}", "public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }", "@Override\n\tpublic void run() {\n\t\tboolean done = false;\n\t\t\n\t\twhile(!done){\n\t\t\tFile file;\n\t\t\ttry {\n\t\t\t\tfile = queue.take();\n\t\t\t\tif(file == FileEnumrationTask.Dummy){\n\t\t\t\t\tdone = true;\n\t\t\t\t\tqueue.put(file);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tserch(file);\n\t\t\t\t}\n\t\t\t} catch (InterruptedException | FileNotFoundException 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}", "String readAll(String pressNum){ // TODO - Make a chooseable way for which steps to check . Each step contains a series of checks that the user will do , only verify those checks\n // All files to write to / read from\n File listIOLog = new File(folderName + FILE_LIST_IO_LOG); // Write only the values which are different\n File listTodo = new File(folderName + \"Todosteps.txt\"); // This file have all the steps that are needed\n File completedStep = new File( folderName + FILE_LIST_STEPS_COMPLETED);\n\n\n BufferedReader fileBr = null;\n BufferedReader fileTodoBr = null;\n BufferedReader fileCompletedBr = null;\n BufferedWriter fileTodoBw = null;\n BufferedWriter fileBw = null; // Temp to used in many places\n BufferedWriter fileBwLog = null;\n BufferedWriter fileCompletedBw = null;\n\n String completed = \"Completed\";\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n\n if (!reading) {\n reading = true; // Started to read the files\n try {\n fileTodoBr = new BufferedReader(new FileReader(listTodo));\n fileCompletedBr = new BufferedReader(new FileReader(completedStep));\n fileTodoBw = new BufferedWriter(new FileWriter(listTodo));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n fileCompletedBw = new BufferedWriter(new FileWriter(completedStep, true));\n\n String fileTodo = fileTodoBr.readLine(); // Start reading\n String fileCompleted = fileCompletedBr.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread());\n\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\";\n String topicName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0; // Counter to know how many completion service where open\n int topicCounter = 0;\n Map<String, String> topicMap = new HashMap<>();\n Map<String, Integer> stepMap = new HashMap<>();\n\n List<String> completedList = new ArrayList<>(); // List of completed steps\n List<String> todoList = new ArrayList<>();\n List<String> stepList = new ArrayList<>(); // Save all the steps (Step1, Step2 ...)\n\n // File read all the completed steps and save\n while (fileCompleted != null && fileCompleted.contains(completed)) { // While the there is next line and the line contains completed\n\n completedList.add(fileCompleted);\n fileCompleted = fileCompletedBr.readLine(); // Next line\n\n } // File read end\n\n\n // Read the amount of steps needed and add them to the todolist, then save in an arraylist\n for (int stepsReading = 0 ; fileTodo != null && stepsReading < STEPS_TO_READ ; stepsReading++) { // TODO - Add check if the number isn't missing\" (1,2,3,[missing],5 ..)\n\n todoList.add(fileTodo);\n fileTodo = fileTodoBr.readLine(); // Next line\n } // File read end\n\n // Save in a list all the steps of IO\n for(String steps : todoList){ // Maybe write a method in util/interface as it will be needed for Reg\n String[] stepName = steps.trim().split(\" \"); // [0] = step number , [1] = step title , [2] = completed / not\n String step = stepName[0] + \" \" + stepName[1];\n stepList.add(step);\n }\n\n\n for(String step : stepList){\n\n String[] splitStep = step.trim().split(\" \"); // [0] = step number , [1] = step title\n String newStep = splitStep[0];\n String stepFile = SYSTAB_STEPIO_FOLDER + newStep + \"IO.text\"; // Check if it create the folder if doesn't exist\n\n File stepFileCurr = new File(pressNum + SYSTAB_STEPIO_FOLDER + \"Curr\" + newStep + \"IO.text\"); // FolderName\\StepIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n File stepFileFresh = new File(pressNum + stepFile); // FolderName\\StepIO\\StepxIO.txt - File without value , only the name of the systabIO\n\n\n if (!stepFileCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(stepFileFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(stepFileCurr)); // Add exception for only file not found ?\n }\n// String[] stepName = step.trim().split(\" \"); // [0] = step number , [1] = step name\n String fileData = fileBr.readLine(); // Start reading\n\n while (fileData != null) {\n\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topic name , [1] = value , [2] = completed(only when completed)\n\n if(topicDetails.length > 2 && topicDetails[2].equals(completed)) continue; // The current topic is already completed and don't need to check again -> continue to the next topic\n\n topicName = topicDetails[0]; // Readability\n if (topicDetails.length > 1) { // -> there is a value\n topicValue = topicDetails[1]; // Readability , verify only here if it really exist\n topicMap.put(topicName,topicValue); // Save the topic name and value as my temp\n } else {\n topicMap.put(topicName,\"\"); // No topic value\n }\n\n // Start futuretask completion service -> Start process to read the SystabIO\n completionService.submit(new CallSystabIo(topicName, newStep)); // TEST\n counterRequest++;\n stepMap.put(newStep, ++topicCounter); // Save the step with the counter of how many topics there is\n\n fileData = fileBr.readLine(); // Next line\n } // No more topics to read from , continue to the next step\n\n stepFileCurr.delete(); // Delete it as all the data was read and saved , for later create a new current file with the new values\n }\n\n\n // Take results from process\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request were submit to completion service\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = step number . [1] = topic name , [2] = value\n String stepNumber = endResultArr[0];\n String newTopicName = endResultArr[1];\n String newValue = endResultArr[2];\n String endResult = newTopicName + \" \" + newValue;\n\n // Create the new current file with new values\n File stepFileCurr = new File(pressNum + SYSTAB_STEPIO_FOLDER + \"Curr\" + stepNumber + \"IO.text\"); // FolderName\\StepIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press) -> Done current topic check\n if (!endResultArr[2].equals(topicMap.get(endResultArr[1]))){ // Check if the new value and old value are equal , not equal -> show to user and save in log\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n // TODO - Change the values to On / Off\n String logResult = timeStamp + \" \" + stepNumber + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n\n fileBw = new BufferedWriter(new FileWriter(stepFileCurr));\n fileBw.write(endResult + \" \" + completed);\n fileBw.newLine();\n\n int remainTopics = stepMap.get(stepNumber) - 1; // This topic is done -> one less topic in the step\n if(remainTopics == 0){ // When the step don't have any more topics to check , it will remove from the step list and add to the completed step list\n stepList.remove(stepNumber);\n completedList.add(stepNumber);\n }\n stepMap.put(stepNumber, remainTopics);\n\n } else { // When the topic isn't complete\n fileBw = new BufferedWriter(new FileWriter(stepFileCurr));\n fileBw.write(endResult);\n fileBw.newLine();\n }\n\n\n\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n\n listTodo.delete(); // Delete the file to reset the list and write the remain steps\n completedStep.delete(); // Delete the file to reset the list and write the remain steps\n\n // First write all the completed steps\n for (String step: completedList){\n fileCompletedBw.write(step + \" \" + completed);\n fileCompletedBw.newLine();\n }\n // Then all the undone steps\n for (String step: stepList){\n // Write in the completed file\n fileCompletedBw.write(step + \" Undone\");\n fileCompletedBw.newLine();\n // Write in the todosteps , the next time it read only the remaining steps\n fileTodoBw.write(step);\n fileTodoBw.newLine();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error IO\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n reading = false; // Finish to read all\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileTodoBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "public synchronized List getBufferForWriting() {\n// if some writer is writing or some reader is reading, wait until no one is writing or reading \n while (readerNumber != 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber == 0 \n readerNumber--; // now readderNumber == -1. \n return buffer;\n }", "private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}", "@Override\n\t\tpublic void lock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twhile (writers > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlock.wait();\n\t\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treaders++;\n\t\t\t}\n\t\t}", "public void signalFinished() throws IOException {\n\t\t// signal the file is done\n\t\tbyte[] data = new byte[PACKET_SIZE];\n\t\tdata[0] = (byte) this.sequence; // set the sequence number\n\t\tdata[1] = (byte) END_BYTES; // send number of bytes read\n\t\tDatagramPacket dp = new DatagramPacket(data, data.length, this.ia, receiverPort);\n\t\tthis.logger.debug(\"Signaling the file is done transferring\");\n\t\ttry {\n\t\t\tthis.socket.send(dp);\n\t\t\tthis.socket.receive(this.in_packet);\n\t\t\tif (!this.in_packet.getAddress().equals(this.ia)) {\n\t\t\t\tthis.logger.debug(\"Not from the send address\");\n\t\t\t\tthis.signalFinished();\n\t\t\t} else {\n\t\t\t\tif (this.in_packet.getData()[0] == this.sequence) {\n\t\t\t\t\tthis.logger.debug(\"Package was ack\");\n\t\t\t\t\tthis.sequence = (this.sequence + 1) % 2; // update the sequence number\n\t\t\t\t} else {\n\t\t\t\t\tthis.logger.debug(\"Acknowledgement for wrong package\");\n\t\t\t\t\tthis.signalFinished();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(SocketTimeoutException e) {\n\t\t\tthis.logger.debug(\"Timeout occurred so resending packet\");\n\t\t\tthis.signalFinished();\n\t\t}\n\t\tthis.logger.debug(\"Done sending file\");\n\t}", "@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twriters--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\t\t}", "@Test\n public void testBug235928() throws IOException, InterruptedException {\n\n final Semaphore s = new Semaphore(0);\n\n /**\n * Listener that enables running of thread t2 while the events are\n * processed in the main thread.\n */\n final FileChangeListener fcl = new FileChangeAdapter() {\n @Override\n public void fileFolderCreated(FileEvent fe) {\n s.release(); // Thread t2 can run.\n try {\n s.acquire(2); // Wait until thread t2 is finished.\n } catch (InterruptedException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n };\n\n Thread t2 = new Thread(new Runnable() {\n @Override\n public void run() {\n FileChangeListener l = new FileChangeAdapter();\n try {\n s.acquire();\n // Try to add a listener, to ensure that the keeper object\n // is not locked.\n workDirFO.addRecursiveListener(l);\n s.release(2);\n } catch (InterruptedException ex) {\n Exceptions.printStackTrace(ex);\n } finally {\n workDirFO.removeRecursiveListener(l);\n }\n }\n });\n\n workDirFO.addRecursiveListener(fcl);\n try {\n t2.start();\n // Create folder and process events.\n workDirFO.createFolder(\"test\");\n t2.join();\n } finally {\n workDirFO.removeRecursiveListener(fcl);\n }\n }", "public void sendFile() throws Exception {\n\t\tthis.logger.info(\"Sender: sending file\");\n\t\tlong senderStartTime = System.nanoTime();\n\t\tboolean done = false;\n\t\tDatagramPacket dp;\n\t\twhile (!done) {\n\t\t\twhile (!this.pw.windowFull() && (dp = this.readyPacket()) != null) {\n\t\t\t\tthis.pw.appendPacket(this.packetNumber, dp); // add the packet to the window\n\t\t\t\tthis.logger.debug(\"Adding packet: \" + this.packetNumber);\n\t\t\t\tthis.packetNumber = (this.packetNumber + 1) % 128;\n\t\t\t}\n\t\t\tthis.pw.transmitWindow(this.socket);\n\t\t\tthis.lastSent = System.nanoTime();\n\t\t\tthis.receivePacket();\n\t\t\tdone = this.pw.doneYet(); // all packages have been acknowledged\n\t\t\tthis.logger.debug(\"Done yet: \" + done + \" \" + this.doneReading);\n\t\t\tif (done && !this.doneReading) {\n\t\t\t\tdone = this.doneReading; // still need to read some packets\n\t\t\t}\n\t\t}\n\t\tthis.signalFinished(); // signal done sending file\n\t\tlong senderEndTime = System.nanoTime();\n\t\tdouble seconds = (senderEndTime - senderStartTime) / NS_TO_S;\n\t\tthis.logger.info(\"Sender: file sending complete\");\n\t\tthis.logger.info(String.format(\"Total time to send file: %.3f seconds\", seconds));\n\t\tthis.logger.info(\"Total file size: \"+ this.totalBytesRead +\" bytes\");\n\t}", "public boolean finished() throws IOException {\n // Default implementation returns true.\n return true;\n }", "private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}", "public void shutdown() {\n\t\tint i = 0;\n\t\twhile (i < openFiles.size()) {\n\t\t\tPhile phile = openFiles.get(i);\n\t\t\ttry {\n\t\t\t\tclose(phile);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\ti++;\n\t\t}\n }", "public void OnFileComplete();", "private void findFiles(Path file) throws InterruptedException {\n Path name = file.getFileName();\n if (name != null && matcher.matches(name)) {\n System.out.println(String.format(\"Put file [%s] to files queue\", file));\n files.put(file.toString());\n }\n }", "@Override\n \tpublic void run()\n \t{\n \t\tif (!cleanupRunning.compareAndSet(false, true))\n \t\t\treturn;\n \t\t\n \t\tfor (UUID uuid : protectedAnimals.keySet().toArray(new UUID[0]))\n \t\t{\n \t\t\tremoveIfInactive(uuid);\n \t\t}\n \t\t\n \t\ttry\n \t\t{\n \t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(protectedAnimalsFile));\n \t\t\toos.writeObject(protectedAnimals);\n \t\t\toos.close();\n \t\t\tnumAttempts = 0;\n \t\t} catch (IOException e)\n \t\t{\n \t\t\tP.p().getLogger().severe(\"Error writing protected animals list to file\");\n \t\t\t\n \t\t\tif (++numAttempts >= 5)\n \t\t\t{\n \t\t\t\tP.p().getLogger().severe(\"Max attempts to write file exceeded, no more attempts will be made\");\n \t\t\t\tcancel();\n \t\t\t}\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\tcleanupRunning.set(false);\n \t}", "private static void saveActionPerformed(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setDialogType(JFileChooser.OPEN_DIALOG);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Text files\", \"txt\");\r\n chooser.setFileFilter(filter);\r\n int returnVal = chooser.showOpenDialog(frame);\r\n if (returnVal == JFileChooser.APPROVE_OPTION) { \r\n try(BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(chooser.getSelectedFile()), \"UTF-8\"))){\r\n writeChosenSchedule(bw); \r\n \r\n JOptionPane.showMessageDialog(null, \"The schedule was successfully saved.\",\r\n \"Info\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n catch(IOException e){\r\n Logger.getLogger(\"File saving\").log(Level.WARNING, \"Could not write to the file\", e);\r\n JOptionPane.showMessageDialog(null, \"Failed to save the schedule to the chosen file!\",\r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }", "static boolean processFilesForValidation(Scanner[] scanners, PrintWriter[] writers) {\r\n try {\r\n for (int id = 0; id < filenames.length; ++id) {\r\n Scanner scanner = (Scanner)scanners[id];\r\n PrintWriter writer = (PrintWriter)writers[id];\r\n String file = filenames[id];\r\n \r\n // Check fields\r\n if (!scanner.hasNextLine())\r\n throw new CSVFileInvalidException(file, 0, null);\r\n String line = scanner.nextLine();\r\n int missing = 0;\r\n String[] fields = getRecords(line);\r\n for (String s : fields) {\r\n if (s.trim().isEmpty())\r\n missing++;\r\n }\r\n if (missing > 0)\r\n throw new CSVFileInvalidException(file, missing, fields);\r\n \r\n // Check records\r\n writer.println(\"[\");\r\n boolean first = true;\r\n missing = 0;\r\n while (scanner.hasNextLine()) {\r\n missing++;\r\n line = scanner.nextLine();\r\n String[] records = getRecords(line);\r\n \r\n // Check if records are valid\r\n boolean valid = true;\r\n for (String record : records) {\r\n if (record.isEmpty()) {\r\n valid = false;\r\n break;\r\n }\r\n }\r\n if (!valid || records.length != fields.length) {\r\n writer.close();\r\n throw new CSVDataMissing(file, missing, fields, records);\r\n }\r\n\r\n if (!first)\r\n writer.println(\",\");\r\n first = false;\r\n\r\n writer.println(\" {\");\r\n for (int i = 0; i < fields.length; i++) {\r\n writer.println(\" \\\"\" + fields[i] + \"\\\": \\\"\" + \r\n records[i] + \"\\\",\");\r\n }\r\n writer.print(\" }\");\r\n }\r\n writer.println();\r\n writer.println(\"]\");\r\n writer.flush();\r\n writer.close();\r\n }\r\n } catch (CSVDataMissing | CSVFileInvalidException e) {\r\n return false;\r\n }\r\n return true;\r\n }", "public void listenReportGenerateStatus() {\n KOOM.getInstance().setHeapReportUploader(file -> {\n //Upload the report or do something else.\n //File is deleted automatically when callback is done by default.\n });\n }", "public void checkFinish()\t{\n\t\tif(readCompareResult() == true)\t{\n\t\t\tfinished = true;\n\t\t}\n\t}", "public void implicitWait(){\r\n\t\tdriver.manage().timeouts().implicitlyWait(Integer.parseInt(FilesAndFolders.getPropValue(\"implicitWaitTime\")), TimeUnit.SECONDS);\r\n\t}", "void sendFile() {\r\n\t\t// 특정 클라이언트에게 파일을 보냄\r\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t\tlog.debug(\"Throw method run.\");\n\t\t\n\t\tif (this.dirs == null || this.maxAge < 0)\n\t\t\treturn;\n\t\t\n\t\tEnumeration<File> dirsEnum = this.dirs.elements();\n\t\t\n\t\twhile(dirsEnum.hasMoreElements()){\n\t\t\t\n\t\t\tFile dir = dirsEnum.nextElement();\n\t\t\t\n\t\t\ttry{\n\t\t\t\tthis.deleteFilesIfOlderMaxAge(dir);\n\t\t\t}catch(IOException ex){\n\t\t\t\tlog.warn(\"Impossible to delete file \" + (dir).getAbsolutePath() + \". \" + \n\t\t\t\t\t\tex.getMessage());\n\t\t\t}\n\t\t\n\t\t}\n\n\t}", "public static void endWrite()\r\n\t{\r\n\t\r\n\t}", "private void processReportFiles()\r\n {\r\n writeToLogFile(\" \");\r\n int fileCount = 0, successCount = 0;\r\n accountCount = 0;\r\n failedAccountCount = 0;\r\n boolean first = true;\r\n try\r\n {\r\n // Process report files directory\r\n File directory = new File(dropDir);\r\n File[] fileArray = directory.listFiles();\r\n for (int i = 0; i < fileArray.length; i++)\r\n {\r\n // process the file and move to processed directory if successful\r\n File reportFile = fileArray[i];\r\n String pathname = reportFile.getAbsolutePath();\r\n String filename = reportFile.getName();\r\n if (processedReportFile(reportFile))\r\n {\r\n File rfMove = new File(procDir+BACKSLASH+filename);\r\n if (!reportFile.renameTo(rfMove))\r\n writeToLogFile(\"failed to move processed report file: \"+pathname);\r\n successCount++;\r\n }\r\n fileCount++;\r\n }\r\n writeToLogFile(\" \");\r\n // summarise report files processed in log file\r\n if (fileCount==0)\r\n {\r\n writeToLogFile(\"No report files in drop directory\");\r\n System.out.println(\"No report files in drop directory\");\r\n }\r\n else\r\n {\r\n if (!((accountCount==0)&&(failedAccountCount==0)))\r\n {\r\n writeToLogFile(\"No account FTP requests : \"+accountCount);\r\n if (failedAccountCount>0)\r\n writeToLogFile(\"No failed account FTP requests : \"+failedAccountCount);\r\n }\r\n writeToLogFile(\" \");\r\n String finalMessage = successCount + \" report file\";\r\n if (successCount>1)\r\n finalMessage = finalMessage + \"s\";\r\n finalMessage = finalMessage + \" out of \" + fileCount + \" successfully processed\";\r\n System.out.println(finalMessage);\r\n writeToLogFile(finalMessage);\r\n }\r\n writeToLogFile(\" \");\r\n\r\n }\r\n catch(Exception ex)\r\n {\r\n writeToLogFile(\"Error in processReportFiles : \" + ex.getMessage());\r\n }\r\n }", "@Override\n public void close() {\n LOG.info(\"Closing stream writer:\" + streamName);\n shutdown();\n try {\n awaitTermination(1, TimeUnit.MINUTES);\n } catch (InterruptedException ignored) {\n }\n }", "public void endWrite() throws ThingsException;", "@Override\n public boolean isDone()\n {\n return false;\n }", "protected boolean isFinished()\n {\n return timer.get() > driveDuration;\n }", "public void waitFileCount(final int count) {\n waitState(new ComponentChooser() {\n @Override\n public boolean checkComponent(Component comp) {\n return getFileCount() == count;\n }\n\n @Override\n public String getDescription() {\n return (\"Count of files to be equal \"\n + Integer.toString(count));\n }\n\n @Override\n public String toString() {\n return \"JFileChooserOperator.waitFileCount.ComponentChooser{description = \" + getDescription() + '}';\n }\n });\n }", "public boolean writerTryLock() {\n\t\t// TODO\n\t\tHolders h = holders.get();\n\t\tfinal Thread current = Thread.currentThread();\n\t\tif (h == null) {\n\t\t\treturn holders.compareAndSet(null, new Writer(current));\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void onWriteFinished(PageRange[] pages) {\n /* do nothing - stub */\n }", "synchronized public void wrlock() {\n long tid = Thread.currentThread().getId();\n\n // Place myself on queue\n writersQueue.enq(tid);\n\n // While its not my turn, wait\n while (writersQueue.getFirstItem() != tid\n \t\t|| activeWriter == true\n \t\t|| activeReaders > 0\n \t\t|| (bias == 'R' && readersQueue.isEmpty() == false)) {\n \ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n }\n\n // Its my turn, remove myself from queue\n writersQueue.deq();\n\n // DEBUG\n if (activeWriter == true\n \t\t|| activeReaders > 0\n \t\t|| (bias == 'R' && readersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN WRITER\");\n }\n\n // I am now an active writer!\n activeWriter = true;\n\t}", "@Override\n\tpublic void run() {\n\t\t// TODO Auto-generated method stub\n\t\twhile(keepGoing){\n\t\t\ttry {\n\t\t\t\tThread newThreadSocket = new Thread(new newThreadWaitingForFile(mySocket.accept()));\n\t\t\t\tnewThreadSocket.start();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public Status waitUntilFinished();", "@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshWriteLock(lockKey, finalWriteToken, lockTimeoutSec);\r\n\t\t\t}", "@Override\n public boolean isDone() {\n return false;\n }", "@Override\n public boolean waitToProceed() {\n return false;\n }", "public void ensureOpenFiles()\n throws DataOrderingException;", "@Override\n\tpublic boolean isFileTransferred(String fileName) throws RemoteException, \n\t\tFileSubmittionFailedException {\n\t\tlogger.finer(\"********************* Rmi call for file: \" + fileName);\n\t\t\n\t\t// 10 attempts before a false answer\n\t\tfor(int i = 1; i <= 10; i++) {\n\t\t\t// File has allready been transferred\n\t\t\tif (transferredFilesMap.containsKey(fileName)){\n\t\t\t\tlogger.fine(\"file \" + fileName + \" was transferred. returning\");\n\t\t\t\t// purge map\n\t\t\t\ttransferredFilesMap.remove(fileName);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t// File was created but not yet transferred. Wait for a couple of \n\t\t\t// seconds and check again.\n\t\t\tif (createdFilesMap.containsKey(fileName)){\n\t\t\t\tlogger.fine(\"file \" + fileName + \" is waiting for transfer. waiting: \" + i);\n\t\t\t\ttry {\n\t\t\t\t\tTimeUnit.SECONDS.sleep(5);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tlogger.finer(\"interrupted on sleep. ok\");\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// unknown file\n\t\t\t\tlogger.severe(\"file\" + fileName + \" doesn't exist!\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 10 Attempts were failed.\n\t\treturn false;\n\t}", "public void startDBWrite() {\r\n this.setStatus(false);\r\n this.isDBOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n // setStatus(true);\r\n\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.isDBWriteInUse = true;\r\n Controller.this.writeIntoDBProgress.setVisible(true);\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(false, false, false);\r\n String pw = \"\";\r\n for (int i = 0; i < Controller.this.rpasswdfield.getPassword().length; i++)\r\n pw += Controller.this.rpasswdfield.getPassword()[i];\r\n\r\n Controller.this.dbc_in = new DBConnect(Controller.this.rhostfield.getText(),\r\n Controller.this.rdatabasefield.getText(), Controller.this.ruserfield.getText(), pw,\r\n Integer.parseInt(Controller.this.rportfield.getText()),\r\n Controller.this.otablenamefield.getText(), COLUMN_NAMES_FOR_DB_OUT);\r\n\r\n // File: Controller.CLASSES_TMP_FILENAME\r\n // Columns: Controller.COLUMN_NAMES_FOR_DB_OUT\r\n try {\r\n Controller.this.dbc_in.stillWorks = true;\r\n Controller.this.dbc_in.maxProgerss = Controller.this.cw.countNodesWithClasses;\r\n Controller.this.dbc_in.writeFromFileIntoDB();\r\n } catch (IOWrapperException iow_e) {\r\n System.err.println(\"Error while writing into DB!\\nConnection failed!\");\r\n JOptionPane.showMessageDialog(null, \"Error while writing into DB!\\nConnection failed!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n } catch (IOIteratorException ioi_e) {\r\n System.err.println(\"Error while writing into DB!\\nCould not iterate over results!\");\r\n JOptionPane.showMessageDialog(null,\r\n \"Error while writing into DB!\\nCould not iterate over results!\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n Controller.this.dBInError = true;\r\n Controller.this.dbc_in.stillWorks = false;\r\n return;\r\n }\r\n }// run()\r\n });// Thread\r\n\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isDBOutStarted = false;\r\n }\r\n }", "public synchronized void waitForDone() {\n\twhile (!done) myWait();\n }", "public synchronized void flush() {\n\t\ttry {\n\t\t\tcloseWriter();\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\topenWriter(true);\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "static void dispose() {\n for (final Writer w : logFiles.values()) {\n try {\n w.close();\n } catch (IOException ioe) {\n // don't care\n }\n }\n logFiles.clear();\n }", "public void testUnlockFile() throws Exception {\n System.out.print(\".. Testing giving up a lock on a file ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node testNode = new Node( filesystemNode, \"test [Current]\");\n Node B_FileNode = new Node( filesystemNode, \"test [Current]|B_File [Current]\");\n new Action(VERSIONING_MENU + \"|\" + CHECK_OUT, CHECK_OUT).perform(B_FileNode);\n Thread.sleep(2000);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(testNode); // Until issue #27726 gets fixed.\n B_FileNode = new Node( filesystemNode, \"test [Current]|B_File [Current] (\" + userName + \")\");\n new Action(VERSIONING_MENU + \"|\" + UNDO_CHECK_OUT, UNDO_CHECK_OUT).perform(B_FileNode);\n Thread.sleep(2000);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(testNode); // Until issue #27726 gets fixed.\n B_FileNode = new Node( filesystemNode, \"test [Current]|B_File [Current]\");\n File B_File = new File(workingDirectory + File.separator + \"Work\" + File.separator + \"test\" + File.separator + \"B_File.java\");\n if (B_File.canWrite()) captureScreen(\"Error: B_File.java remained read-write after undo check out.\");\n System.out.println(\". done !\");\n }", "public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }" ]
[ "0.689582", "0.60837877", "0.5886255", "0.57934654", "0.5702135", "0.5662053", "0.55570364", "0.55275", "0.5481065", "0.54794085", "0.5443328", "0.53587925", "0.5337912", "0.531111", "0.53051245", "0.52620393", "0.52616966", "0.52368116", "0.5203826", "0.51726395", "0.5160773", "0.51328874", "0.51202244", "0.51194763", "0.5112591", "0.5107073", "0.50992244", "0.50946933", "0.50860107", "0.50743306", "0.5073591", "0.50472844", "0.50384384", "0.5035448", "0.5019199", "0.5012563", "0.5010308", "0.50006783", "0.49970064", "0.4992092", "0.49884042", "0.49707186", "0.49531072", "0.4935395", "0.49289244", "0.4928009", "0.49100137", "0.49028623", "0.49026972", "0.48999846", "0.4894766", "0.48897886", "0.4888505", "0.48771098", "0.48770937", "0.48696947", "0.48654926", "0.48644158", "0.4858648", "0.48519543", "0.48450089", "0.48373556", "0.482901", "0.4828267", "0.482182", "0.4817706", "0.4816894", "0.481583", "0.4814862", "0.481339", "0.48129815", "0.4802984", "0.47981307", "0.4795054", "0.4793808", "0.47920188", "0.47915617", "0.479131", "0.4786724", "0.47611868", "0.4756757", "0.47545335", "0.4753241", "0.47513902", "0.47476804", "0.47462338", "0.47450644", "0.4744122", "0.47435507", "0.47374672", "0.4735214", "0.4733505", "0.4731817", "0.47315562", "0.4731456", "0.47307873", "0.4726981", "0.472153", "0.47210062", "0.47129512" ]
0.6902738
0
Elect a block randomly from array of blocks given
public Block electBlock(Blockchain blockchain) { electedBlock = blockchain.get( randomizer.nextInt( blockchain.size() ) ); return electedBlock; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private BlockType randomBlock(){\n // Check whether a powerup should be chosen or not\n if(random.nextInt(9) == 0){\n // Return a random powerup\n return allPowerUps.get(random.nextInt(allPowerUps.size()));\n\t}\n\treturn BlockType.PLATTFORM;\n }", "public static int[][] generateBlockers () {\n int[][] blockers;\n\n blockers = new int[15][15];\n\n Random rd = new Random();\n\n for (int i = 0; i < 23; i++) { // 23 = (15^2)*.1\n int x = rd.nextInt(15);\n int y = rd.nextInt(15);\n\n // If the node is already blocked\n if (blockers[x][y] == 1) {\n blockers[rd.nextInt(15)][rd.nextInt(15)] = 1; // Try another node\n i++;\n } else // Otherwise block it\n blockers[x][y] = 1;\n }\n\n return blockers;\n }", "public abstract void generateNextBlock();", "private void generate () {\n\t\t\n\t\tArrayList<Integer[]> copyToCheck = new ArrayList<Integer[]> ();\n\t\tfor (int i = 0; i < Math.pow(size, 3); i++) { // Filling up the maze with blocks\n\t\t\tint x, y, z;\n\t\t\tx = i / (size * size); // Get the x, y, and z\n\t\t\ty = i % (size * size) / size;\n\t\t\tz = i % (size * size) % size;\n\t\t\t// spaces each block out by 1\n\t\t\tif (x%2 == 1 && y%2 == 1 && z%2 == 1) {\n\t\t\t\tmaze.add(new Block (x, y, z, ' ')); // 'w' means wall\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tmaze.add(new Block (x, y, z, 'w'));\n\t\t\t\tif (x > 0 && y > 0 && z > 0 && x < size-1 && y < size-1 && z < size-1) { // if the blocks are within the outer shell, add the blocks to the list of walls to check\n\t\t\t\t\tif (x%2+y%2+z%2 == 2)copyToCheck.add(new Integer[] {x, y, z});\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if (x > 0 && y > 0 && z > 0 && x < size-1 && y < size-1 && z < size-1) { // checks if the coordinates are within the smaller cube that is below the first layer.\n\t\t\t\t//copyToCheck.add(new Integer[] { x, y, z });\t// the Block coords left to check\n\t\t\t//}\n\t\t}\n\t\t\n\t\tint starty, startx, startz; // x, y and z of current block\n\t\tstartz = 0; // the starting block will be at z = 0 because that is the bottom-most layer\n\n\t\tstartx = ((int)(Math.random() * (size/2)))*2 + 1; \n\t\tstarty = ((int)(Math.random() * (size/2)))*2 + 1;\n\t\tstart = get(startx, starty, startz);\n\t\t\n\t\tint endx, endy, endz; // x, y and z of end block\n\t\tendx = ((int)(Math.random() * (size/2)))*2 + 1; \n\t\tendy = ((int)(Math.random() * (size/2)))*2 + 1;\n\t\tendz = size-1;\n\t\tend = get(endx, endy, endz);\n\t\t\n\t\tArrayList<Integer[]> toCheck;\n\t\tboolean removed = true;\n\t\twhile (removed) {\n\t\t\tremoved = false;\n\t\t\ttoCheck = new ArrayList<Integer[]> ();\n\t\t\tfor (Integer[] thing : copyToCheck) {\n\t\t\t\ttoCheck.add(thing);\n\t\t\t}\n\t\t\tCollections.shuffle(toCheck); // Randomizes the order of the list of coordinates to check.\n\t\t\tfor (Integer[] coords : toCheck) {\n\t\t\t\tBlock curr = get(coords[0], coords[1], coords[2]);\n\t\t\t\tArrayList<Block> neighbors = getAdj(curr);\n\t\t\t\tboolean isJoint = false;\n\t\t\t\t\tfor (int i = 0; i < neighbors.size() - 1 && !isJoint; i++) {\n\t\t\t\t\t\tfor (int j = i+1; j < neighbors.size(); j++) {\n\t\t\t\t\t\t\tif (neighbors.get(j).t == ' ')\n\t\t\t\t\t\t\t\tif (neighbors.get(i).tree == neighbors.get(j).tree) {\n\t\t\t\t\t\t\t\t\tisJoint = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isJoint) { // Even if it doesn't matter too much, don't want to spend a bunch of time iterating through the stuff unless I have too.\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\tif (!isJoint) {\n\t\t\t\t\t\tremoved = true;\n\t\t\t\t\t\tcopyToCheck.remove(coords);\n\t\t\t\t\t\tjoin(curr); // Joins all of the sets, changes the type of the block.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\tArrayList<Block> t = new ArrayList<Block>();\n\t\tfor (int i = 0; i < 5*size; i++) {\n\t\t\tArrayList<Block> b = getWalls();\n\t\t\t\n\t\t\tint rand = (int)(Math.random()*b.size());\n\t\t\tint x = b.get(rand).x;\n\t\t\tint y = b.get(rand).y;\n\t\t\tint z = b.get(rand).z;\n\t\t\tset(x, y, z, new Trap (x, y, z));\n\t\t}\n\t\tstart.t = ' '; // sets the type of the start and end blocks\n\t\tend.t = 'e';\n\t}", "@Test public void testPreBlock() {\n int[][] preBlockTopLeft = {{0, 0, 0, 0}, {0, 0, 1, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}};\n int[][] preBlockTopRight = {{0, 0, 0, 0}, {0, 1, 0, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}};\n int[][] preBlockBottomLeft = {{0, 0, 0, 0}, {0, 1, 1, 0}, {0, 0, 1, 0}, {0, 0, 0, 0}};\n int[][] preBlockBottomRight = {{0, 0, 0, 0}, {0, 1, 1, 0}, {0, 1, 0, 0}, {0, 0, 0, 0}};\n int[][] block = {{0, 0, 0, 0}, {0, 1, 1, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}};\n\n GameOfLife gameOfLife = createGame();\n\n gameOfLife.seed(preBlockTopLeft);\n Assert.assertArrayEquals(block, gameOfLife.next());\n Assert.assertArrayEquals(block, gameOfLife.next());\n\n gameOfLife.seed(preBlockTopRight);\n Assert.assertArrayEquals(block, gameOfLife.next());\n Assert.assertArrayEquals(block, gameOfLife.next());\n\n gameOfLife.seed(preBlockBottomLeft);\n Assert.assertArrayEquals(block, gameOfLife.next());\n Assert.assertArrayEquals(block, gameOfLife.next());\n\n gameOfLife.seed(preBlockBottomRight);\n Assert.assertArrayEquals(block, gameOfLife.next());\n Assert.assertArrayEquals(block, gameOfLife.next());\n }", "protected int[][][] fillBlock(RescueMap rm, int[] block,int density, Random rand){\n\t\t//make a building filling the whole block\n\t\tint[][] build = new int[block.length+1][2];\n\t\tfor(int i = 0; i < block.length; i++){\n\t\t\tbuild[i][0] = rm.getX(block[i]);\n\t\t\tbuild[i][1] = rm.getY(block[i]);\n\t\t\tif(i > 0 && i < block.length-1)\n\t\t\t\tshift(rm,block[i-1],block[i],block[i+1],build[i]);\n\t\t}\n\t\tshift(rm,block[block.length-1],block[0],block[1],build[0]);\n\t\tshift(rm,block[block.length-2],block[block.length-1],block[0],build[build.length-2]);\n\t\tbuild[build.length-1][0] = build[0][0];\n\t\tbuild[build.length-1][1] = build[0][1];\n\t\t//now break it up\n\t\tint minArea = 500000/(density+1);\n\t\tArrayList builds = processBuilding(build,minArea,rand);\n\t\tint[][][] bs = new int[builds.size()][][];\n\t\tfor(int i = 0; i < bs.length; i++) {\n\t\t\tbs[i] = (int[][])builds.get(i);\n\t\t\tshrink(bs[i],rand.nextDouble()*0.4);\n\t\t}\n\t\treturn bs;\n\t}", "public static Block[] getRandomBlocksInSetRangeWithRandomChance(World world, int x, int y, int z, int range, int passes, int chance)\n {\n return null;\n }", "private void testAutoGenBlock(Class<Block> blockClass) {\n try {\n Block instance = blockClass.newInstance();\n\n instance.train(Matrices.randomMatrix(1, 1, 1234), Matrices.randomMatrix(1, 1, 4321), 2);\n instance.evaluateInput(Matrices.randomMatrix(1, 1, 1234));\n\n // No exception when training.\n assertTrue(true);\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static void changeArrayBlocks() {\r\n\t\tchar[][] data = initializeArray();\r\n\t\tThread t[] = new Thread[4];\r\n\t\tlong time1 = System.nanoTime();\r\n\r\n\t\tt[0] = new ThreadBlocks(data, 0, data.length/2, 0, data[0].length/2); // Upper Left \r\n\t\tt[1] = new ThreadBlocks(data, 0, data.length/2, data[0].length/2, data[0].length); // Upper Right\r\n\t\tt[2] = new ThreadBlocks(data, data.length/2, data.length, 0, data[0].length/2); // Lower Left\r\n\t\tt[3] = new ThreadBlocks(data, data.length/2, data.length, data[0].length/2, data[0].length); // Lower Right\r\n\t\t\r\n\t\tfor (Thread threads : t) {\r\n\t\t\tthreads.start();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tfor (Thread threads : t)\r\n\t\t\t\tthreads.join();\r\n\t\t\t\r\n\t\t\tlong time2 = System.nanoTime();\r\n\t\t\t\r\n\t\t\tSystem.out.println((time2 - time1) + \" ns\");\r\n\t\t}\r\n\t\tcatch (Exception e) { \r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public static Block[] getRandomBlocksInSetRange(World world, int x, int y, int z, int range, int passes)\n {\n return getRandomBlocksInSetRangeWithRandomChance(world, x, y, z, range, passes, 4);\n }", "public void mutation(){\n \n \tfor (int[] temp : wallpapers) {\n \t\tint e = random.nextInt(20);\n \t\tfor (int y = 0; y < e; y++){\n \t\t\tint h = random.nextInt(temp.length);\n \t\t\t//Log.d(\"MUT\", \"selected index \" + h);\n \t\t\tif (h == temp.length - 1 || h == temp.length - 2 || h == temp.length - 3){\n \t\t\t\tint newrgb = random.nextInt(NODELENGTH) + 2;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new node \" + newrgb);\n \t\t\t\ttemp[h] = newrgb;\n \t\t\t} else if (((h + 1) % 3) == 0){\n \t\t\t\tint newfunction = random.nextInt(NUM_FUNCTIONS);\n \t\t\t\t//Log.d(\"MUT\", \"Picking new function \" + newfunction);\n \t\t\t\ttemp[h] = newfunction;\n \t\t\t} else {\n \t\t\t\tint newinput = random.nextInt(h / 3 +1);\n \t\t\t\ttemp[h] = newinput;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new input \" + newinput);\n \t\t\t}\n \t\t}\n \t}\n }", "Block createBlock();", "public void alg_BLOCKCONVEYER(){\nBlock.value=true;\nSystem.out.println(\"block\");\n\n}", "private void createBlocks(){\n for (int row=0; row < grid.length; row++) \n {\n for (int column=0; column < grid[row].length; column++)\n {\n boolean player = false;\n boolean walkable;\n \n switch (grid[row][column]){\n case(0) : \n returnImage = wall; \n walkable = false;\n break;\n case(2) : \n returnImage = start; \n walkable = true;\n player = true;\n break;\n case(4) : \n returnImage = finish; \n walkable = true;\n break;\n \n default :\n returnImage = pad; \n walkable = false;\n }\n \n \n Block blok;\n try {\n if(player==true) \n { \n blok = new Block(returnImage, blockSize, true);\n blok.setTopImage(held);\n }else\n {\n blok = new Block(returnImage, blockSize, false);\n }\n blocks.add(blok);\n } catch (Exception e) {\n \n }\n } \n \n }\n \n }", "public BlockType[][] generateChunk(BlockType[][] inputChunk){\n BlockType[][] returnChunk = new BlockType[chunkHeight][boardWidth];\n // Fill the new chunk with air initially\n for(int c = 0; c < boardWidth; c++){\n for(int r = 0; r < returnChunk.length; r++){\n\t\treturnChunk[r][c] = BlockType.AIR;\n\t }\n\t}\n\n\n\tList<BlockPoint> upmostPlattforms = getTopPlattforms(inputChunk);\n\tList<BlockPoint> reachablePositions = getReachablePositions(returnChunk, upmostPlattforms);\n\tList<BlockPoint> chosenPositions = chooseFurthestPoints(reachablePositions);\n\n\n\t// Set the randomly chosen blocks to plattform or powerup randomly,\n\t// and if possible also set their neighbors.\n\tfor(BlockPoint pos : chosenPositions){\n\t BlockType randomBlock = randomBlock();\n\t returnChunk[pos.y][pos.x] = randomBlock;\n\n\t // Extend the point to a plattform of length 3 if possible\n\t if(pos.x > 0){\n\t\treturnChunk[pos.y][pos.x-1] = randomBlock;\n\t }\n\t if(pos.x < boardWidth-1){\n\t \treturnChunk[pos.y][pos.x+1] = randomBlock;\n\t }\n\t}\n\treturn returnChunk;\n\n }", "private void runGenerators(int chunkX, int chunkZ, Block[] ablock, byte[] abyte) {\n\t}", "public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) {\n\t\tTileEntityCobexChest tileentitychest = (TileEntityCobexChest) par1World.getTileEntity(par2, par3, par4);\n\n\t\tif (tileentitychest != null) {\n\t\t\tfor (int j1 = 0; j1 < tileentitychest.getSizeInventory(); ++j1) {\n\t\t\t\tItemStack itemstack = tileentitychest.getStackInSlot(j1);\n\n\t\t\t\tif (itemstack != null) {\n\t\t\t\t\tfloat f = this.random.nextFloat() * 0.8F + 0.1F;\n\t\t\t\t\tfloat f1 = this.random.nextFloat() * 0.8F + 0.1F;\n\t\t\t\t\tEntityItem entityitem;\n\n\t\t\t\t\tfor (float f2 = this.random.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; par1World.spawnEntityInWorld(entityitem)) {\n\t\t\t\t\t\tint k1 = this.random.nextInt(21) + 10;\n\n\t\t\t\t\t\tif (k1 > itemstack.stackSize) {\n\t\t\t\t\t\t\tk1 = itemstack.stackSize;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titemstack.stackSize -= k1;\n\t\t\t\t\t\tentityitem = new EntityItem(par1World, (double) ((float) par2 + f), (double) ((float) par3 + f1), (double) ((float) par4 + f2),\n\t\t\t\t\t\t\t\tnew ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage()));\n\t\t\t\t\t\tfloat f3 = 0.05F;\n\t\t\t\t\t\tentityitem.motionX = (double) ((float) this.random.nextGaussian() * f3);\n\t\t\t\t\t\tentityitem.motionY = (double) ((float) this.random.nextGaussian() * f3 + 0.2F);\n\t\t\t\t\t\tentityitem.motionZ = (double) ((float) this.random.nextGaussian() * f3);\n\n\t\t\t\t\t\tif (itemstack.hasTagCompound()) {\n\t\t\t\t\t\t\tentityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());\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\tpar1World.func_147453_f(par2, par3, par4, par5);\n\t\t}\n\n\t\tsuper.breakBlock(par1World, par2, par3, par4, par5, par6);\n\t}", "public static void allBlocks(int input) {\n int y;\n\n for (y = 1; y < input + 1; y++) { //makes the block() method repeat for input number of times\n block(input, y);\n }\n\n }", "public void breakBlock(World world, int x, int y, int z, Block par5, int par6)\r\n/* 186: */ {\r\n/* 187:209 */ if ((world.getBlock(x, y, z) != FMPBase.getFMPBlockId()) && \r\n/* 188:210 */ ((world.getTileEntity(x, y, z) instanceof TileEntityTransferNode)))\r\n/* 189: */ {\r\n/* 190:211 */ TileEntityTransferNode tile = (TileEntityTransferNode)world.getTileEntity(x, y, z);\r\n/* 191:213 */ if (!tile.getUpgrades().isEmpty()) {\r\n/* 192:214 */ for (int i = 0; i < tile.getUpgrades().size(); i++)\r\n/* 193: */ {\r\n/* 194:215 */ ItemStack itemstack = (ItemStack)tile.getUpgrades().get(i);\r\n/* 195:216 */ float f = this.random.nextFloat() * 0.8F + 0.1F;\r\n/* 196:217 */ float f1 = this.random.nextFloat() * 0.8F + 0.1F;\r\n/* 197: */ EntityItem entityitem;\r\n/* 198:220 */ for (float f2 = this.random.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem))\r\n/* 199: */ {\r\n/* 200:221 */ int k1 = this.random.nextInt(21) + 10;\r\n/* 201:223 */ if (k1 > itemstack.stackSize) {\r\n/* 202:224 */ k1 = itemstack.stackSize;\r\n/* 203: */ }\r\n/* 204:227 */ itemstack.stackSize -= k1;\r\n/* 205:228 */ entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage()));\r\n/* 206:229 */ float f3 = 0.05F;\r\n/* 207:230 */ entityitem.motionX = ((float)this.random.nextGaussian() * f3);\r\n/* 208:231 */ entityitem.motionY = ((float)this.random.nextGaussian() * f3 + 0.2F);\r\n/* 209:232 */ entityitem.motionZ = ((float)this.random.nextGaussian() * f3);\r\n/* 210:234 */ if (itemstack.hasTagCompound()) {\r\n/* 211:235 */ entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());\r\n/* 212: */ }\r\n/* 213: */ }\r\n/* 214: */ }\r\n/* 215: */ }\r\n/* 216:241 */ if ((tile instanceof TileEntityTransferNodeInventory))\r\n/* 217: */ {\r\n/* 218:242 */ TileEntityTransferNodeInventory tileentity = (TileEntityTransferNodeInventory)tile;\r\n/* 219: */ \r\n/* 220:244 */ ItemStack itemstack = tileentity.getStackInSlot(0);\r\n/* 221:246 */ if (itemstack != null)\r\n/* 222: */ {\r\n/* 223:247 */ float f = this.random.nextFloat() * 0.8F + 0.1F;\r\n/* 224:248 */ float f1 = this.random.nextFloat() * 0.8F + 0.1F;\r\n/* 225: */ EntityItem entityitem;\r\n/* 226:251 */ for (float f2 = this.random.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem))\r\n/* 227: */ {\r\n/* 228:252 */ int k1 = this.random.nextInt(21) + 10;\r\n/* 229:254 */ if (k1 > itemstack.stackSize) {\r\n/* 230:255 */ k1 = itemstack.stackSize;\r\n/* 231: */ }\r\n/* 232:258 */ itemstack.stackSize -= k1;\r\n/* 233:259 */ entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage()));\r\n/* 234:260 */ float f3 = 0.05F;\r\n/* 235:261 */ entityitem.motionX = ((float)this.random.nextGaussian() * f3);\r\n/* 236:262 */ entityitem.motionY = ((float)this.random.nextGaussian() * f3 + 0.2F);\r\n/* 237:263 */ entityitem.motionZ = ((float)this.random.nextGaussian() * f3);\r\n/* 238:265 */ if (itemstack.hasTagCompound()) {\r\n/* 239:266 */ entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());\r\n/* 240: */ }\r\n/* 241: */ }\r\n/* 242: */ }\r\n/* 243:271 */ world.func_147453_f(x, y, z, par5);\r\n/* 244: */ }\r\n/* 245: */ }\r\n/* 246:276 */ super.breakBlock(world, x, y, z, par5, par6);\r\n/* 247: */ }", "public void makeBricks(int across, int column) {\n\t\t\t\n\t\t\tint acrossAmount = across;//how many blocks will be across the screen dont make a multiple of 3 and ensure it's even.\n\t\t\tint colAmount = column;//how many blocks will be stacked on top of each other\n\t\t\tint startingBlockX = (GamePlay.getMiddleX()) - (Block.getWidth()*(acrossAmount/2)) - acrossAmount*gap/2; // where the first block will be placed in the x and y directions.\n\t\t\tint startingBlockY = (GamePlay.getMiddleY()/2) - (Block.getHeight()*(colAmount/2)) - acrossAmount*gap/2;\n\t\t\tRandom ran = new Random();\n\t\t\tfor (int x=0;x<acrossAmount;x++) {//makes the blocks in order. Colors are random \n\t\t\t\tfor (int y=0; y<colAmount; y++) {\n\t\t\t\t\tblocks.add(new Block(ran.nextInt(3), startingBlockX + (x*(Block.getWidth()+gap)), startingBlockY + (y*(Block.getHeight()+gap))));\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "void buildBlock(Tile t);", "public Block[] getTestBlocks(Class<?> c, int[] indices, int arrayCursor) {\n\t\tassert c != null;\n\t\tassert indices != null;\n\t\t\n\t\tif (!plans.containsKey(c)) {\t//cache miss\n\t\t\tplans.put(c, new ClassUnderTest(c, MAX_PLAN_RECURSION));\n\t\t}\t\t\n\t\tClassUnderTest node = plans.get(c);\t\t\n\n\t\t/* Retrieve distinct selected plans from plan space */\n\t\tList<Block> res = new Vector<Block>();\n\t\tfor (int i=0; i+arrayCursor<indices.length && i<MAX_NR_TEST_METHS_PER_CLASS; i++) {\n\t\t\t\tres.add(node.getBlock(indices[i+arrayCursor]));\n\t\t}\n\t\treturn res.toArray(new Block[res.size()]);\n\t}", "public void renderInvBlock(bbb renderblocks, int md)\r\n/* 73: */ {\r\n/* 74: 72 */ this.block.f();\r\n/* 75: */ \r\n/* 76: 74 */ this.context.setDefaults();\r\n/* 77: 75 */ this.context.setPos(-0.5D, -0.5D, -0.5D);\r\n/* 78: 76 */ this.context.useNormal = true;\r\n/* 79: 77 */ this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);\r\n/* 80: */ \r\n/* 81: 79 */ RenderLib.bindTexture(\"/eloraam/machine/machine1.png\");\r\n/* 82: 80 */ baz tessellator = baz.a;\r\n/* 83: */ \r\n/* 84: 82 */ tessellator.b();\r\n/* 85: 83 */ this.context.useNormal = true;\r\n/* 86: */ \r\n/* 87: */ \r\n/* 88: 86 */ this.context.setTex(28, 28, 26, 26, 26, 26);\r\n/* 89: */ \r\n/* 90: 88 */ this.context.renderBox(60, 0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D);\r\n/* 91: 89 */ this.context.renderBox(60, 0.6240000128746033D, 0.9990000128746033D, 0.6240000128746033D, 0.3759999871253967D, 0.001000000047497451D, 0.3759999871253967D);\r\n/* 92: 90 */ renderFlanges(3, 27);\r\n/* 93: */ \r\n/* 94: 92 */ tessellator.a();\r\n/* 95: 93 */ RenderLib.unbindTexture();\r\n/* 96: 94 */ this.context.useNormal = false;\r\n/* 97: */ }", "Block create(int xpos, int ypos);", "TestBlock createTestBlock();", "public void step()\n { \n //Remember, you need to access both row and column to specify a spot in the array\n //The scalar refers to how big the value could be\n //int someRandom = (int) (Math.random() * scalar)\n //remember that you need to watch for the edges of the array\n\t int randomRow = (int)(Math.random() * grid.length - 1);\n\t int randomCol = (int)(Math.random() * grid[0].length - 1);\n\t int randomDirection = (int)(Math.random() * 3);\n\t int randomDirectionFire = (int)(Math.random() * 4);\n\t int randomSpread = (int)(Math.random() * 100);\n\t int randomTelRow = (int)(Math.random() * grid.length);\n\t int randomTelCol = (int)(Math.random() * grid[0].length);\n\t \n\t //Sand\n\t if(grid[randomRow][randomCol] == SAND && (grid[randomRow + 1][randomCol] == EMPTY || grid[randomRow + 1][randomCol] == WATER))\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\n\t }\n\t //Water\n\t if(grid[randomRow][randomCol] == WATER && randomCol - 1 >= 0)\n\t {\n\t\t if(randomDirection == 1 && grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t //Helium\n\t if(grid[randomRow][randomCol] == HELIUM && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow - 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else if(randomDirection == 1 && grid[randomRow - 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Bounce\n\t if(grid[randomRow][randomCol] == BOUNCE)\n\t { \t\n\t\t if(randomRow + 1 >= grid[0].length - 1 || randomRow + 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = true;\n\t\t }\n\t\t else if(randomRow - 1 < 0 || randomRow - 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = false;\n\t\t }\n\t\t \n\t\t if(hitEdge[randomCol] == true)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Virus\n\t if(grid[randomRow][randomCol] == VIRUS && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t \n\t\t\t int temp = grid[randomRow + 1][randomCol];\n\t\t\t //VIRUS takeover\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = VIRUS;\n\t\t\t }\n\t\t\t //TEMP takeover\n\t\t\t grid[randomRow][randomCol] = temp;\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = temp;\n\t\t\t }\n\t }\n\t \n\t //Fire\n\t if(grid[randomRow][randomCol] == FIRE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t { \n\t\t if(randomDirectionFire == 1)\n\t\t {\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol - 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 3)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol + 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t \n\t\t //Fire Eats Vine\n\t\t if(grid[randomRow - 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = FIRE;\n\t\t }\n\t\t \n\t\t //Fire Blows Up Helium\n\t\t if(grid[randomRow - 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t //Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t }\n\t \n\t //Vine\n\t if(grid[randomRow][randomCol] == VINE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t { \n\t\t\t if(randomSpread == 1)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t }\n\t\t }\n\t\t else if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t if(randomSpread >= 90)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t\t grid[randomRow][randomCol + 1] = VINE;\n\t\t\t\t grid[randomRow][randomCol - 1] = VINE;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //Teleport\n\t if(grid[randomRow][randomCol] == TELEPORT && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t grid[randomTelRow][randomTelCol] = TELEPORT;\n\t\t grid[randomRow][randomCol] = EMPTY;\n\t }\n\t \n\t //Laser\n\t if(grid[randomRow][randomCol] == LASER && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(randomDirectionLaser == 1 && randomRow - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = LASER;\n\t\t\t grid[randomRow - 4][randomCol] = EMPTY;\n\t\t\t if(randomRow + 1 == grid.length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = LASER;\n\t\t\t grid[randomRow + 4][randomCol] = EMPTY;\n\t\t\t if(randomRow - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 3 && randomCol - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = LASER;\n\t\t\t grid[randomRow][randomCol - 4] = EMPTY;\n\t\t\t if(randomCol + 1 == grid[0].length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = LASER;\n\t\t\t grid[randomRow][randomCol + 4] = EMPTY;\n\t\t\t if(randomCol - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t }\n }", "public abstract int getNextBlock(int block) throws IOException;", "public static Vec3 findRandomTargetBlockTowards(EntityCreature aWaterMob, int xzFleeZoneSize, int yFleeZoneSize, Vec3 aTargetVectorPos, int aMinRangeXZ, int aMinDepth)\r\n{\r\n\r\n Vec3 _fleeingVector = Vec3.createVectorHelper(aTargetVectorPos.xCoord - aWaterMob.posX,aTargetVectorPos.yCoord - aWaterMob.posY,aTargetVectorPos.zCoord - aWaterMob.posZ);\r\n return findRandomTargetBlock(aWaterMob, xzFleeZoneSize, yFleeZoneSize,_fleeingVector,aMinRangeXZ,aMinDepth);\r\n}", "public boolean generate(World paramaqu, Random paramRandom, BlockPosition paramdt)\r\n/* 13: */ {\r\n/* 14:22 */ while ((paramaqu.isEmpty(paramdt)) && (paramdt.getY() > 2)) {\r\n/* 15:23 */ paramdt = paramdt.down();\r\n/* 16: */ }\r\n/* 17:26 */ if (!a.apply(paramaqu.getBlock(paramdt))) {\r\n/* 18:27 */ return false;\r\n/* 19: */ }\r\n/* 20: */ int k;\r\n/* 21:31 */ for (int i = -2; i <= 2; i++) {\r\n/* 22:32 */ for (k = -2; k <= 2; k++) {\r\n/* 23:33 */ if ((paramaqu.isEmpty(paramdt.offset(i, -1, k))) && (paramaqu.isEmpty(paramdt.offset(i, -2, k)))) {\r\n/* 24:34 */ return false;\r\n/* 25: */ }\r\n/* 26: */ }\r\n/* 27: */ }\r\n/* 28:40 */ for (int i = -1; i <= 0; i++) {\r\n/* 29:41 */ for (k = -2; k <= 2; k++) {\r\n/* 30:42 */ for (int n = -2; n <= 2; n++) {\r\n/* 31:43 */ paramaqu.setBlock(paramdt.offset(k, i, n), this.c, 2);\r\n/* 32: */ }\r\n/* 33: */ }\r\n/* 34: */ }\r\n/* 35:49 */ paramaqu.setBlock(paramdt, this.d, 2);\r\n/* 36:50 */ for (EnumDirection localej : EnumHorizontalVertical.HORIZONTAL) {\r\n/* 37:51 */ paramaqu.setBlock(paramdt.offset(localej), this.d, 2);\r\n/* 38: */ }\r\n/* 39: */ int m;\r\n/* 40:55 */ for (int j = -2; j <= 2; j++) {\r\n/* 41:56 */ for (m = -2; m <= 2; m++) {\r\n/* 42:57 */ if ((j == -2) || (j == 2) || (m == -2) || (m == 2)) {\r\n/* 43:58 */ paramaqu.setBlock(paramdt.offset(j, 1, m), this.c, 2);\r\n/* 44: */ }\r\n/* 45: */ }\r\n/* 46: */ }\r\n/* 47:63 */ paramaqu.setBlock(paramdt.offset(2, 1, 0), this.b, 2);\r\n/* 48:64 */ paramaqu.setBlock(paramdt.offset(-2, 1, 0), this.b, 2);\r\n/* 49:65 */ paramaqu.setBlock(paramdt.offset(0, 1, 2), this.b, 2);\r\n/* 50:66 */ paramaqu.setBlock(paramdt.offset(0, 1, -2), this.b, 2);\r\n/* 51:69 */ for (int j = -1; j <= 1; j++) {\r\n/* 52:70 */ for (m = -1; m <= 1; m++) {\r\n/* 53:71 */ if ((j == 0) && (m == 0)) {\r\n/* 54:72 */ paramaqu.setBlock(paramdt.offset(j, 4, m), this.c, 2);\r\n/* 55: */ } else {\r\n/* 56:74 */ paramaqu.setBlock(paramdt.offset(j, 4, m), this.b, 2);\r\n/* 57: */ }\r\n/* 58: */ }\r\n/* 59: */ }\r\n/* 60:80 */ for (int j = 1; j <= 3; j++)\r\n/* 61: */ {\r\n/* 62:81 */ paramaqu.setBlock(paramdt.offset(-1, j, -1), this.c, 2);\r\n/* 63:82 */ paramaqu.setBlock(paramdt.offset(-1, j, 1), this.c, 2);\r\n/* 64:83 */ paramaqu.setBlock(paramdt.offset(1, j, -1), this.c, 2);\r\n/* 65:84 */ paramaqu.setBlock(paramdt.offset(1, j, 1), this.c, 2);\r\n/* 66: */ }\r\n/* 67:87 */ return true;\r\n/* 68: */ }", "public void setBlocks(Block[][][] blocks)\n\t{\n\t\tthis.blocks = blocks;\n\t}", "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 static BlockExpression block(Expression[] expressions) { throw Extensions.todo(); }", "public List<Block> blocks() {\r\n List<Block> list = new ArrayList<Block>();\r\n double width = 50;\r\n for (int i = 0; i < 7; ++i) {\r\n Color c = new Color(0, 0, 0);\r\n switch (i) {\r\n case 0:\r\n c = Color.gray;\r\n break;\r\n case 1:\r\n c = Color.red;\r\n break;\r\n case 2:\r\n c = Color.yellow;\r\n break;\r\n case 3:\r\n c = Color.green;\r\n break;\r\n case 4:\r\n c = Color.white;\r\n break;\r\n case 5:\r\n c = Color.pink;\r\n break;\r\n default:\r\n c = Color.cyan;\r\n break;\r\n }\r\n for (int j = 0; j < 15; ++j) {\r\n Block b = new Block(new Rectangle(new Point(\r\n 25 + j * width, 100 + i * 20), width, 20));\r\n if (i == 0) {\r\n b.setHitPoints(2);\r\n } else {\r\n b.setHitPoints(1);\r\n }\r\n list.add(b);\r\n }\r\n }\r\n return list;\r\n }", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }", "List<Block> getBlocks(String congName, String[] blockArray);", "public void step()\n\t{\n\t\t// Reservoir sampling by generating ordered list of numbers\n\t\t// randomly pick a number within length and use that as index\n\t\tRandom rand = new Random();\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < listOfCells.size(); i++) { numbers.add(i); }\n\t\t\n\t\t// Randomly sample from reservoir until empty\n\t\twhile(numbers.size() > 0)\n\t\t{\n\t\t\tint picked_index = rand.nextInt(numbers.size());\n\t\t\tint picked_val = numbers.get(picked_index);\n\t\t\t\n\t\t\t//TODO: Maybe call a function on cell of random action that might occur\n\t\t\t//\tConsider only returning object when necessary, (how it is now)\n\t\t\tPlantCell newObject = listOfCells.get(picked_val).doAction();\n\t\t\tif(newObject != null)\n\t\t\t{\n//\t\t\t\tSystem.out.println(\"New cell generated!\");\n\t\t\t\tlistOfCells.add(newObject);\n\t\t\t}\n\t\t\t\n\t\t\t//Kill spawning cell if its health drops <= 0\n\t\t\t//should die right away to make room for other cell\n\t\t\tif(listOfCells.get(picked_val).getHealth() <= 0)\n\t\t\t{\n\t\t\t\tenvironmentPointer.map[listOfCells.get(picked_val).getX()][listOfCells.get(picked_val).getY()] = null;\n\t\t\t\tlistOfCells.set(picked_val, null); //Set to null as to preserve list integrity for reservoir sampling, will be removed later\n\t\t\t}\n\t\t\t\n\t\t\tnumbers.remove(picked_index);\n\t\t}\n\t\t\n\t\t// All recently dead cells are now null in our cell list, so we are removing them from the list now\n\t\tfor(int i = 0; i < listOfCells.size(); i++)\n\t\t{\n\t\t\tif(listOfCells.get(i) == null)\n\t\t\t{\n\t\t\t\tlistOfCells.remove(i);\n\t\t\t\ti--; //Adjust for changing size\n\t\t\t}\n\t\t}\n\t}", "public void generateBlock(World world, BlockPos pos) {\n\t\tworld.setBlockState(pos, this.getDefaultState().withProperty(COLOR, world.rand.nextInt(COLORS.length / 2)), 2);\n\t}", "protected abstract void allocateBlocks(int numBlocks);", "public boolean generate(World paramaqu, Random paramRandom, BlockPosition paramdt)\r\n/* 12: */ {\r\n/* 13: 19 */ int i = paramRandom.nextInt(4) + 5;\r\n/* 14: 20 */ while (paramaqu.getBlock(paramdt.down()).getType().getMaterial() == Material.water) {\r\n/* 15: 21 */ paramdt = paramdt.down();\r\n/* 16: */ }\r\n/* 17: 24 */ int j = 1;\r\n/* 18: 25 */ if ((paramdt.getY() < 1) || (paramdt.getY() + i + 1 > 256)) {\r\n/* 19: 26 */ return false;\r\n/* 20: */ }\r\n/* 21: */ int n;\r\n/* 22: */ int i2;\r\n/* 23: 29 */ for (int k = paramdt.getY(); k <= paramdt.getY() + 1 + i; k++)\r\n/* 24: */ {\r\n/* 25: 30 */ int m = 1;\r\n/* 26: 31 */ if (k == paramdt.getY()) {\r\n/* 27: 32 */ m = 0;\r\n/* 28: */ }\r\n/* 29: 34 */ if (k >= paramdt.getY() + 1 + i - 2) {\r\n/* 30: 35 */ m = 3;\r\n/* 31: */ }\r\n/* 32: 37 */ for (n = paramdt.getX() - m; (n <= paramdt.getX() + m) && (j != 0); n++) {\r\n/* 33: 38 */ for (i2 = paramdt.getZ() - m; (i2 <= paramdt.getZ() + m) && (j != 0); i2++) {\r\n/* 34: 39 */ if ((k >= 0) && (k < 256))\r\n/* 35: */ {\r\n/* 36: 40 */ BlockType localatr3 = paramaqu.getBlock(new BlockPosition(n, k, i2)).getType();\r\n/* 37: 41 */ if ((localatr3.getMaterial() != Material.air) && (localatr3.getMaterial() != Material.leaves)) {\r\n/* 38: 42 */ if ((localatr3 == BlockList.water) || (localatr3 == BlockList.flowingWater))\r\n/* 39: */ {\r\n/* 40: 43 */ if (k > paramdt.getY()) {\r\n/* 41: 44 */ j = 0;\r\n/* 42: */ }\r\n/* 43: */ }\r\n/* 44: */ else {\r\n/* 45: 47 */ j = 0;\r\n/* 46: */ }\r\n/* 47: */ }\r\n/* 48: */ }\r\n/* 49: */ else\r\n/* 50: */ {\r\n/* 51: 51 */ j = 0;\r\n/* 52: */ }\r\n/* 53: */ }\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 57 */ if (j == 0) {\r\n/* 57: 58 */ return false;\r\n/* 58: */ }\r\n/* 59: 61 */ BlockType localatr1 = paramaqu.getBlock(paramdt.down()).getType();\r\n/* 60: 62 */ if (((localatr1 != BlockList.grass) && (localatr1 != BlockList.dirt)) || (paramdt.getY() >= 256 - i - 1)) {\r\n/* 61: 63 */ return false;\r\n/* 62: */ }\r\n/* 63: 66 */ makeDirt(paramaqu, paramdt.down());\r\n/* 64: */ int i3;\r\n/* 65: */ int i4;\r\n/* 66: */ BlockPosition localdt3;\r\n/* 67: 68 */ for (int m = paramdt.getY() - 3 + i; m <= paramdt.getY() + i; m++)\r\n/* 68: */ {\r\n/* 69: 69 */ n = m - (paramdt.getY() + i);\r\n/* 70: 70 */ i2 = 2 - n / 2;\r\n/* 71: 71 */ for (i3 = paramdt.getX() - i2; i3 <= paramdt.getX() + i2; i3++)\r\n/* 72: */ {\r\n/* 73: 72 */ i4 = i3 - paramdt.getX();\r\n/* 74: 73 */ for (int i5 = paramdt.getZ() - i2; i5 <= paramdt.getZ() + i2; i5++)\r\n/* 75: */ {\r\n/* 76: 74 */ int i6 = i5 - paramdt.getZ();\r\n/* 77: 75 */ if ((Math.abs(i4) != i2) || (Math.abs(i6) != i2) || ((paramRandom.nextInt(2) != 0) && (n != 0)))\r\n/* 78: */ {\r\n/* 79: 78 */ localdt3 = new BlockPosition(i3, m, i5);\r\n/* 80: 79 */ if (!paramaqu.getBlock(localdt3).getType().m()) {\r\n/* 81: 80 */ setBlock(paramaqu, localdt3, BlockList.leaves);\r\n/* 82: */ }\r\n/* 83: */ }\r\n/* 84: */ }\r\n/* 85: */ }\r\n/* 86: */ }\r\n/* 87: 86 */ for (int m = 0; m < i; m++)\r\n/* 88: */ {\r\n/* 89: 87 */ BlockType localatr2 = paramaqu.getBlock(paramdt.up(m)).getType();\r\n/* 90: 88 */ if ((localatr2.getMaterial() == Material.air) || (localatr2.getMaterial() == Material.leaves) || (localatr2 == BlockList.flowingWater) || (localatr2 == BlockList.water)) {\r\n/* 91: 89 */ setBlock(paramaqu, paramdt.up(m), BlockList.log);\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94: 93 */ for (int m = paramdt.getY() - 3 + i; m <= paramdt.getY() + i; m++)\r\n/* 95: */ {\r\n/* 96: 94 */ int i1 = m - (paramdt.getY() + i);\r\n/* 97: 95 */ i2 = 2 - i1 / 2;\r\n/* 98: 96 */ for (i3 = paramdt.getX() - i2; i3 <= paramdt.getX() + i2; i3++) {\r\n/* 99: 97 */ for (i4 = paramdt.getZ() - i2; i4 <= paramdt.getZ() + i2; i4++)\r\n/* 100: */ {\r\n/* 101: 98 */ BlockPosition localdt1 = new BlockPosition(i3, m, i4);\r\n/* 102:100 */ if (paramaqu.getBlock(localdt1).getType().getMaterial() == Material.leaves)\r\n/* 103: */ {\r\n/* 104:101 */ BlockPosition localdt2 = localdt1.west();\r\n/* 105:102 */ localdt3 = localdt1.east();\r\n/* 106:103 */ BlockPosition localdt4 = localdt1.north();\r\n/* 107:104 */ BlockPosition localdt5 = localdt1.south();\r\n/* 108:106 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt2).getType().getMaterial() == Material.air)) {\r\n/* 109:107 */ a(paramaqu, localdt2, bbv.S);\r\n/* 110: */ }\r\n/* 111:109 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt3).getType().getMaterial() == Material.air)) {\r\n/* 112:110 */ a(paramaqu, localdt3, bbv.T);\r\n/* 113: */ }\r\n/* 114:112 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt4).getType().getMaterial() == Material.air)) {\r\n/* 115:113 */ a(paramaqu, localdt4, bbv.Q);\r\n/* 116: */ }\r\n/* 117:115 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt5).getType().getMaterial() == Material.air)) {\r\n/* 118:116 */ a(paramaqu, localdt5, bbv.R);\r\n/* 119: */ }\r\n/* 120: */ }\r\n/* 121: */ }\r\n/* 122: */ }\r\n/* 123: */ }\r\n/* 124:122 */ return true;\r\n/* 125: */ }", "public static Grid makeRandStackGrid() {\n Block randBlock = makeRandomBlock();\n ArrayList<Block> array1 = new ArrayList<>();\n array1.add(randBlock);\n ArrayList<Block> array2 = new ArrayList<>();\n Block block1 = makeBlockUnder(randBlock);\n array2.add(block1);\n Grid testGrid = new Grid(array2, array1);\n return testGrid;\n }", "public BlockGroup(int[] ids, int width, int height, double angle, Vec2 position, double scale, Vec2 velocity) {\n\t\tBodyDef def = new BodyDef();\n\t\tdef.position = position;\n\t\tdef.angle = angle;\n\t\tdef.linearVelocity = velocity;\n\t\tdef.type = BodyType.DYNAMIC;\n\n\t\tinnit(def);\n\t\tGame.getWorld().createBody(this);\n\n\t\tfixtures = new Fixture[(width + 2) * (height + 2)][];\n\n\t\tblocks = ids;\n\t\theat = new double[ids.length];\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.scale = scale;\n\t\tnumber = 1;\n\t\tFixtureDef[] fd = null;\n\n\t\t//(0, 0) is at 1, 1\n\t\tint[] sensors = new int[(width + 2) * (height + 2)];\n\n\t\tfor(int i = 0; i < ids.length; i++) {\n\t\t\tBlock b = Block.getBlock(id(i));\n\t\t\tnumber += b.getTextureLayers(x(i), y(i), this);\n\n\t\t\tif(b.canBePlaced(Direction.RIGHT, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i) + 1, y(i))] |= 1;\n\t\t\tif(b.canBePlaced(Direction.LEFT, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i) - 1, y(i))] |= 1;\n\t\t\tif(b.canBePlaced(Direction.UP, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i), y(i) + 1)] |= 1;\n\t\t\tif(b.canBePlaced(Direction.DOWN, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i), y(i) - 1)] |= 1;\n\n\t\t\tfd = b.getPhysics(x(i), y(i), this);\n\n\t\t\tif(fd != null) {\n\t\t\t\tcreateFixture(fd);\n\t\t\t\tsensors[fi(x(i), y(i))] = 2;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < sensors.length; i++) {\n\t\t\tif(sensors[i] == 1) {\n\t\t\t\tcreateSensor((i % (width + 2)) - 1, (i / (width + 2)) - 1);\n\t\t\t}\n\t\t}\n\t}", "public void b(World paramaqu, BlockPosition paramdt, Block parambec, Random paramRandom)\r\n/* 39: */ {\r\n/* 40: 54 */ if (paramaqu.isClient) {\r\n/* 41: 55 */ return;\r\n/* 42: */ }\r\n/* 43: 58 */ if ((paramaqu.l(paramdt.up()) < 4) && (paramaqu.getBlock(paramdt.up()).getType().getLightOpacity() > 2))\r\n/* 44: */ {\r\n/* 45: 59 */ paramaqu.setBlock(paramdt, BlockList.dirt.instance());\r\n/* 46: 60 */ return;\r\n/* 47: */ }\r\n/* 48: 63 */ if (paramaqu.l(paramdt.up()) >= 9) {\r\n/* 49: 64 */ for (int i = 0; i < 4; i++)\r\n/* 50: */ {\r\n/* 51: 65 */ BlockPosition localdt = paramdt.offset(paramRandom.nextInt(3) - 1, paramRandom.nextInt(5) - 3, paramRandom.nextInt(3) - 1);\r\n/* 52: 66 */ BlockType localatr = paramaqu.getBlock(localdt.up()).getType();\r\n/* 53: 67 */ Block localbec = paramaqu.getBlock(localdt);\r\n/* 54: 68 */ if ((localbec.getType() == BlockList.dirt) && (localbec.getData(BlockDirt.a) == avd.a) && (paramaqu.l(localdt.up()) >= 4) && (localatr.getLightOpacity() <= 2)) {\r\n/* 55: 69 */ paramaqu.setBlock(localdt, BlockList.grass.instance());\r\n/* 56: */ }\r\n/* 57: */ }\r\n/* 58: */ }\r\n/* 59: */ }", "@Override\r\n public List<Block> blocks() {\r\n List<Block> blockList = new ArrayList<Block>();\r\n java.awt.Color[] colors = new Color[5];\r\n colors[0] = Color.decode(\"#c1b8b2\");\r\n colors[1] = Color.decode(\"#ef1607\");\r\n colors[2] = Color.decode(\"#ffff1e\");\r\n colors[3] = Color.decode(\"#211ed8\");\r\n colors[4] = Color.decode(\"#fffff6\");\r\n int y = 150;\r\n int[] hitPoints = {2, 1, 1, 1, 1};\r\n for (int i = 0; i < colors.length; i++) {\r\n for (int j = i + 5; j < 15; j++) {\r\n blockList.add(new Block(j * 50 + 25, y, 50, 20, colors[i], hitPoints[i]));\r\n }\r\n y += 20;\r\n }\r\n return blockList;\r\n }", "public void setBlock(int b, int block[][]){\n\t\tfor (int i = 0; i < size; i++){\n\t\t\tfor (int j = 0; j < size; j++){\n\t\t\t\tnumbers[i+size*(b/size)][j+size*(b%size)] =\n\t\t\t\t\tblock[i][j];\n\t\t\t}\n\t\t}\n\t}", "@Override\n public List<Block> blocks() {\n List<Block> blocksList = new ArrayList<Block>();\n\n //Setting the blocks\n for (int j = 0; j <= 14; j++) {\n if (j == 0 || j == 1) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.CYAN));\n } else if (j == 2 || j == 3) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.PINK));\n } else if (j == 4 || j == 5) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.BLUE));\n } else if (j == 6 || j == 7 || j == 8) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.GREEN));\n } else if (j == 9 || j == 10) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.YELLOW));\n } else if (j == 11 || j == 12) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.ORANGE));\n } else if (j == 13 || j == 14) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.RED));\n }\n }\n\n return blocksList;\n }", "RclBlock createRclBlock();", "void block(Directions dir);", "@Test\n public void testSafeBlocks() {\n IntStream.iterate(0, i -> i + 1).limit(LevelImpl.LEVEL_MAX).forEach(k -> {\n terrain = terrainFactory.create(level.getBlocksNumber());\n /* use 0 and 1 position because the margin blocks are inserted initially*/\n assertEquals(new Position(3 * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE, \n TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE), terrain.getBlocks().get(0).getPosition());\n assertEquals(new Position(TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE,\n 3 * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE), terrain.getBlocks().get(1).getPosition());\n level.levelUp();\n });\n }", "@SideOnly(Side.CLIENT)\n @Override\n public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {\n if(!ResynthConfig.PLANTS_GENERAL.enableSmokingPlants)\n return;\n\n IBlockState iblockstate = world.getBlockState(pos);\n int amount = 3;\n\n if(!MathUtil.chance(2.0F))\n return;\n\n if (iblockstate.getMaterial() != Material.AIR) {\n for (int i = 0; i < amount; ++i){\n double d0 = rand.nextGaussian() * 0.02D;\n double d1 = rand.nextGaussian() * 0.02D;\n double d2 = rand.nextGaussian() * 0.02D;\n world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,\n (double)((float)pos.getX() + rand.nextFloat()),\n (double)pos.getY() + (double)rand.nextFloat()\n * iblockstate.getBoundingBox(world, pos).maxY,\n (double)((float)pos.getZ() + rand.nextFloat()), d0, d1, d2);\n }\n }\n else {\n for (int i1 = 0; i1 < amount; ++i1) {\n double d0 = rand.nextGaussian() * 0.02D;\n double d1 = rand.nextGaussian() * 0.02D;\n double d2 = rand.nextGaussian() * 0.02D;\n world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,\n (double)((float)pos.getX() + rand.nextFloat()),\n (double)pos.getY() + (double)rand.nextFloat() * 1.0f,\n (double)((float)pos.getZ() + rand.nextFloat()), d0, d1, d2);\n }\n }\n }", "public int[][] getBlock(int b){\n\t\tint[][] block = new int[size][size];\n\t\tfor (int i = 0; i < size; i++){\n\t\t\tfor (int j = 0; j < size; j++){\n\t\t\t\tblock[i][j] = numbers[i+size*(b/size)]\n\t\t\t\t\t\t [j+size*(b%size)];\n\t\t\t}\n\t\t}\n\t\treturn block;\n\t}", "public void PlantMe(Block block){\n \tplugin.getReplant().add(block);\r\n \t\t//run the timer to load the block\r\n \t\r\n \tif(plugin.getTreeplant_Timer().getPoolSize() < plugin.getTreeplant_Timer().getMaximumPoolSize()){\r\n \t\tplugin.getTreeplant_Timer().schedule(new Runnable() {\r\n \t\t\t\tpublic void run() {\r\n \t\t\t\t\tif(!(plugin.getReplant().isEmpty())){\r\n \t\t\t\t\t\tBlock loadedBlock = plugin.getReplant().get(0);\r\n \t\t\t\t\t\t//remove it from the list\r\n \t\t\t\t\t\tplugin.getReplant().remove(0);\r\n \t\t\t\t\t\t//protect it\r\n \t\t\t\t\t\tProtectMe(loadedBlock);\r\n \t\t\t\t\t\t//made into a sap\r\n \t\t\t\t\t\tif( (loadedBlock.getType().equals(Material.AIR)) || (loadedBlock.getType().equals(Material.FIRE)) ) //just incase it was on fire\r\n \t\t\t\t\t\t\tloadedBlock.setType(Material.SAPLING);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t/* No longer needed! Didn't realized leaves light blocking changed way back when.\r\n \t\t\t\t\t\t * for(int i=loadedBlock.getY(); i < 128; i++){\r\n \t\t\t\t\t\t\t//delete all the leaves in a line to the sky limit\r\n \t\t\t\t\t\t\tif(loadedBlock.getType()==Material.LEAVES){\r\n \t\t\t\t\t\t\t\t//it's a leaf delete it\r\n \t\t\t\t\t\t\t\tloadedBlock.setType(Material.AIR);\r\n \t\t\t\t\t\t\t\t//update on server | Not needed?\r\n \t\t\t\t\t\t\t\t//etc.getServer().setBlock(leafToDelete);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t//go up one\r\n \t\t\t\t\t\t\tloadedBlock = loadedBlock.getFace(BlockFace.UP);\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}, plugin.getdelayTime(), TimeUnit.MILLISECONDS);\r\n \t}\r\n \t}", "private static void populateBlocks() {\n\n //TODO set sensors for each\n\n /* Path A */\n SW1A.setProceeding(new Block[]{SW2A, STA1Z, SW2B});\n SW1A.setPreceding(new Block[]{PTH5A});\n\n SW2A.setProceeding(new Block[]{LD1A});\n SW2A.setPreceding(new Block[]{SW1A});\n\n SW3A.setProceeding(new Block[]{SW4A});\n SW3A.setPreceding(new Block[]{LD1A});\n\n SW4A.setProceeding(new Block[]{PTH1A});\n SW4A.setPreceding(new Block[]{SW3A, STA1Z, SW3B});\n\n PTH1A.setProceeding(new Block[]{PTH2A});\n PTH1A.setPreceding(new Block[]{SW4A});\n\n PTH2A.setProceeding(new Block[]{PTH3A});\n PTH2A.setPreceding(new Block[]{PTH1A});\n\n PTH3A.setProceeding(new Block[]{PTH4A});\n PTH3A.setPreceding(new Block[]{PTH2A});\n\n PTH4A.setProceeding(new Block[]{PTH5A});\n PTH4A.setPreceding(new Block[]{PTH3A});\n\n PTH5A.setProceeding(new Block[]{SW1A});\n PTH5A.setPreceding(new Block[]{PTH4A});\n\n LD1A.setProceeding(new Block[]{SW3A});\n LD1A.setPreceding(new Block[]{SW2A});\n\n\n /* Station */\n STA1Z.setProceeding(new Block[]{SW4A});\n STA1Z.setPreceding(new Block[]{SW1A});\n\n\n /* Path B */\n //TODO path B items aren't in yet\n LD1B.setProceeding(new Block[]{SW3B});\n LD1B.setPreceding(new Block[]{SW2B});\n\n SW2B.setProceeding(new Block[]{LD1B});\n SW2B.setPreceding(new Block[]{SW1B});\n\n SW3B.setProceeding(new Block[]{SW4B});\n SW3B.setPreceding(new Block[]{LD1B});\n\n\n /* Maintenance Bay */\n //TODO maintenance bay items aren't in yet\n\n\n\n\n /* Set up array */\n blocksArray = new Block[] {}; //TODO fill\n }", "private boolean UpdateWithoutCarriedBlock()\r\n {\r\n if ( rand.nextInt(20) == 0 )\r\n {\r\n int i = MathHelper.floor_double( ( posX - 3D ) + rand.nextDouble() * 6D );\r\n int j = MathHelper.floor_double( posY - 1D + rand.nextDouble() * 7D );\r\n int k = MathHelper.floor_double( ( posZ - 3D ) + rand.nextDouble() * 6D );\r\n \r\n int l1 = worldObj.getBlockId( i, j, k );\r\n\r\n if ( CanPickUpBlock( i, j, k ) )\r\n {\r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderBlockCollectAuxFXID, i, j, k, l1 + ( worldObj.getBlockMetadata( i, j, k ) << 12 ) );\r\n\t\t \r\n setCarried( worldObj.getBlockId( i, j, k ) );\r\n setCarryingData( worldObj.getBlockMetadata( i, j, k ) );\r\n worldObj.setBlockToAir( i, j, k );\r\n }\r\n }\r\n else if ( worldObj.provider.dimensionId == 1 )\r\n {\r\n \t// Endermen in the end without a block in hand will eventually teleport back to the overworld\r\n \t\r\n \t\tif ( rand.nextInt( 9600 ) == 0 )\r\n \t\t{\r\n \t\t\t// play dimensional travel effects\r\n \t\t\t\r\n int i = MathHelper.floor_double( posX );\r\n int j = MathHelper.floor_double( posY ) + 1;\r\n int k = MathHelper.floor_double( posZ );\r\n \r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderChangeDimensionAuxFXID, i, j, k, 0 );\r\n\t\t \r\n setDead();\r\n \r\n return false;\r\n \t\t}\r\n }\r\n \r\n return true;\r\n }", "public void blockedAndBlock(){\n\t\tif(player.isAttacking() && random(BASE_BLOCK_PERCENTAJE + ((double)difficulty)/10)){\n\t\t\tplayer.hasBeenBlocked();\n\t\t\tthis.setCurrentAnimation(\"blocked and prepare block_\" + orientation, FRAME_DURATION);\n\t\t\tmanageSword(\"blocked and prepare block\", 0, false);\n\t\t} else{\n\t\t\tthis.setCurrentAnimation(\"attack end blocked_\" + orientation, FRAME_DURATION);\n\t\t\tmanageSword(\"attack end blocked\", 0, false);\n\t\t}\n\t}", "public void updateTick(World world, int x, int y, int z, Random rand)\n {\n if (!world.isRemote)\n {\n int l = world.getBlockMetadata(x, y, z);\n\n if ((l & 8) != 0 && (l & 4) == 0)\n {\n byte b0 = 4;\n int i1 = b0 + 1;\n byte b1 = 32;\n int j1 = b1 * b1;\n int k1 = b1 / 2;\n\n if (this.decayThingy == null)\n {\n this.decayThingy = new int[b1 * b1 * b1];\n }\n\n int l1;\n\n if (world.checkChunksExist(x - i1, y - i1, z - i1, x + i1, y + i1, z + i1))\n {\n int i2;\n int j2;\n\n for (l1 = -b0; l1 <= b0; ++l1)\n {\n for (i2 = -b0; i2 <= b0; ++i2)\n {\n for (j2 = -b0; j2 <= b0; ++j2)\n {\n Block block = world.getBlock(x + l1, y + i2, z + j2);\n\n if (block != ForbiddenBlocks.taintLog)\n {\n if (block.isLeaves(world, x + l1, y + i2, z + j2))\n {\n this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -2;\n }\n else\n {\n this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -1;\n }\n }\n else\n {\n this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = 0;\n }\n }\n }\n }\n\n for (l1 = 1; l1 <= 4; ++l1)\n {\n for (i2 = -b0; i2 <= b0; ++i2)\n {\n for (j2 = -b0; j2 <= b0; ++j2)\n {\n for (int k2 = -b0; k2 <= b0; ++k2)\n {\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1] == l1 - 1)\n {\n if (this.decayThingy[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] = l1;\n }\n }\n }\n }\n }\n }\n }\n\n l1 = this.decayThingy[k1 * j1 + k1 * b1 + k1];\n\n if (l1 >= 0)\n {\n world.setBlockMetadataWithNotify(x, y, z, l & -9, 4);\n }\n else\n {\n this.removeLeaves(world, x, y, z);\n }\n }\n }\n }", "public static BlockExpression block(Iterable<Expression> expressions) { throw Extensions.todo(); }", "Block getBlockByHash(byte[] hash);", "protected void processBlock() {\n\t\t// expand 16 word block into 64 word blocks.\n\t\t//\n\t\tfor (int t = 16; t <= 63; t++) {\n\t\t\tX[t] = Theta1(X[t - 2]) + X[t - 7] + Theta0(X[t - 15]) + X[t - 16];\n\t\t}\n\n\t\t//\n\t\t// set up working variables.\n\t\t//\n\t\tint a = H1;\n\t\tint b = H2;\n\t\tint c = H3;\n\t\tint d = H4;\n\t\tint e = H5;\n\t\tint f = H6;\n\t\tint g = H7;\n\t\tint h = H8;\n\n\t\tint t = 0;\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t// t = 8 * i\n\t\t\th += Sum1(e) + Ch(e, f, g) + K[t] + X[t];\n\t\t\td += h;\n\t\t\th += Sum0(a) + Maj(a, b, c);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 1\n\t\t\tg += Sum1(d) + Ch(d, e, f) + K[t] + X[t];\n\t\t\tc += g;\n\t\t\tg += Sum0(h) + Maj(h, a, b);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 2\n\t\t\tf += Sum1(c) + Ch(c, d, e) + K[t] + X[t];\n\t\t\tb += f;\n\t\t\tf += Sum0(g) + Maj(g, h, a);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 3\n\t\t\te += Sum1(b) + Ch(b, c, d) + K[t] + X[t];\n\t\t\ta += e;\n\t\t\te += Sum0(f) + Maj(f, g, h);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 4\n\t\t\td += Sum1(a) + Ch(a, b, c) + K[t] + X[t];\n\t\t\th += d;\n\t\t\td += Sum0(e) + Maj(e, f, g);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 5\n\t\t\tc += Sum1(h) + Ch(h, a, b) + K[t] + X[t];\n\t\t\tg += c;\n\t\t\tc += Sum0(d) + Maj(d, e, f);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 6\n\t\t\tb += Sum1(g) + Ch(g, h, a) + K[t] + X[t];\n\t\t\tf += b;\n\t\t\tb += Sum0(c) + Maj(c, d, e);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 7\n\t\t\ta += Sum1(f) + Ch(f, g, h) + K[t] + X[t];\n\t\t\te += a;\n\t\t\ta += Sum0(b) + Maj(b, c, d);\n\t\t\t++t;\n\t\t}\n\n\t\tH1 += a;\n\t\tH2 += b;\n\t\tH3 += c;\n\t\tH4 += d;\n\t\tH5 += e;\n\t\tH6 += f;\n\t\tH7 += g;\n\t\tH8 += h;\n\n\t\t//\n\t\t// reset the offset and clean out the word buffer.\n\t\t//\n\t\txOff = 0;\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tX[i] = 0;\n\t\t}\n\t}", "public static String getRandomIpsumBlock() {\n String[] parts = loremIpsum.split(\" \");\n shuffleArray(parts);\n String block = combine(parts, \" \").toLowerCase();\n block = capitalize(block) + \".\";\n return block;\n }", "public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chancesToSpawn, int minY, int maxY) {\n assert maxY > minY : \"The maximum Y must be greater than the Minimum Y\";\n assert maxX > 0 && maxX <= 16 : \"addOreSpawn: The Maximum X must be greater than 0 and less than 16\";\n assert minY > 0 : \"addOreSpawn: The Minimum Y must be greater than 0\";\n assert maxY < 256 && maxY > 0 : \"addOreSpawn: The Maximum Y must be less than 256 but greater than 0\";\n assert maxZ > 0 && maxZ <= 16 : \"addOreSpawn: The Maximum Z must be greater than 0 and less than 16\";\n \n int diffBtwnMinMaxY = maxY - minY;\n for (int x = 0; x < chancesToSpawn; x++) {\n int posX = blockXPos + random.nextInt(maxX);\n int posY = minY + random.nextInt(diffBtwnMinMaxY);\n int posZ = blockZPos + random.nextInt(maxZ);\n (new WorldGenMinable(block, maxVeinSize)).generate(world, random, posX, posY, posZ);\n }\n }", "public void generateTerrain()\n\t{\n\t\tint rand;\n\t\tint starting=(int)(blocksWide*0.45);//Choose the first grass block\n\t\tblocksTall=(int)(blocksWide*0.6);\n\t\tfor(int i=0;i<blocksWide;i++)\n\t\t{\n\t\t\t//Determine whether the next block will go up a level, down a level or stay the same (55% chance of staying the same)\n\t\t\trand=ThreadLocalRandom.current().nextInt(0,3);\t\n\t\t\tif(rand!=0)\n\t\t\t{\n\t\t\t\trand=ThreadLocalRandom.current().nextInt(-1,2);\n\t\t\t}\n\t\t\tif(starting+rand<blocksTall-2 && starting+rand>4)\t//Make sure new position isn't too close to the top or bottom\n\t\t\t{\n\t\t\t\tstarting+=rand;\n\t\t\t}\n\t\t\tgrassy[i]=starting;\n\t\t\tgrassT[i]=ThreadLocalRandom.current().nextInt(0,3);\n\t\t\t//Generate a platform to allow for collision detection\n\t\t\tplatforms.add(new Platform((double)i/blocksWide,(double)starting/blocksTall,1.0/blocksWide,1.0/blocksWide));\n\t\t}\n\t\tplatforms.add(new Platform(0.0,0.0,0.0,0.0));\n\t}", "int process(int maxBlocks);", "private void createRiver(Square[][]Squares, int rows, int columns, int[][] terrainLoc)\n {\n // create a seed location for the river to start\n int riverRand = (int )(Math.random() * columns);\n \n // making sure the river will not start too close to the borders\n if (riverRand < columns/6 || riverRand > columns/1.2)\n {\n for(;riverRand > columns/6 && riverRand < columns/1.2 && riverRand < columns - 2;)\n {\n riverRand = (int )(Math.random() * columns + 1);\n }\n }\n // place the river seeds\n Squares[0][riverRand].setTerrain(3);\n Squares[1][riverRand].setTerrain(3);\n terrainLoc[0][riverRand] = 3;\n terrainLoc[1][riverRand] = 3;\n \n // start building the river downward \n \n // the grid will be looped horizontally for every second row to find a river tile, from top to bottom,\n // and place an extension to it either to its left or to its right side, which is three blocks long\n for(int a = 1;a<rows;a=a+2)\n {\n for (int b = 0; b<columns-1 ; b++)\n { \n if (terrainLoc[a][b] == 3)\n { \n int rand = (int)(Math.random() * 2 +1);\n \n switch(rand)\n {\n case 1: \n { \n if (b == columns -1)\n {\n Squares[a][b-1].setTerrain(3);\n terrainLoc[a][b-1] = 3;\n \n if(a!=rows-1)\n { \n Squares[a+1][b-1].setTerrain(3);\n terrainLoc[a+1][b-1] = 3;\n }\n if (a == rows -2)\n {\n terrainLoc[a+2][b-1] = 3;\n Squares[a+2][b-1].setTerrain(3);\n }\n }\n else\n {\n Squares[a][b+1].setTerrain(3);\n terrainLoc[a][b+1] = 3;\n \n if(a!=rows-1)\n { \n terrainLoc[a+1][b+1] = 3;\n Squares[a+1][b+1].setTerrain(3);\n }\n if(a<rows-2)\n {\n terrainLoc[a+2][b+1] = 3;\n Squares[a+2][b+1].setTerrain(3);\n }\n }\n \n // ifs to hop the iterator over previously created rivers to avoid adding multiple\n // river extensions on the same row \n if (b<=columns-3)\n {\n b=b+2;\n }\n if (b==columns-2)\n {\n b++;\n }\n break;\n }\n \n case 2: \n { \n if (b == 0)\n {\n Squares[a][b+1].setTerrain(3);\n terrainLoc[a][b+1] = 3;\n \n if(a!=rows-1)\n {\n terrainLoc[a+1][b+1] = 3;\n Squares[a+1][b+1].setTerrain(3);\n }\n \n if(a<rows-2)\n {\n terrainLoc[a+2][b+1] = 3;\n Squares[a+2][b+1].setTerrain(3);\n }\n }\n \n else\n {\n Squares[a][b-1].setTerrain(3);\n terrainLoc[a][b-1] = 3;\n \n if(a!=rows-1)\n {\n terrainLoc[a+1][b-1] = 3;\n Squares[a+1][b-1].setTerrain(3);\n }\n if(a<rows-2)\n {\n terrainLoc[a+2][b-1] = 3;\n Squares[a+2][b-1].setTerrain(3);\n }\n }\n \n // ifs to hop the iterator over previously created rivers to avoid adding multiple\n // river extensions on the same row \n if (b<=columns-3)\n {\n b=b+2;\n }\n if (b==columns-2)\n {\n b++;\n }\n break;\n } \n }\n }\n } \n } \n }", "void setBlock(byte[][] result, int x, int y, int z, byte blkid) {\n\t\tif (result[y >> 4] == null) {\n\t\t\t// Initialize the chunk part\n\t\t\tresult[y >> 4] = new byte[4096];\n\t\t}\n\t\t// set the block (look above, how this is done)\n\t\tresult[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;\n\n\t}", "public ArrayList<Block> getBlocks() {\n ArrayList<Block> blocks = new ArrayList<>();\n\n for (Vector2D pos : template) {\n blocks.add(new Block(pos.addVectorGetNewVector(center), this.color));\n }\n return blocks;\n }", "List<Block> blocks();", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "private void Management_Block(Block block){\n\t\t\n\t\t switch(block.BlockState){\n\t\t \n\t\t case 0: // player is not lost game. continue with tile micro managment\n\t\t\t \n\t\t\t for (Tile tile : block.Wall){\t\t\n\t\t\t\t \n\t\t\t\t Rectangle rectTile = new Rectangle();\n\t\t\t\t rectTile = tile.getRectTile();\n\t\t\t\t boolean CoinCollision = CollisionDetection(playerUser.bounds,rectTile);\n\t\t\t\t \n\t\t\t\t switch(tile.state)\n\t\t\t\t {\n\t\t\t\t \n\t\t\t\t case 0: // no collision, show the block\n\t\t\t\t\t \n\t\t\t\t\t batch.draw(tile.getBlockImg(), rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\n\t\t\t\t\t \n\t\t\t\t\t if (PauseGame) \n\t\t\t\t\t\t continue;\n\t\t\t\t\t\t \n\t\t\t\t\t\t if (CoinCollision==true){\n\t\t\t\t\t\t\t tile.state++; \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t\t\t\n\t\t\t\t\t\t }\t\t\t\t\t\t \n\t\t\t\t\t\t else if (ThisGameRound==GameState.Running){\t \n\t\t\t\t\t\t\t if (block.Passed==false){\n\t\t\t\t\t\t\t\t if (playerUser.position.x > block.Wall.get(0).rectTile.x){\n\t\t\t\t\t\t\t\t\t levelbuilder.gamePoints = levelbuilder.gamePoints + 1;\n\t\t\t\t\t\t\t\t\t fntScore.setBitmapText(\"Score: \" + String.valueOf(levelbuilder.gamePoints));\n\t\t\t\t\t\t\t\t\t block.Passed=true;\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 else if (block.Passed==true){\n\t\t\t\t\t\t\t\t //do nothing.\n\t\t\t\t\t\t\t }\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t break;\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t case 1: \n\t\t\t\t\t \n\t\t\t\t\t batch.draw(tile.getBlockImg(),rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\t\t\t\t\t \n\t\t\t\t\t // if there is a collotion, draw it one time only \t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t// collision, but player has key\n\t\t\t\t\t\t PhoneDevice.Vibrate();\t\n\t\t\t\t\t\t if ((playerUser.color==block.color) || (playerUser.color==Color.ALL)){\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\ttile.setBlockImg(tile.BlockType);\t\n\t\t\t\t\t \t\ttile.PlayBreakThoughSound();\t\n\t\t\t\t\t\t }\n\t\t\t\t\t\t // collision, but player dont have a key: break from tile loop and \n\t\t\t\t\t \t // draw block crash effect\n\t\t\t\t\t\t else if (DEBUG==false){\n\t\t\t\t\t\t\t block.BlockState=1;\n\t\t\t\t\t\t\t ThisGameRound = GameState.GameOver;\t\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t }\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t tile.pe = Effects.setNewEffect(enumEffects.TileDistruction, block.color);\t\t\t\t\t\t \n\t\t\t\t\t tile.pe.setPosition(tile.getRectTile().x,\n\t\t\t \t\t\t\ttile.getRectTile().y+tile.Height/2);\t\n\t\t\t\t\t tile.pe.start();\t\n\t\t\t\t\t tile.state++;\t\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t break;\n\t\t\t\t\t \n\t\t\t\t case 2:\n\t\t\t\t\t // continue to draw the effect: no matter collision result\n\t\t\t\t\t tile.pe.setPosition(tile.getRectTile().x,\n\t\t\t \t\t\t\ttile.getRectTile().y+tile.Height/2);\t\n\t\t\t\t\t \n\t\t\t\t\t tile.pe.update(Gdx.graphics.getDeltaTime());\n\t\t\t\t tile.pe.draw(batch,Gdx.graphics.getDeltaTime());\t\t\t\t \t\t\t\t\t\n\t\t\t\t\t break;\n\t\t\t\t\t \n\t\t\t\t }\t\t\t\t \n\t\t\t }\t\t\t\t\n\t\t\t break;\n\t\t case 1: // player hit the wall without key\t\t\n\t\t\t \n\t\t\t for (Tile tile : block.Wall){\t\t\n\t\t\t\t \n\t\t\t\t Rectangle rectTile = new Rectangle();\n\t\t\t\t rectTile = tile.getRectTile();\t\t\t\t\n\t\t\t\t batch.draw(tile.getBlockImg(), rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t block.PlayCrashSound();\t\t\n\t\t\t block.pe = Effects.setNewEffect(enumEffects.Crash, block.color);\t\t\t\t\t\t \n\t\t\t block.pe.setPosition(playerUser.bounds.x + playerUser.bounds.width,\n\t\t\t\t\t playerUser.bounds.y + playerUser.bounds.height/2);\t\n\t\t\t block.pe.start();\n\t\t\t block.BlockState++;\n\t\t\t break;\n\t\t\t \n\t\t case 2:\n\t\t\t \n\t\t\t for (Tile tile : block.Wall){\t\t\n\t\t\t\t \n\t\t\t\t Rectangle rectTile = new Rectangle();\n\t\t\t\t rectTile = tile.getRectTile();\t\t\t\t\n\t\t\t\t batch.draw(tile.getBlockImg(), rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t block.pe.update(Gdx.graphics.getDeltaTime());\n\t\t\t block.pe.draw(batch,Gdx.graphics.getDeltaTime());\t\n\t\t\t break;\n\t\t }\t\t\n\t }", "private List<Block> createBlocks() {\n ArrayList<String> listOfBlocksAndSpacers = new ArrayList<String>();\n boolean buffer = false;\n for (int i = 0; i < level.size(); i++) {\n // if it starts with END_BLOCKS\n if (level.get(i).startsWith(\"END_BLOCKS\")) {\n buffer = false;\n } // if the buffer is true\n if (buffer) {\n listOfBlocksAndSpacers.add(level.get(i));\n } // if it starts with START_BLOCKS\n if (level.get(i).startsWith(\"START_BLOCKS\")) {\n buffer = true;\n } else if (level.get(i).startsWith(\"END_BLOCKS\")) {\n buffer = false;\n }\n }\n // find the x position where it all starts\n int startX = Integer.parseInt(this.map.get(\"blocks_start_x\"));\n int xForSave = startX;\n // find the y position where it all starts\n int startY = Integer.parseInt(this.map.get(\"blocks_start_y\"));\n List<Block> listOfBlocks = new ArrayList<>();\n String[] s;\n setBlocks();\n // go over the list of blocks of spacers\n for (int i = 0; i < listOfBlocksAndSpacers.size(); i++) {\n // split it with empty lines\n s = listOfBlocksAndSpacers.get(i).split(\"\");\n for (int j = 0; j < s.length; j++) {\n if (s[j].equals(\"\")) {\n continue;\n } // if it is a block symbol\n if (this.factory.isBlockSymbol(s[j])) {\n // add to listOfBlocks a block\n listOfBlocks.add(this.factory.getBlock(s[j], startX, startY));\n // continue to the next block with the next location\n startX += this.factory.getBlock(s[j], startX, startY).getCollisionRectangle().getWidth();\n } else if (this.factory.isSpaceSymbol(s[j])) { // move following\n // spacers\n startX += this.factory.getSpaceWidth(s[j]);\n }\n }\n startX = xForSave;\n startY += Integer.parseInt(this.map.get(\"row_height\"));\n }\n // put the blocks in a new blocks list and return it\n List<Block> listOfBlocksCopy = new ArrayList<>();\n for (int z = 0; z < listOfBlocks.size(); z++) {\n listOfBlocksCopy.add(listOfBlocks.get(z).copyBlock());\n }\n return listOfBlocksCopy;\n }", "public void generateElement(Block[][] panelField) {\n\t\tswitch (type) {\n\n\t\tcase 0:\n\t\t\tfor (int col = 3; col < 7; col++) {\n\t\t\t\tpanelField[1][col] = new Block(1, col);\n\t\t\t\tpanelField[1][col].setType(0);\n\t\t\t\tlist.add(panelField[1][col]);\n\t\t\t\tif (col == 5) {\n\t\t\t\t\trotator = panelField[1][5];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\tfor (int col = 3; col < 6; col++) {\n\t\t\t\tpanelField[1][col] = new Block(1, col);\n\t\t\t\tpanelField[1][col].setType(1);\n\t\t\t\tlist.add(panelField[1][col]);\n\t\t\t\tif (col == 4) {\n\t\t\t\t\trotator = panelField[1][4];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpanelField[0][3] = new Block(0, 3);\n\t\t\tpanelField[0][3].setType(1);\n\t\t\tlist.add(panelField[0][3]);\n\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tfor (int col = 3; col < 6; col++) {\n\t\t\t\tpanelField[1][col] = new Block(1, col);\n\t\t\t\tpanelField[1][col].setType(2);\n\t\t\t\tlist.add(panelField[1][col]);\n\t\t\t\tif (col == 4) {\n\t\t\t\t\trotator = panelField[1][4];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpanelField[0][5] = new Block(0, 5);\n\t\t\tpanelField[0][5].setType(2);\n\t\t\tlist.add(panelField[0][5]);\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tfor (int col = 4; col < 6; col++) {\n\t\t\t\tfor (int row = 0; row < 2; row++) {\n\t\t\t\t\tpanelField[row][col] = new Block(row, col);\n\t\t\t\t\tpanelField[row][col].setType(3);\n\t\t\t\t\tlist.add(panelField[row][col]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 4:\n\t\t\tfor (int col = 3; col < 5; col++) {\n\t\t\t\tpanelField[1][col] = new Block(1, col);\n\t\t\t\tpanelField[1][col].setType(4);\n\t\t\t\tlist.add(panelField[1][col]);\n\t\t\t\tif (col == 4) {\n\t\t\t\t\trotator = panelField[1][4];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int col = 4; col < 6; col++) {\n\t\t\t\tpanelField[0][col] = new Block(0, col);\n\t\t\t\tpanelField[0][col].setType(4);\n\t\t\t\tlist.add(panelField[0][col]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 5:\n\t\t\tfor (int col = 3; col < 6; col++) {\n\t\t\t\tpanelField[1][col] = new Block(1, col);\n\t\t\t\tpanelField[1][col].setType(5);\n\t\t\t\tlist.add(panelField[1][col]);\n\t\t\t\tif (col == 4) {\n\t\t\t\t\trotator = panelField[1][4];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpanelField[0][4] = new Block(0, 4);\n\t\t\tpanelField[0][4].setType(5);\n\t\t\tlist.add(panelField[0][4]);\n\t\t\tbreak;\n\n\t\tcase 6:\n\t\t\tfor (int col = 4; col < 6; col++) {\n\t\t\t\tpanelField[1][col] = new Block(1, col);\n\t\t\t\tpanelField[1][col].setType(6);\n\t\t\t\tlist.add(panelField[1][col]);\n\t\t\t\tif (col == 4) {\n\t\t\t\t\trotator = panelField[1][4];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int col = 3; col < 5; col++) {\n\t\t\t\tpanelField[0][col] = new Block(0, col);\n\t\t\t\tpanelField[0][col].setType(6);\n\t\t\t\tlist.add(panelField[0][col]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "public Board twin() {\n \tint[][] newBlocks = new int[dimension()][dimension()];\n \tfor (int row = 0; row < dimension(); row++) {\n \t\tfor (int col = 0; col < dimension(); col++) {\n \t\t\tnewBlocks [row][col] = blocks[row][col];\n \t\t}\n \t}\n \tboolean swappable = false;\n \t//Swap 2 blocks that are not 0\n \tint r1 = 0;\n \tint c1 = 0;\n \tint r2 = 0;\n \tint c2 = 0;\n \twhile ( !swappable ){\n \t\tr1 = StdRandom.uniform(dimension());\n \t\tc1 = StdRandom.uniform(dimension());\n \t\tif ( newBlocks[r1][c1] == 0 )\n \t\t\tcontinue;\n \t\tfor (int i = -1; i <= 1; i+=2){\n \t\t\tif ( c1 + i < 0 || c1 + i > dimension()-1 ){\n \t\t\t\tcontinue;\n \t\t\t} else if ( newBlocks[r1][c1+i] != 0 ){\n \t\t\t\tr2 = r1;\n \t\t\t\tc2 = c1 + i;\n \t\t\t\tswappable = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \t\n \tint temp = newBlocks[r1][c1];\n \tnewBlocks[r1][c1] = newBlocks[r2][c2];\n \tnewBlocks[r2][c2] = temp;\n \t\n \t//Create new board to return\n \treturn new Board(newBlocks, moves);\n }", "protected int[][][] fillOuterBlock(RescueMap rm, int[] block, int density,Random rand){\n\t\treturn new int[0][][];\n\t}", "@Test\n public void cloneTestPuttingBlocks() {\n Playground orginal = new Playground(5, 0.0);\n\n //Place two blocks on empty fields\n if (!orginal.take(1, 1, 1, 2))\n fail();\n if (!orginal.take(1, 4, 2, 4))\n fail();\n\n Playground clone = orginal.clone();\n\n //Try to place block on empty spot\n if (!clone.take(0, 1, 4, 1))\n fail();\n //Try to place block on taken spot\n if (clone.take(1, 1, 1, 2))\n fail();\n }", "private void cutoutBlocks(MetropolisGenerator generator, Cartesian v, Cartesian s, Material floor) {\n int xdir, ydir, zdir;\n xdir = s.X < 0 ? -1 : 1;\n ydir = s.Y < 0 ? -1 : 1;\n zdir = s.Z < 0 ? -1 : 1;\n \n for (int x = 0; Math.abs(x) < Math.abs(s.X); x += xdir) {\n for (int z = 0; Math.abs(z) < Math.abs(s.Z); z += zdir) {\n for (int y = 0; Math.abs(y) < Math.abs(s.Y); y += ydir) {\n generator.getWorld().getBlockAt(v.X + x, v.Y + y, v.Z + z).setType(Material.AIR);\n }\n Block below = generator.getWorld().getBlockAt(v.X + x, v.Y - 1, v.Z + z);\n if (!below.isEmpty()) {\n generator.getWorld().getBlockAt(v.X + x, v.Y - 1, v.Z + z).setType(floor);\n }\n }\n }\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public void RemoveBlock(int NumOfB,ArrayList<Block> blocks,int[] i,int[] j){\r\n try {\r\n //2 blocks\r\n if (NumOfB == 2) {\r\n //update BlockList and map matrix\r\n map[i[0]][j[0]] = '0';\r\n map[i[1]][j[1]] = '0';\r\n blockList.RemovBlock(blockList.getBlock(blocks.get(0).getTypeOfBlock(), i[1], j[1]), blocks.get(1).getTypeOfBlock());\r\n blockList.RemovBlock(blockList.getBlock(blocks.get(0).getTypeOfBlock(), i[0], j[0]), blocks.get(0).getTypeOfBlock());\r\n }\r\n //3 blocks\r\n else {\r\n //update BlockList and map matrix\r\n map[i[0]][j[0]] = '0';\r\n map[i[1]][j[1]] = '0';\r\n map[i[2]][j[2]] = '0';\r\n blockList.RemovBlock(blocks.get(2), blocks.get(2).getTypeOfBlock());\r\n blockList.RemovBlock(blocks.get(1), blocks.get(1).getTypeOfBlock());\r\n blockList.RemovBlock(blocks.get(0), blocks.get(0).getTypeOfBlock());\r\n }\r\n gamePage.Sounds(2);//remove sound\r\n MoveBlock(2);//check if there is block will move down\r\n }catch (ArrayIndexOutOfBoundsException e) {\r\n\r\n }\r\n }", "@NotNull\r\n Block getBlock(int x, int y, int z);", "@Override\r\n protected void generateRavine(long seed, int chunkX, int chunkZ, byte[] chunkData, double blockX, double blockY, double blockZ, float scale, float leftRightRadian, float upDownRadian, int currentY, int targetY, double scaleHeight) {\r\n final int worldHeight = chunkData.length / (16 * 16); // 128 or 256\r\n final Random random = new SecureRandom();\r\n random.setSeed(seed);\r\n\r\n final double chunkCenterX = (double) (chunkX * 16 + 8);\r\n final double chunkCenterZ = (double) (chunkZ * 16 + 8);\r\n float leftRightChange = 0.0F;\r\n float upDownChange = 0.0F;\r\n\r\n if (targetY <= 0) {\r\n final int blockRangeY = this.range * 16 - 16;\r\n targetY = blockRangeY - random.nextInt(blockRangeY / 4);\r\n }\r\n\r\n boolean createFinalRoom = false;\r\n\r\n if (currentY == -1) {\r\n currentY = targetY / 2;\r\n createFinalRoom = true;\r\n }\r\n\r\n float nextIntersectionHeight = 1.0F;\r\n\r\n for (int k1 = 0; k1 < worldHeight; ++k1) {\r\n if (k1 == 0 || random.nextInt(3) == 0) {\r\n nextIntersectionHeight = 1.0F + random.nextFloat() * random.nextFloat() * 1.0F;\r\n }\r\n\r\n this.field_75046_d[k1] = nextIntersectionHeight * nextIntersectionHeight;\r\n }\r\n\r\n for (; currentY < targetY; ++currentY) {\r\n double roomWidth = 1.5D + (double) (MathHelper.sin((float) currentY * (float) Math.PI / (float) targetY) * scale * 1.0F);\r\n double roomHeight = roomWidth * scaleHeight;\r\n roomWidth *= (double) random.nextFloat() * 0.25D + 0.75D;\r\n roomHeight *= (double) random.nextFloat() * 0.25D + 0.75D;\r\n float f6 = MathHelper.cos(upDownRadian);\r\n float f7 = MathHelper.sin(upDownRadian);\r\n blockX += (double) (MathHelper.cos(leftRightRadian) * f6);\r\n blockY += (double) f7;\r\n blockZ += (double) (MathHelper.sin(leftRightRadian) * f6);\r\n upDownRadian *= 0.7F;\r\n upDownRadian += upDownChange * 0.05F;\r\n leftRightRadian += leftRightChange * 0.05F;\r\n upDownChange *= 0.8F;\r\n leftRightChange *= 0.5F;\r\n upDownChange += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 2.0F;\r\n leftRightChange += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 4.0F;\r\n\r\n if (createFinalRoom || random.nextInt(4) != 0) {\r\n double d8 = blockX - chunkCenterX;\r\n double d9 = blockZ - chunkCenterZ;\r\n double d10 = (double) (targetY - currentY);\r\n double d11 = (double) (scale + 2.0F + 16.0F);\r\n\r\n if (d8 * d8 + d9 * d9 - d10 * d10 > d11 * d11) {\r\n return;\r\n }\r\n\r\n if (blockX >= chunkCenterX - 16.0D - roomWidth * 2.0D && blockZ >= chunkCenterZ - 16.0D - roomWidth * 2.0D && blockX <= chunkCenterX + 16.0D + roomWidth * 2.0D && blockZ <= chunkCenterZ + 16.0D + roomWidth * 2.0D) {\r\n final int xLow = TwoMath.withinBounds(MathHelper.floor_double(blockX - roomWidth) - chunkX * 16 - 1, 0, 16);\r\n final int xHigh = TwoMath.withinBounds(MathHelper.floor_double(blockX + roomWidth) - chunkX * 16 + 1, 0, 16);\r\n final int yLow = TwoMath.withinBounds(MathHelper.floor_double(blockY - roomHeight) - 1, 1, worldHeight - 8);\r\n final int yHigh = TwoMath.withinBounds(MathHelper.floor_double(blockY + roomHeight) + 1, 1, worldHeight - 8);\r\n final int zLow = TwoMath.withinBounds(MathHelper.floor_double(blockZ - roomWidth) - chunkZ * 16 - 1, 0, 16);\r\n final int zHigh = TwoMath.withinBounds(MathHelper.floor_double(blockZ + roomWidth) - chunkZ * 16 + 1, 0, 16);\r\n\r\n boolean underWater = false;\r\n for (int x = xLow; !underWater && x < xHigh; ++x) {\r\n for (int z = zLow; !underWater && z < zHigh; ++z) {\r\n for (int y = yHigh + 1; !underWater && y >= yLow - 1; --y) {\r\n final int index = (x * 16 + z) * worldHeight + y;\r\n\r\n if (y >= 0 && y < worldHeight) {\r\n if (isOceanBlock(chunkData, index, x, y, z, chunkX, chunkZ)) {\r\n underWater = true;\r\n }\r\n\r\n if (y != yLow - 1 && x != xLow && x != xHigh - 1 && z != zLow && z != zHigh - 1) {\r\n y = yLow;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!underWater) {\r\n for (int x = xLow; x < xHigh; ++x) {\r\n double d12 = ((double) (x + chunkX * 16) + 0.5D - blockX) / roomWidth;\r\n\r\n for (int z = zLow; z < zHigh; ++z) {\r\n double d13 = ((double) (z + chunkZ * 16) + 0.5D - blockZ) / roomWidth;\r\n int index = (x * 16 + z) * worldHeight + yHigh;\r\n boolean flag2 = false;\r\n\r\n if (d12 * d12 + d13 * d13 < 1.0D) {\r\n for (int y = yHigh - 1; y >= yLow; --y) {\r\n double yScale = ((double) y + 0.5D - blockY) / roomHeight;\r\n\r\n if ((d12 * d12 + d13 * d13) * (double) this.field_75046_d[y] + yScale * yScale / 6.0D < 1.0D) {\r\n if (isTopBlock(chunkData, index, x, y, z, chunkX, chunkZ)) {\r\n flag2 = true;\r\n }\r\n\r\n digBlock(chunkData, index, x, y, z, chunkX, chunkZ, flag2);\r\n }\r\n\r\n --index;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (createFinalRoom) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "public abstract void initiateRandomCells(double probabilityForEachCell);", "public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}", "private void setRandomSeedsToBricks() {\r\n RandomGenerator randomGenerator = new RandomGenerator();\r\n for (int i = 0; i < BRICKS_PER_ROW; i++) {\r\n// for (int j = randomGenerator.nextInt(0, BRICKS_PER_ROW - 1); j > 0; j--) {\r\n int randomCord = randomGenerator.nextInt(0, BRICKS_PER_ROW - 1);\r\n bricks[i][randomCord].setBrickColor(Color.BLACK);\r\n bricks[i][randomCord].setColor(Color.BLACK);\r\n// }\r\n }\r\n }", "private void generateCombination() {\r\n\r\n\t\tfor (byte x = 0; x < field.length; x++) {\r\n\t\t\tfor (byte y = 0; y < field[x].length; y++) {\r\n\t\t\t\tfield[x][y].setValue((byte) newFigure(Constants.getRandom()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "void updateBlock(Block block) ;", "public Bitmap generateBackground()\n {\n Bitmap bg = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n Canvas temp = new Canvas(bg);\n for (int i = 0; i < width/blockWidth; i++)\n {\n for (int j = 0; j < height/blockHeight; j++)\n {\n Random rand = new Random();\n int val = rand.nextInt(5);\n\n if (val == 0)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_1), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n\n }\n else if (val == 1)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_2), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 2)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_3), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 3)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_4), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 4)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_5), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n\n }\n }\n\n return bg;\n\n }", "@Override\n public void reset() {\n Material[] materials = sortBlockValues();\n for(int y = getMinY(); y <= getMaxY(); y++){\n for(int z = getMinZ(); z <= getMaxZ(); z++){\n for(int x = getMinX(); x <= getMaxX(); x++){\n for(Material mat : materials){\n int percent = blockValues.get(mat);\n if(random.nextInt(100) + 1 <= percent){\n final int xf = x;\n final int yf = y;\n final int zf = z;\n Bukkit.getScheduler().scheduleSyncDelayedTask(QuadPrison.getInstance(), ()->\n getWorld().getBlockAt(xf,yf,zf).setType(mat)\n );\n }\n }\n }\n }\n }\n for(Player player : Bukkit.getOnlinePlayers()){\n if(isInsideRegion(player.getLocation())) {\n Location loc = player.getLocation();\n loc.setY(getMaxY() + 1);\n player.teleport(loc);\n player.sendMessage(ChatColor.AQUA + \"The mine reset! You were teleported to the top!\");\n }\n }\n }", "private void generateWorld() {\n\t\t// Loop through all block locations where a block needs to be generated\n\t\tfor(int x=0; x<WORLD_SIZE; x++) {\n\t\t\tfor(int z=0; z<WORLD_SIZE; z++) {\n\t\t\t\tfor(int y=0; y<WORLD_HEIGHT/2; y++) {\n\t\t\t\t\tsetBlockAt(x, y, z, BlockType.STONE);\n\t\t\t\t\tif(y > (WORLD_HEIGHT/2) - 5)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.DIRT);\n\t\t\t\t\tif(y == (WORLD_HEIGHT/2) -1)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.GRASS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Generate NUM_DIAMONDS of diamonds in random locations\n\t\tfor(int i=0; i<NUM_DIAMONDS; i++)\n\t\t\tsetBlockAt(getRandomLocation(), BlockType.DIAMOND);\t\n\t}", "public static BlockExpression block(Iterable<ParameterExpression> variables, Expression[] expressions) { throw Extensions.todo(); }", "public void generateB(){\n\t\t\tfor(int i = 0;i < w.length;i++){\n\t\t\t\tb[i] = w[i].multiply(r).mod(q);\n\t\t\t}\n\t}", "public void b(World paramaqu, Random paramRandom, BlockPosition paramdt, Block parambec)\r\n/* 77: */ {\r\n/* 78: 93 */ BlockPosition localdt1 = paramdt.up();\r\n/* 79: */ label260:\r\n/* 80: 95 */ for (int i = 0; i < 128; i++)\r\n/* 81: */ {\r\n/* 82: 96 */ BlockPosition localdt2 = localdt1;\r\n/* 83: 97 */ for (int j = 0; j < i / 16; j++)\r\n/* 84: */ {\r\n/* 85: 98 */ localdt2 = localdt2.offset(paramRandom.nextInt(3) - 1, (paramRandom.nextInt(3) - 1) * paramRandom.nextInt(3) / 2, paramRandom.nextInt(3) - 1);\r\n/* 86: 99 */ if ((paramaqu.getBlock(localdt2.down()).getType() != BlockList.grass) || (paramaqu.getBlock(localdt2).getType().blocksMovement())) {\r\n/* 87: */ break label260;\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90:104 */ if (paramaqu.getBlock(localdt2).getType().material == Material.air)\r\n/* 91: */ {\r\n/* 92: */ Object localObject;\r\n/* 93:108 */ if (paramRandom.nextInt(8) == 0)\r\n/* 94: */ {\r\n/* 95:109 */ localObject = paramaqu.b(localdt2).a(paramRandom, localdt2);\r\n/* 96:110 */ avy localavy = ((EnumFlowerVariant)localObject).a().a();\r\n/* 97:111 */ Block localbec = localavy.instance().setData(localavy.l(), (Comparable)localObject);\r\n/* 98:112 */ if (localavy.f(paramaqu, localdt2, localbec)) {\r\n/* 99:113 */ paramaqu.setBlock(localdt2, localbec, 3);\r\n/* 100: */ }\r\n/* 101: */ }\r\n/* 102: */ else\r\n/* 103: */ {\r\n/* 104:116 */ localObject = BlockList.tallgrass.instance().setData(bbh.a, bbi.b);\r\n/* 105:117 */ if (BlockList.tallgrass.f(paramaqu, localdt2, (Block)localObject)) {\r\n/* 106:118 */ paramaqu.setBlock(localdt2, (Block)localObject, 3);\r\n/* 107: */ }\r\n/* 108: */ }\r\n/* 109: */ }\r\n/* 110: */ }\r\n/* 111: */ }", "public static int[] getSafeBlockWithinRange(World world, int x, int y, int z, int ranX, int ranY, int ranZ)\n\t{\n\t\tint[] pos = new int[] {x, y, z};\n\n\t\t//find x2,y2,z2 = 0, 1, -1, 2, -2, 3, -3, ...\n\t\t//find block priority: Y > Z > X\n\t\tint xlimit = ranX * 2;\n\t\tint ylimit = ranY * 2;\n\t\tint zlimit = ranZ * 2;\n\t\tint x2 = 0;\n\t\tint y2 = 0;\n\t\tint z2 = 0;\n\t\tint x3, y3, z3;\n\t\tint addx;\n\t\tint addy;\n\t\tint addz;\n\t\t\n\t\tfor (int ix = 0; ix <= xlimit; ix++)\n\t\t{\n\t\t\t//calc sequence number\n\t\t\taddx = (ix & 1) == 0 ? ix * -1 : ix;\n\t\t\tx2 += addx;\n\t\t\t\n\t\t\t//reset z2\n\t\t\tz2 = 0;\n\t\t\t\n\t\t\tfor (int iz = 0; iz <= zlimit; iz++)\n\t\t\t{\n\t\t\t\t//calc sequence number\n\t\t\t\taddz = (iz & 1) == 0 ? iz * -1 : iz;\n\t\t\t\tz2 += addz;\n\t\t\t\t\n\t\t\t\t//reset y2\n\t\t\t\ty2 = 0;\n\t\t\t\t\n\t\t\t\tfor (int iy = 0; iy <= ylimit; iy++)\n\t\t\t\t{\n\t\t\t\t\t//calc sequence number\n\t\t\t\t\taddy = (iy & 1) == 0 ? iy * -1 : iy;\n\t\t\t\t\ty2 += addy;\n\t\t\t\t\t\n\t\t\t\t\t//check block is safe\n\t\t\t\t\tx3 = pos[0] + x2;\n\t\t\t\t\ty3 = pos[1] + y2;\n\t\t\t\t\tz3 = pos[2] + z2;\n\t\t\t\t\t\n\t\t\t\t\tif (checkBlockSafe(world, x3, y3, z3))\n\t\t\t\t\t{\n\t\t\t\t\t\t//check block is safe to stand at\n\t\t\t\t\t\tint decY = 0; //max Y dist below target\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (decY <= MathHelper.abs(y2))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (checkBlockCanStandAt(world.getBlockState(new BlockPos(x3, y3 - decY - 1, z3))))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpos[0] = x3;\n\t\t\t\t\t\t\t\tpos[1] = y3 - decY;\n\t\t\t\t\t\t\t\tpos[2] = z3;\n\t\t\t\t\t\t\t\treturn pos;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdecY++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}//end block is safe\n\t\t\t\t}//end y\n\t\t\t}//end z\n\t\t}//end x\n\t\t\n\t\tLogHelper.info(\"DEBUG : find block fail\");\n\t\treturn null;\n\t}", "protected boolean func_225557_a_(IWorldGenerationReader worldgen, Random rand, BlockPos position, Set<BlockPos> changedBlocks, Set<BlockPos> changedBlocks2, MutableBoundingBox bbox, BaseTreeFeatureConfig conf) {\n/* 114 */ if (!(worldgen instanceof IWorld))\n/* 115 */ return false; \n/* 116 */ IWorld world = (IWorld)worldgen;\n/* 117 */ int height = rand.nextInt(5) + 4;\n/* 118 */ boolean spawnTree = true;\n/* 119 */ if (position.func_177956_o() >= 1 && position.func_177956_o() + height + 1 <= world.func_217301_I()) {\n/* 120 */ for (int j = position.func_177956_o(); j <= position.func_177956_o() + 1 + height; j++) {\n/* 121 */ int k = 1;\n/* 122 */ if (j == position.func_177956_o())\n/* 123 */ k = 0; \n/* 124 */ if (j >= position.func_177956_o() + height - 1)\n/* 125 */ k = 2; \n/* 126 */ for (int px = position.func_177958_n() - k; px <= position.func_177958_n() + k && spawnTree; px++) {\n/* 127 */ for (int pz = position.func_177952_p() - k; pz <= position.func_177952_p() + k && spawnTree; pz++) {\n/* 128 */ if (j >= 0 && j < world.func_217301_I()) {\n/* 129 */ if (!isReplaceable(world, new BlockPos(px, j, pz))) {\n/* 130 */ spawnTree = false;\n/* */ }\n/* */ } else {\n/* 133 */ spawnTree = false;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* 138 */ if (!spawnTree) {\n/* 139 */ return false;\n/* */ }\n/* 141 */ Block ground = world.func_180495_p(position.func_177982_a(0, -1, 0)).func_177230_c();\n/* 142 */ Block ground2 = world.func_180495_p(position.func_177982_a(0, -2, 0)).func_177230_c();\n/* 143 */ if ((ground != Blocks.field_196658_i.func_176223_P().func_177230_c() && ground != Blocks.field_150346_d.func_176223_P().func_177230_c()) || (ground2 != Blocks.field_196658_i\n/* 144 */ .func_176223_P().func_177230_c() && ground2 != Blocks.field_150346_d.func_176223_P().func_177230_c()))\n/* 145 */ return false; \n/* 146 */ BlockState state = world.func_180495_p(position.func_177977_b());\n/* 147 */ if (position.func_177956_o() < world.func_217301_I() - height - 1) {\n/* 148 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, position.func_177977_b(), Blocks.field_150346_d.func_176223_P(), bbox); int genh;\n/* 149 */ for (genh = position.func_177956_o() - 3 + height; genh <= position.func_177956_o() + height; genh++) {\n/* 150 */ int i4 = genh - position.func_177956_o() + height;\n/* 151 */ int j1 = (int)(1.0D - i4 * 0.5D);\n/* 152 */ for (int k1 = position.func_177958_n() - j1; k1 <= position.func_177958_n() + j1; k1++) {\n/* 153 */ for (int i2 = position.func_177952_p() - j1; i2 <= position.func_177952_p() + j1; i2++) {\n/* 154 */ int j2 = i2 - position.func_177952_p();\n/* 155 */ if (Math.abs(position.func_177958_n()) != j1 || Math.abs(j2) != j1 || (rand.nextInt(2) != 0 && i4 != 0)) {\n/* 156 */ BlockPos blockpos = new BlockPos(k1, genh, i2);\n/* 157 */ state = world.func_180495_p(blockpos);\n/* 158 */ if (state.func_177230_c().isAir(state, (IBlockReader)world, blockpos) || state.func_185904_a().func_76230_c() || state\n/* 159 */ .func_203425_a(BlockTags.field_206952_E) || state.func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c() || state\n/* 160 */ .func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c()) {\n/* 161 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, blockpos, Blocks.field_150350_a.func_176223_P(), bbox);\n/* */ }\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* 167 */ for (genh = 0; genh < height; genh++) {\n/* 168 */ BlockPos genhPos = position.func_177981_b(genh);\n/* 169 */ state = world.func_180495_p(genhPos);\n/* 170 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, genhPos, Blocks.field_196619_M.func_176223_P(), bbox);\n/* 171 */ if (state.func_177230_c().isAir(state, (IBlockReader)world, genhPos) || state.func_185904_a().func_76230_c() || state.func_203425_a(BlockTags.field_206952_E) || state\n/* 172 */ .func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c() || state\n/* 173 */ .func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c());\n/* */ } \n/* */ \n/* 176 */ if (rand.nextInt(4) == 0 && height > 5) {\n/* 177 */ for (int hlevel = 0; hlevel < 2; hlevel++) {\n/* 178 */ for (Direction Direction : Direction.Plane.HORIZONTAL) {\n/* 179 */ if (rand.nextInt(4 - hlevel) == 0) {\n/* 180 */ Direction dir = Direction.func_176734_d();\n/* 181 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, position.func_177982_a(dir.func_82601_c(), height - 5 + hlevel, dir.func_82599_e()), Blocks.field_150350_a\n/* 182 */ .func_176223_P(), bbox);\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* 187 */ return true;\n/* */ } \n/* 189 */ return false;\n/* */ } \n/* */ \n/* */ \n/* 193 */ return false;\n/* */ }", "public Block accessBlock(int i){\n\t\treturn blocks[i]; \n\t}", "BlockFor createBlockFor();", "static void readBlock(Scanner s) throws Exception {\n for (int i = 0; i < 16; i++) {\n int n = s.nextInt();\n for (int j = 0; j < 8; j++) {\n block[8 * i + j] = (n >> (7 - j)) & 1;\n }\n }\n }", "public void createBlock(int iOffset, int jOffset, int[][] mat1, int[][] mat2, int[][] mat3){\n int jstart = jOffset;\n xmin[0] = 999;\n xmin[1] = 999;\n xmin[2] = 999;\n // row 1\n p.get(0).setI(iOffset); //col 1\n p.get(0).setJ(jOffset);\n p.get(0).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n jOffset++;\n p.get(1).setI(iOffset); //col 2\n p.get(1).setJ(jOffset);\n p.get(1).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n jOffset++;\n p.get(2).setI(iOffset); // col 3\n p.get(2).setJ(jOffset);\n p.get(2).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n \n // row 2\n jOffset = jstart;\n iOffset++;\n p.get(3).setI(iOffset);\n p.get(3).setJ(jOffset);\n p.get(3).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n jOffset++;\n p.get(4).setI(iOffset);\n p.get(4).setJ(jOffset);\n p.get(4).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n jOffset++;\n p.get(5).setI(iOffset);\n p.get(5).setJ(jOffset);\n p.get(5).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n \n //row 3\n jOffset = jstart;\n iOffset++;\n p.get(6).setI(iOffset);\n p.get(6).setJ(jOffset);\n p.get(6).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n jOffset++;\n p.get(7).setI(iOffset);\n p.get(7).setJ(jOffset);\n p.get(7).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n jOffset++;\n p.get(8).setI(iOffset);\n p.get(8).setJ(jOffset);\n p.get(8).setScore(mat1[iOffset][jOffset], mat2[iOffset][jOffset], mat3[iOffset][jOffset]);\n if (mat1[iOffset][jOffset]<xmin[0]){\n xmin[0] = mat1[iOffset][jOffset];\n }\n if (mat2[iOffset][jOffset]<xmin[1]){\n xmin[1] = mat2[iOffset][jOffset];\n }\n if (mat3[iOffset][jOffset]<xmin[2]){\n xmin[2] = mat3[iOffset][jOffset];\n }\n }", "public static boolean block(int p_block_0_, int p_block_1_, MatchBlock[] p_block_2_) {\n/* 33 */ if (p_block_2_ == null)\n/* */ {\n/* 35 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 39 */ for (int i = 0; i < p_block_2_.length; i++) {\n/* */ \n/* 41 */ MatchBlock matchblock = p_block_2_[i];\n/* */ \n/* 43 */ if (matchblock.matches(p_block_0_, p_block_1_))\n/* */ {\n/* 45 */ return true;\n/* */ }\n/* */ } \n/* */ \n/* 49 */ return false;\n/* */ }", "private static void __exercise36(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = i + StdRandom.uniform(N - i);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public static void fill(int[] array,int start,int ende){\n\tfor (int c=0; c<array.length; c++){\r\n\t\tRandom rand = new Random(); \r\n\t\tarray[c] = rand.nextInt(ende+1-start) + start;\r\n\t}\r\n\tSystem.out.print(\"\\n\");\r\n}" ]
[ "0.65989596", "0.65286803", "0.64947975", "0.6220274", "0.6013739", "0.59155726", "0.5734597", "0.57282686", "0.57085556", "0.57001895", "0.5623777", "0.5599505", "0.55214065", "0.55122423", "0.5492616", "0.5457973", "0.54505587", "0.543044", "0.54276824", "0.54254776", "0.5365919", "0.53551877", "0.52934605", "0.5293282", "0.52870387", "0.52758574", "0.52645826", "0.5264566", "0.5257737", "0.5238775", "0.5229016", "0.52284694", "0.5225863", "0.52241737", "0.5221827", "0.5219026", "0.5213306", "0.5210164", "0.5209336", "0.52062154", "0.52057064", "0.5195741", "0.51891834", "0.5184935", "0.51820457", "0.5179346", "0.517219", "0.5168192", "0.51487935", "0.51475406", "0.5141358", "0.51292783", "0.51158595", "0.51029015", "0.5097484", "0.50876915", "0.5071795", "0.50692993", "0.5063828", "0.506041", "0.5058405", "0.50450414", "0.5044321", "0.5027432", "0.5026279", "0.5015052", "0.5012952", "0.5008317", "0.5007301", "0.500307", "0.50001085", "0.49962696", "0.4989294", "0.49875614", "0.4967488", "0.49653092", "0.49629083", "0.49599338", "0.49585095", "0.49554688", "0.49406746", "0.49356228", "0.4935257", "0.49341163", "0.49331382", "0.4932891", "0.4930778", "0.49294862", "0.49288827", "0.49271286", "0.49253374", "0.49223664", "0.49222553", "0.49156007", "0.4913895", "0.491206", "0.4907231", "0.49064338", "0.48973447", "0.48971692" ]
0.58477056
6
scegliere groupId e label per ogni server
@Override public boolean prepareOp() { Iterator<Server> iter = this.serverList.iterator(); Server current = null; /* * the first replicaNumber servers received the label 0. * then the label of other servers is calculated by sql.getNewLabel() */ int groupId = 0; long label = Constants.maxLabel; int j = 0; PadFsLogger.log(LogLevel.DEBUG, "NUMBER OF SERVERS in the list : "+this.serverList.size()); while(iter.hasNext()){ // initialize label and groupId of servers if(!(j < Constants.replicaNumber)){ j = 0; groupId = j; label = label/2; } else{ groupId = j; } current = iter.next(); current.setGroupId(groupId); current.setLabel(label); current.setStatus(ServerStatus.READY); PadFsLogger.log(LogLevel.DEBUG,"idServer: "+Long.toUnsignedString(current.getId())+ " label: "+Long.toUnsignedString(label) + " groupId: "+groupId); if( !SqlManager.updateServerLabelGroupId(current.getId(), label, groupId) ){ PadFsLogger.log(LogLevel.DEBUG,"Error during update server label "); return false; } j++; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GroupId groupId();", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "String getGroupId();", "String getGroupId();", "public String getGroupId()\n {\n return groupId;\n }", "void setGroupId(String groupId);", "public String groupId() {\n return this.groupId;\n }", "public String getSpaceLabel(String id) {\n OrganizationService orgService = (OrganizationService) ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(OrganizationService.class);\n try {\n Group group = orgService.getGroupHandler().findGroupById(id);\n if (group == null) {\n return id;\n }\n String label = group.getLabel();\n String groupLabel = (label != null && label.trim().length() > 0) ? label : group.getGroupName();\n return groupLabel;\n } catch (Exception e) {\n return id;\n }\n }", "public void setGroupId( String groupId ) {\n this.groupId = groupId;\n }", "public void setGroupId(String newValue);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public String getGroupName();", "UUID getGroupId();", "public String getGroupId() {\n\t\treturn groupId;\n\t}", "public void setGroupId(Integer groupId) {\r\n this.groupId = groupId;\r\n }", "ZigBeeGroup getGroup(int groupId);", "public void setGroupId(int groupId) {\n this.groupId = groupId;\n }", "public void setGroupId(int groupId) {\n this.groupId = groupId;\n }", "public String getGroupname()\n {\n return group2d;\n }", "public int getGroupId() {\n return groupId;\n }", "public int getGroupId() {\n return groupId;\n }", "public String getGroupName(){\r\n return Validator.unescapeJava(this.groupName);\r\n }", "public void setGroupId(Integer groupId) {\n this.groupId = groupId;\n }", "public void setGroupId(Integer groupId) {\n this.groupId = groupId;\n }", "public long getGroupId() {\n return groupId;\n }", "public Integer getGroupId() {\r\n return groupId;\r\n }", "public void setGroupId(long groupId) {\n this.groupId = groupId;\n }", "public String getGroup();", "public String getGroupId() {\n return groupId != null ? groupId : topic;\n }", "public String getGroupId(String name);", "public String getGroupId() {\n\t\treturn this.groupId;\n\t}", "public Integer getGroupId() {\n return groupId;\n }", "public Integer getGroupId() {\n return groupId;\n }", "public String getGroup ()\n {\n return group;\n }", "public String getGroup ()\n {\n return group;\n }", "public interface GroupDescription {\n /**\n * Types of the group supported by ONOS.\n */\n enum Type {\n /**\n * Load-balancing among different buckets in a group.\n */\n SELECT,\n /**\n * Single Bucket Group.\n */\n INDIRECT,\n /**\n * Multicast to all buckets in a group.\n */\n ALL,\n /**\n * Similar to {@link Type#ALL} but used for cloning of packets\n * independently of the egress decision (singleton treatment or other\n * group).\n */\n CLONE,\n /**\n * Uses the first live bucket in a group.\n */\n FAILOVER\n }\n\n /**\n * Returns type of a group object.\n *\n * @return GroupType group type\n */\n Type type();\n\n /**\n * Returns device identifier on which this group object is created.\n *\n * @return DeviceId device identifier\n */\n DeviceId deviceId();\n\n /**\n * Returns application identifier that has created this group object.\n *\n * @return ApplicationId application identifier\n */\n ApplicationId appId();\n\n /**\n * Returns application cookie associated with a group object.\n *\n * @return GroupKey application cookie\n */\n GroupKey appCookie();\n\n /**\n * Returns groupId passed in by caller.\n *\n * @return Integer group id passed in by caller. May be null if caller\n * passed in null to let groupService determine the group id.\n */\n Integer givenGroupId();\n\n /**\n * Returns group buckets of a group.\n *\n * @return GroupBuckets immutable list of group bucket\n */\n GroupBuckets buckets();\n}", "public long getGroup()\r\n { return group; }", "public String getGroupName() {\n return groupName;\n }", "public Long getGroupId() {\n return groupId;\n }", "public void setGroupId(String groupId) {\n\t\tthis.groupId = groupId == null ? null : groupId.trim();\n\t}", "public static String specifyGroup() {\n return holder.format(\"specifyGroup\");\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "@Override\n\tpublic long getGroupId() {\n\t\treturn _scienceApp.getGroupId();\n\t}", "String getParentGroupId();", "public String getGroup() {\n return groupName;\n }", "Integer getGroupId();", "protected String getGroupNameLabel(){\n\t\treturn Messages.common_measure;\n\t}", "@DISPID(10)\r\n\t// = 0xa. The runtime will prefer the VTID if present\r\n\t@VTID(16)\r\n\tjava.lang.String groupName();", "public void setGroupId(Long groupId) {\n this.groupId = groupId;\n }", "@Override\n\tpublic void setGroupId(long groupId);", "@Override\n\tpublic void setGroupId(long groupId);", "public int getIdGroup() {\n return idGroup;\n }", "@Override\n public long getGroupId() {\n return _partido.getGroupId();\n }", "@Override\n public void setGroupId(long groupId) {\n _partido.setGroupId(groupId);\n }", "public String getGroupName()\n {\n return groupName;\n }", "java.lang.String getGroup();", "public Long getGroupId() {\n\t\treturn groupId;\n\t}", "GroupOpt getGroup();", "public String getGroupName() {\n return groupName;\n }", "public Group(int gid, String ntitle){\n\t\tid = gid;\n\t\tthis.title = ntitle;\n\t\taddToContext();\n\t}", "public String getGroup() {\n return group;\n }", "public String getGroup() {\n return group;\n }", "public abstract String getDefaultGroup();", "private static String extractGroupName(FloodyGroup floodyGroup) {\n return isBlank(floodyGroup.name())\n ? (\"FloodyGroup-\"\n +\n // append random long number to ensure unique group name\n new Random().nextLong())\n : floodyGroup.name();\n }", "protected String getGroupId() {\n return getActorPath().name();\n }", "public void setGroupId(Long groupId) {\n\t\tthis.groupId = groupId;\n\t}", "public java.lang.String getGroupname() {\n\treturn groupname;\n}", "@Override\n\tpublic long getGroupId(int arg0) {\n\t\treturn arg0;\n\t}", "Group getGroupById(String id);", "public String getGroupName() {\r\n return groupName;\r\n }", "public void groupSelected (String iocId, String groupId);", "@Test\n public void groupIdTest() {\n // TODO: test groupId\n }", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "Object getGroupID(String groupName) throws Exception;", "private void createGrpLabel() {\n\n\t\tgrpLabel = new Group(grpPharmacyDetails, SWT.NONE);\n\t\tgrpLabel.setText(\"Preview of Label\");\n\t\tgrpLabel.setBounds(new Rectangle(390, 40, 310, 230));\n\t\tgrpLabel.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\n\t\tcanvasLabel = new Canvas(grpLabel, SWT.NONE);\n\t\tcanvasLabel.setBounds(new org.eclipse.swt.graphics.Rectangle(12, 18,\n\t\t\t\t285, 200));\n\t\tcanvasLabel.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tcreateCanvasBorders();\n\n\t\tlblCanvasPharmName = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasPharmName.setText(\"Facility Name\");\n\t\tlblCanvasPharmName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasPharmName.setBackground(ResourceUtils\n\t\t\t\t.getColor(iDartColor.WHITE));\n\t\tlblCanvasPharmName.setBounds(5, 6, 273, 20);\n\t\tlblCanvasPharmName\n\t\t.setFont(ResourceUtils.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasPharmName.setAlignment(SWT.CENTER);\n\n\t\tlblCanvasPharmacist = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasPharmacist.setText(\"Pharmacist\");\n\t\tlblCanvasPharmacist\n\t\t.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasPharmacist.setBackground(ResourceUtils\n\t\t\t\t.getColor(iDartColor.WHITE));\n\t\tlblCanvasPharmacist.setBounds(5, 27, 273, 20);\n\t\tlblCanvasPharmacist.setFont(ResourceUtils\n\t\t\t\t.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasPharmacist.setAlignment(SWT.CENTER);\n\n\t\tlblCanvasAddress = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasAddress.setText(\"Physical Address\");\n\t\tlblCanvasAddress.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasAddress\n\t\t.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tlblCanvasAddress.setBounds(5, 49, 273, 20);\n\t\tlblCanvasAddress.setFont(ResourceUtils.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasAddress.setAlignment(SWT.CENTER);\n\n\t}", "public String getSGroupID() {\n return sGroupID;\n }", "public String group() { return group; }", "@Override\n\tpublic long getGroupId() {\n\t\treturn model.getGroupId();\n\t}", "@Override\n\tpublic long getGroupId() {\n\t\treturn model.getGroupId();\n\t}", "@Override\n\tpublic long getGroupId() {\n\t\treturn model.getGroupId();\n\t}", "@Override\n\tpublic void setGroupId(long groupId) {\n\t\tmodel.setGroupId(groupId);\n\t}", "@Override\n\tpublic void setGroupId(long groupId) {\n\t\tmodel.setGroupId(groupId);\n\t}", "@Override\n\tpublic void setGroupId(long groupId) {\n\t\tmodel.setGroupId(groupId);\n\t}", "@Override\n\tpublic long getGroupId();", "@Override\n\tpublic long getGroupId();", "public String getGroupName() {\n return groupName;\n }", "public String getGroupName() {\n return groupName;\n }", "public static void main(String[] args)\n\t{\n\t\tGroupSynchronization groupSynchronization = new GroupSynchronization();\n\t\tGroup group\t\t\t= new Group();\n\t\t\n//\t\tGroupInfo subNodeGroupInfo\t= new GroupInfo();\n//\t\tsubNodeGroupInfo.setGroupName(\"组一\");\n//\t\tsubNodeGroupInfo.setGroupFullname(\"集团公司.省公司.市公司一.公司一部门二.组一\");\n//\t\tsubNodeGroupInfo.setGroupParentid(\"000000000600007\");\n//\t\tsubNodeGroupInfo.setGroupType(\"0\");\n//\t\tsubNodeGroupInfo.setGroupOrderBy(\"1\");\n//\t\tsubNodeGroupInfo.setGroupPhone(\"1111111\");\n//\t\tsubNodeGroupInfo.setGroupFax(\"1111111\");\n//\t\tsubNodeGroupInfo.setGroupStatus(\"0\");\n//\t\tsubNodeGroupInfo.setGroupCompanyid(\"000000000600004\");\n//\t\tsubNodeGroupInfo.setGroupCompanytype(\"3\");\n//\t\tsubNodeGroupInfo.setGroupDesc(\"1\");\n//\t\tsubNodeGroupInfo.setGroupIntId(600009);\n//\t\tsubNodeGroupInfo.setGroupDnId(\"0;000000000600002;000000000600003;000000000600004;000000000600007;000000000600009;\");\n//\t\t\n//\t\tgroupSynchronization.modifySynchronization(\"000000000600009\",subNodeGroupInfo);\n//\t\tgroup.modifyGroup(subNodeGroupInfo,\"000000000600009\");\n\t\t\n\t\tGroupInfo subNodeGroupInfo\t= new GroupInfo();\n\t\tsubNodeGroupInfo.setGroupName(\"公司一部门二\");\n\t\tsubNodeGroupInfo.setGroupFullname(\"集团公司.省公司.省公司部门一.公司一部门二\");\n\t\tsubNodeGroupInfo.setGroupParentid(\"000000000600008\");\n\t\tsubNodeGroupInfo.setGroupType(\"3\");\n\t\tsubNodeGroupInfo.setGroupOrderBy(\"1\");\n\t\tsubNodeGroupInfo.setGroupPhone(\"1111111\");\n\t\tsubNodeGroupInfo.setGroupFax(\"1111111\");\n\t\tsubNodeGroupInfo.setGroupStatus(\"0\");\n\t\tsubNodeGroupInfo.setGroupCompanyid(\"000000000600003\");\n\t\tsubNodeGroupInfo.setGroupCompanytype(\"1\");\n\t\tsubNodeGroupInfo.setGroupDesc(\"1\");\n\t\tsubNodeGroupInfo.setGroupIntId(600007);\n\t\tsubNodeGroupInfo.setGroupDnId(\"0;000000000600002;000000000600003;000000000600008;000000000600007;\");\n\t\t\n\t\tgroupSynchronization.modifySynchronization(\"000000000600007\",subNodeGroupInfo);\n\t\tgroup.modifyGroup(subNodeGroupInfo,\"000000000600007\");\n\t}", "private static String formatGroup(GroupCard gc) {\n\t\tString res = \"\";\n\n\t\tGroupHeadGuest ghg = gc.getCapoGruppo();\n\t\tres += GroupHeadGuest.CODICE;\n\t\tres += DateUtils.format(gc.getDate());\n\t\tres += String.format(\"%02d\", gc.getPermanenza());\n\t\tres += padRight(ghg.getSurname().trim().toUpperCase(),50);\n\t\tres += padRight(ghg.getName().trim().toUpperCase(),30);\n\t\tres += ghg.getSex().equals(\"M\") ? 1 : 2;\n\t\tres += DateUtils.format(ghg.getBirthDate());\n\n\t\t//Setting luogo et other balles is a bit more 'na rottura\n\t\tres += formatPlaceOfBirth(ghg.getPlaceOfBirth());\n\n\t\tPlace cita = ghg.getCittadinanza(); //banana, box\n\t\tres += cita.getId();\n\n\t\tres += ghg.getDocumento().getDocType().getCode();\n\t\tres += padRight(ghg.getDocumento().getCodice(),20);\n\t\tres += ghg.getDocumento().getLuogoRilascio().getId();\n\t\t//Assert.assertEquals(168,res.length()); //if string lenght is 168 we are ok\n\t\tres += \"\\r\\n\";\n\n\t\tfor (GroupMemberGuest gmg : gc.getAltri()){\n\t\t\tres += formatGroupMember(gmg, gc.getDate(), gc.getPermanenza());\n\t\t\t//res += \"\\r\\n\";\n\t\t}\n\t\treturn res;\n\t}", "String resourceGroupName();" ]
[ "0.6725151", "0.67038715", "0.67038715", "0.6680424", "0.6680424", "0.6615642", "0.66090184", "0.64952785", "0.64470714", "0.6413281", "0.63901216", "0.637899", "0.637899", "0.637899", "0.637899", "0.637899", "0.637899", "0.62697023", "0.62510145", "0.62320673", "0.6228014", "0.6195935", "0.61899394", "0.61899394", "0.61795765", "0.6157358", "0.6157358", "0.6156967", "0.6106496", "0.6106496", "0.61002606", "0.6084982", "0.60845697", "0.607253", "0.60692465", "0.6066235", "0.5983488", "0.5974952", "0.5974952", "0.5965105", "0.5965105", "0.59627926", "0.5959858", "0.59574336", "0.5941927", "0.59391534", "0.5928574", "0.5925975", "0.5925975", "0.5925975", "0.5925975", "0.5925975", "0.5925975", "0.592266", "0.59216154", "0.5909874", "0.59089106", "0.58921427", "0.5874316", "0.58664924", "0.58548397", "0.58548397", "0.58536214", "0.58522445", "0.5850116", "0.58247036", "0.58119285", "0.58110714", "0.5804099", "0.57989216", "0.5797885", "0.5791725", "0.5791725", "0.57902825", "0.57824767", "0.5772691", "0.57640857", "0.57574964", "0.5749501", "0.5745883", "0.5737636", "0.5715245", "0.5714151", "0.5708911", "0.5706432", "0.5705533", "0.57029593", "0.56755453", "0.56741434", "0.56741434", "0.56741434", "0.56603307", "0.56603307", "0.56603307", "0.56590027", "0.56590027", "0.56502944", "0.56502944", "0.5647807", "0.5645964", "0.56411684" ]
0.0
-1
/ noone call this, noone need reply
@Override public void replyOperationCompleted() { ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void __getReply() throws IOException\n {\n __getReply(true); // tagged response\n }", "public void __getReplyNoReport() {\n __getReply(false);\n }", "public void request() {\n }", "void faild_response();", "protected void nop() throws Exception {\n reply_ok();\n }", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "void sendMessage(String pid,String cmd,MintReply mr,int flags)\n{\n sendMessage(pid,cmd,null,mr,flags);\n}", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\tpublic void sendResponse() {\n\t\t\n\t}", "public void send() {\n\t}", "@Override\n\tpublic int resp(Runnable thread_base, String strMsg) {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic Response invoke() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void sendResponse() {\n\n\t}", "@Override\n\tpublic void appendWithNoReply(String arg0, Object arg1)\n\t\t\tthrows InterruptedException, MemcachedException {\n\n\t}", "private void sendReceiveRes(){\n\t}", "public void insertReply() {\n\r\n\t}", "@Override\n\tpublic void prependWithNoReply(String arg0, Object arg1)\n\t\t\tthrows InterruptedException, MemcachedException {\n\n\t}", "public void sendToOutpatients(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n public void receivedReply(final RequestTargetReply reply) {\n }", "protected abstract void askResponse();", "@Override\n public Answer executeRequest(Command cmd) {\n return null;\n }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "void send();", "@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\tStaticString.information = null;// 判断回复信息之间清空之前信息\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\tSocketConnet.getInstance().communication(888,new String[]{mLogsIndexNumber});\r\n\t\t\t\tif (ReplyParser.waitReply()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic String sendMsg1() {\n\t\treturn null;\n\t}", "private void offer() {\n\t\t\t\n\t\t}", "boolean hasReply();", "void reply(Server server);", "@Override\n\tpublic String createMsg_request() {\n\t\treturn null;\n\t}", "public void messageResp(int respId) {\n\r\n\t}", "@Override\n\tpublic void msgBreakReply(boolean reply) {\n\t\t\n\t}", "public void sendRRequests() {\n\n }", "void sendMessage() {\n\n\t}", "protected void reply_no() throws java.io.IOException {\n byte[] no = PushCacheProtocol.instance().noPacket();\n _socket.getOutputStream().write(no, 0, no.length);\n }", "private void viewPendingRequests() {\n\n\t}", "@Override\n\tpublic void receiveRequest() {\n\n\t}", "@Override\r\n\tprotected void processRespond() throws SGSException {\n\r\n\t}", "public synchronized void crit_reply(String filename)\n {\n out.println(\"REPLY\");\n out.println(my_c_id);\n out.println(filename);\n }", "protected boolean processPersonalTell(String username, String titles, String message){return false;}", "private void prepareReply(ACLMessage msg) {\n\t\treply = msg.createReply();\n\t\treply.setPerformative(ACLMessage.REQUEST);\n\t\treply.setSender(getAID());\n\t}", "@Override\n\tpublic void call() {\n\t\t\n\t}", "public void deleteReply() {\n\r\n\t}", "@Override\n\tvoid receiveCall() {\n\n\t}", "void messageSent();", "public void talk() {\n\n\t}", "@Override\n\tpublic void msgGotHungry() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }", "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public boolean isRequest() {\n return false;\r\n }", "public String receiveResponse()\n\t{\n\t\t\n\t}", "@Override\n public void onResponse(String response) {\n System.out.print(\"respuesta Server\"+response);\n responseRequest(sync_id);\n /*if (sync_id != 0) {\n responseRequest(sync_id);\n } else {\n background_response = \"ID Sync null\";\n restartRequest(background_response);\n }*/\n }", "public void __noop() {\n __send(__buildMessage(FTPCommand.getCommand(32), null));\n __getReplyNoReport();\n }", "@Override\n\tpublic String answer() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void addWithNoReply(String arg0, int arg1, Object arg2)\n\t\t\tthrows InterruptedException, MemcachedException {\n\n\t}", "@Override\n\tpublic String back_request() {\n\t\treturn null;\n\t}", "protected Answer(){\r\n\t\t\r\n\t}", "protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }", "@Override\n\tpublic void setWithNoReply(String arg0, int arg1, Object arg2)\n\t\t\tthrows InterruptedException, MemcachedException {\n\n\t}", "public void sendReply(String cmd, String reply) {\n if (cmd.equals(\"ACTION_REPLY\")){\n long now = System.currentTimeMillis();\n long processTime = now - startTime;\n out.println(cmd + \"<<\"+processTime+\":\"+ reply);\n }else{\n //out.println(cmd + \"<<null\" + reply);\n out.println(cmd + \"<<\" + reply); //changed per drew's suggestion\n }\n \n }", "@Override\n\tpublic void onRuning(TAResponse response) {\n\n\t}", "@Override\n\tpublic void completed(Void arg0, Void arg1) {\n\t\tif(this.count < max){\n\t\t\tthis.count += 1;\n\t\t\tString msg = \"[\"+client.name+\"] hello this my \"+count+\"rd mssage-\"+System.currentTimeMillis();\n\t\t\tclient.writeProtocolMessage(msg,this);\n\t\t}\n\t}", "public void startResponse()\n\t\t\t{\n\t\t\t\tsend(\"<response>\", false);\n\t\t\t}", "public boolean SendingMessage() {\n \t\t\treturn false;\n \t\t}", "@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "public void msg1()\r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic String ping() {\n\t\treturn null;\n\t}", "public CarReply() {\n super();\n this.nrCars = 0;\n this.carwashID = \"\";\n }", "private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Constants.REQSEND);\r\n\t\t//等待接收的返回状态\r\n\t\treturn sender.getMsg();\r\n\t}", "@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}", "boolean authQop() {\n/* 114 */ return this.serverQop;\n/* */ }", "protected abstract boolean sendNextRequests();", "private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "void responseSent( C conn ) ;", "@Override\n\tpublic String viewmessage_request() {\n\t\treturn null;\n\t}", "@Override\n protected void prot() {\n }", "public void beforeSendingeGainChatRequest();", "public void tellJoke(){\n new EndpointAsyncTask().execute(this);\n }", "public void sendRemainData();", "public abstract void message();", "@Override\n public void action() {\n ACLMessage acl = receive();\n if (acl != null) {\n if (acl.getPerformative() == ACLMessage.REQUEST) {\n try {\n ContentElement elemento = myAgent.getContentManager().extractContent(acl);\n if (elemento instanceof PublicarServicio) {\n PublicarServicio publicar = (PublicarServicio) elemento;\n Servicio servicio = publicar.getServicio();\n jadeContainer.iniciarChat(servicio.getTipo(), servicio.getDescripcion());\n //myAgent.addBehaviour(new IniciarChatBehaviour(myAgent, servicio.getTipo(), servicio.getDescripcion()));\n } else if (elemento instanceof EnviarMensaje) {\n EnviarMensaje enviar = (EnviarMensaje) elemento;\n Mensaje mensaje = enviar.getMensaje();\n jadeContainer.enviarMensajeChatJXTA(mensaje.getRemitente(), mensaje.getMensaje());\n }\n } catch (CodecException ex) {\n System.out.println(\"CodecException: \" + ex.getMessage());\n } catch (UngroundedException ex) {\n System.out.println(\"UngroundedException: \" + ex.getMessage());\n } catch (OntologyException ex) {\n System.out.println(\"OntologyException: \" + ex.getMessage());\n }\n }\n } else {\n block();\n }\n }", "protected boolean processSayTell(String username, String titles, int gameNumber, String message){return false;}", "private void clearAddFriendFromSelfRsp() {\n if (rspCase_ == 13) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "R request();", "boolean isSending();", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "private void reply( OutputStream outputStream, MethodTable mt) throws IOException {\n\t\tObjectOutputStream oos = new ObjectOutputStream(outputStream);\t\t\n\t if(mt.getID() == -1) {\n\t \toos.writeObject(msg3() + \"Hi, \"+ mt.getThreadName() + \", Server already recevies and run your method that is \" + mt.getMethodName());\t\n\t }\n\t else {\n\t \toos.writeObject(msg3() + \"Hi, \"+ mt.getThreadName() + mt.getID() + \", Server already recevies and run your method that is \" + mt.getMethodName());\n\t }\n\t\toos.flush();\n\t}", "public void receiveResultmain(\n ) {\n }", "@Override\n\tprotected void doAsyncExecute(VoiceMessage requestMessage) {\n\n\t}", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "protected Responder() {}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 102;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 101;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "@Override\n\tpublic void msgAtCook() {\n\t\t\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "public String concludeRequest() {\n\t\treturn \"Already received a request\";\n\t}", "void responseSequenceNumber() {\r\n\t\t\r\n\t}" ]
[ "0.6768514", "0.6576177", "0.65707517", "0.64967155", "0.64850235", "0.64270437", "0.64270437", "0.6421846", "0.6409165", "0.63110733", "0.6237063", "0.6212111", "0.6189324", "0.61734587", "0.6167997", "0.61336595", "0.61219406", "0.61161697", "0.61135334", "0.610895", "0.60935706", "0.60863936", "0.6084691", "0.6061365", "0.60463685", "0.6046238", "0.60412014", "0.60411525", "0.6027588", "0.60210115", "0.602006", "0.6017046", "0.60079163", "0.6007547", "0.60069823", "0.59499353", "0.594748", "0.59264064", "0.59232324", "0.59188706", "0.5915838", "0.5905978", "0.58987594", "0.5898325", "0.58978933", "0.5894172", "0.5893512", "0.5884603", "0.5880815", "0.58598715", "0.58563644", "0.5851376", "0.58445364", "0.5826523", "0.58154994", "0.5814808", "0.5808444", "0.58047587", "0.58045495", "0.5796546", "0.5794075", "0.57923925", "0.5789572", "0.5785292", "0.57822865", "0.57753456", "0.57557136", "0.57551277", "0.57509315", "0.57439256", "0.5743922", "0.5741011", "0.57354283", "0.57322985", "0.57124895", "0.57074714", "0.5704831", "0.57023245", "0.5701559", "0.5699724", "0.56991875", "0.5699121", "0.5697516", "0.5696816", "0.56963605", "0.56918997", "0.56857723", "0.56842387", "0.5682183", "0.56813854", "0.56777203", "0.56721944", "0.56714886", "0.5665775", "0.5664451", "0.5663897", "0.56585175", "0.56537235", "0.56518924", "0.5650603" ]
0.5842979
53
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.user_list); lv = (ListView) findViewById(R.id.lvUserList); SharedPreferences sp = getSharedPreferences( Properties.CABSHARE_SHARED_PREFERENCES, MODE_MULTI_PROCESS); String s = sp.getString("User_Array", null); //Log.d("ShowUsers", s); Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show(); userID = new ArrayList<String>(); userID.add("USERS:"); try { int temp = 0; if (s != null) { JSONArray json = new JSONArray(s); while (temp < json.length()) { JSONObject js = json.getJSONObject(temp++); userID.add(js.getString("user_id")); } userID.add("Priyesh"); } else { userID.add("NO user"); } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, userID); lv.setAdapter(adapter); lv.setOnItemClickListener(this); }
{ "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 void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent i = new Intent("com.example.cabshare.PROFILE"); i.putExtra("position", position); startActivity(i); }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void 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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Get the scroll pane from the popup list
public void run() { JScrollPane scrollPane = (JScrollPane) SwingUtilities.getAncestorOfClass(JScrollPane.class, popup.getList()); //Get the width of the popup list int popupWidth = popup.getList().getPreferredSize().width; int widest = getWidestJComboBox(comboBox); //Set the scrollpane to that size Dimension scrollPaneSize = scrollPane.getPreferredSize(); scrollPaneSize.width = Math.max(popupWidth, widest); scrollPane.setPreferredSize(scrollPaneSize); scrollPane.setMaximumSize(scrollPaneSize); //Change the location or the preferred size doesn't update try { Point location = comboBox.getLocationOnScreen(); int height = comboBox.getPreferredSize().height; popup.setLocation(location.x, location.y + height - 1); popup.setLocation(location.x, location.y + height); } catch (IllegalComponentStateException exc) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ScrollPane scrollPane() {\r\n return (ScrollPane) this.getParent();\r\n }", "public ListPopupWindow getListPopupWindow() {\n if (this.p == null) {\n this.p = new ListPopupWindow(getContext());\n this.p.setAdapter(this.a);\n this.p.setAnchorView(this);\n this.p.setModal(true);\n this.p.setOnItemClickListener(this.i);\n this.p.setOnDismissListener(this.i);\n }\n return this.p;\n }", "public JScrollPane getCurrent() {\n return scrollPane;\n }", "public ScrollPaneUI getUI() {\n/* 368 */ return (ScrollPaneUI)this.ui;\n/* */ }", "public OverScroller getScroller() {\n return mEventHandler.getScroller();\n }", "private Point getPopupLocation()\n {\n Dimension popupSize = comboBox.getSize();\n Insets insets = getInsets();\n \n // reduce the width of the scrollpane by the insets so that the popup\n // is the same width as the combo box.\n popupSize.setSize(popupSize.width - (insets.right + insets.left), getPopupHeightForRowCount(comboBox.getMaximumRowCount()));\n Rectangle popupBounds = computePopupBounds(0, comboBox.getBounds().height, popupSize.width, popupSize.height);\n Dimension scrollSize = popupBounds.getSize();\n Point popupLocation = popupBounds.getLocation();\n \n scroller.setMaximumSize(scrollSize);\n scroller.setPreferredSize(scrollSize);\n scroller.setMinimumSize(scrollSize);\n \n list.revalidate();\n \n return popupLocation;\n }", "private JPanel getPanelForList(){\n String listName = ((JComboBox)header.getComponent(1)).getSelectedItem().toString();\n for(Component c:window.getComponents()){\n if(c.getName().equals(listName)){\n return (JPanel)c;\n }\n }\n return null;\n }", "private JScrollPane getDetailScrollPane() {\n if (detailScrollPane == null) {\n detailScrollPane = new JScrollPane();\n detailScrollPane.setViewportView(getDetailPane());\n }\n return detailScrollPane;\n }", "private JScrollPane getMacro_pane() {\n\t\tif (macro_pane == null) {\n\t\t\tmacro_pane = new JScrollPane();\n\t\t\tmacro_pane.setViewportView(getJList());\n\t\t}\n\t\treturn macro_pane;\n\t}", "private JScrollPane getJScrollPane() {\r\n\t\tif (jScrollPane == null) {\r\n\t\t\tjScrollPane = new JScrollPane();\r\n\t\t\tjScrollPane.setPreferredSize(new Dimension(259, 60));\r\n\t\t\tjScrollPane.setViewportView(getPayloads());\r\n\t\t}\r\n\t\treturn jScrollPane;\r\n\t}", "public ListPopupWindow getListPopupWindow() {\n if (this.aeM == null) {\n this.aeM = new ListPopupWindow(getContext());\n this.aeM.setAdapter(this.aeA);\n this.aeM.amx = this;\n this.aeM.setModal(true);\n this.aeM.amz = this.aeB;\n this.aeM.setOnDismissListener(this.aeB);\n }\n return this.aeM;\n }", "private JPanel getJPanel() {\n\t\tif (list_panel == null) {\n\t\t\tlist_panel = new JPanel();\n\t\t\tlist_panel.setLayout(new BorderLayout());\n\t\t\tlist_panel.add(getMacro_pane(), java.awt.BorderLayout.CENTER);\n\t\t}\n\t\treturn list_panel;\n\t}", "private JPanel getListPanel() {\n if (listPanel == null) {\n listPanel = new JPanel();\n listPanel.setLayout(new BorderLayout());\n listPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Entries\",\n javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,\n javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));\n listPanel.add(getScrollPane(), java.awt.BorderLayout.CENTER);\n listPanel.add(getViewPanel(), java.awt.BorderLayout.SOUTH);\n }\n\n return listPanel;\n }", "private JScrollPane getAnalyzaScroll() {\n\t\tif (analyzaScroll == null) {\n\t\t\tanalyzaScroll = new JScrollPane(analyzaList);\n\t\t\tanalyzaScroll.setBounds(new Rectangle(125, 115, 297, 159));\n\t\t}\n\t\treturn analyzaScroll;\n\t}", "protected JPanel getPanel() {\n\t\treturn (JPanel) window.getContentPane();\n\t}", "Window getParent();", "@JSProperty(\"pane\")\n double getPane();", "private org.gwtproject.user.client.ui.ScrollPanel get_f_ScrollPanel1() {\n return build_f_ScrollPanel1();\n }", "C getGlassPane();", "private JScrollPane getJScrollPane() {\r\n if (jScrollPane == null) {\r\n jScrollPane = new JScrollPane();\r\n jScrollPane.setViewportView(getJListAnimals());\r\n }\r\n return jScrollPane;\r\n }", "private JScrollBar getJScrollBar() {\r\n\t\tif (jScrollBar == null) {\r\n\t\t\tjScrollBar = new JScrollBar();\r\n\t\t\tjScrollBar.setBounds(new Rectangle(591, 127, 17, 333));\r\n\t\t}\r\n\t\treturn jScrollBar;\r\n\t}", "public JScrollPane getJScrollPane() { return jScrollPane; }", "public JScrollPane getScrollPane() {\n // Create the nodes.\n PopupTree tree = treeComponent.createLiveRearrangerTree();\n\n /** only expand node where cursor is located. Inspect all rows; deepest node that covers\n * cursor location is the best to expand. (Parent node like a class contains a method where\n * the cursor is; we want to expand the method, not just the class.\n */\n int expandRow = -1;\n for (int i = 0; i < tree.getRowCount(); i++) {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getPathForRow(i).getLastPathComponent();\n if (node.getUserObject() instanceof RangeEntry) {\n RangeEntry re = (RangeEntry)node.getUserObject();\n if (re.getStart().getTextRange().getStartOffset() <= cursorOffset &&\n re.getEnd().getTextRange().getEndOffset() >= cursorOffset)\n {\n LOG.debug(\n \"node \" +\n i +\n \" contained cursor (offset=\" +\n cursorOffset +\n \"): \" + re\n );\n expandRow = i;\n }\n }\n else {\n LOG.debug(\"expand node candidate not RangeEntry; node=\" + node);\n }\n }\n if (expandRow >= 0) {\n LOG.debug(\"expand row \" + expandRow);\n tree.expandRow(expandRow);\n }\n JScrollPane treeView = new JScrollPane(tree);\n treeView.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n treeView.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n Dimension d = treeView.getPreferredSize();\n if (d.width < 400) d.width = 400;\n if (d.height < 300) d.height = 300;\n treeView.setPreferredSize(d);\n tdt = new TreeDropTarget(tree, this);\n tds = new TreeDragSource(tree, DnDConstants.ACTION_MOVE, tdt);\n return treeView;\n }", "public ListPanel getListPanel() {\n\t\treturn listPanel;\n\t}", "public JPanel getCurrentPanel(){\n JPanel card = null;\n for (Component comp : contentPane.getComponents()) {\n if (comp.isVisible() == true) {\n return card;\n }\n }\n return null;\n }", "private javax.swing.JScrollPane getJScrollPane() {\n\t\tif(jScrollPane == null) {\n\t\t\tjScrollPane = new javax.swing.JScrollPane();\n\t\t\tjScrollPane.setViewportView(getJTablePlayList());\n\t\t\tjScrollPane.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.SoftBevelBorder.LOWERED));\n\t\t\tjScrollPane.setPreferredSize(new java.awt.Dimension(275,35));\n\t\t}\n\t\treturn jScrollPane;\n\t}", "ViewGroup activatePopupContainer();", "public PopupWindow getPopup() {\r\n\t\treturn popup;\r\n\t}", "private JPanel createScrollPaneDemonstrations() {\n\n JPanel panelScroll = new JPanel(new GridLayout());\n panelScroll.setBorder(BorderFactory.createTitledBorder(PADDING_BORDER,\n \"Select the desired demonstrations:\", TitledBorder.LEFT, TitledBorder.TOP));\n modelDemonstration = new ModelTableDemonstrationsList(demonstrationsList);\n demonstrationsListJTable = new JTable(modelDemonstration);\n demonstrationsListJTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n demonstrationsListJTable.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseClicked(MouseEvent e) {\n //demonstrationApplicationController.newDemonstrationApplication(((Demonstration)modelDemonstration.getValueAt(demonstrationsListJTable.getSelectedRow(), demonstrationsListJTable.getSelectedColumn())));\n }\n });\n\n JScrollPane scrollPane = new JScrollPane(demonstrationsListJTable);\n scrollPane.setBorder(PADDING_BORDER);\n\n panelScroll.setMinimumSize(scrollPane.getMinimumSize());\n panelScroll.add(scrollPane);\n\n return panelScroll;\n }", "public JScrollPane getScrollbar(){\n\t\treturn scrollbar;//Return the scroll bar\n\t}", "public JPopupMenu getPopup()\n {\n return popup;\n }", "private JScrollPane getJScrollPane( )\n {\n if( jScrollPane == null )\n {\n jScrollPane = new JScrollPane( );\n jScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );\n jScrollPane.setViewportView( getTreeMenu( ) );\n }\n return jScrollPane;\n }", "protected JPanel getTopPanel() {\n List topComps = new ArrayList();\n getTopComponents(topComps);\n if (topComps.size() == 0) {\n return null;\n }\n JPanel topPanel = GuiUtils.left(GuiUtils.doLayout(topComps, 0, GuiUtils.WT_N, GuiUtils.WT_N));\n topPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n \n return McVGuiUtils.makeLabeledComponent(\"Options:\", topPanel);\n }", "public Component getPopupComponent() {\r\n return _component;\r\n }", "private JScrollPane getJScrollPane() {\r\n\t\tif (jScrollPane == null) {\r\n\t\t\tjScrollPane = new JScrollPane();\r\n\t\t\tjScrollPane.setBounds(new Rectangle(7, 18, 638, 65));\r\n\t\t\tjScrollPane.setViewportView(getJTextFieldData());\r\n\t\t}\r\n\t\treturn jScrollPane;\r\n\t}", "private JScrollPane getJScrollPane1() {\r\n\t\tif (jScrollPane1 == null) {\r\n\t\t\tjScrollPane1 = new JScrollPane();\r\n\t\t\tjScrollPane1.setPreferredSize(new Dimension(259, 60));\r\n\t\t\tjScrollPane1.setViewportView(getControlledBy());\r\n\t\t}\r\n\t\treturn jScrollPane1;\r\n\t}", "private JScrollPane getPGrupos() {\r\n listaGrupos = new DefaultListModel();\r\n lGrupos = new JList(listaGrupos);\r\n lGrupos.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n lGrupos.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\r\n public void valueChanged(javax.swing.event.ListSelectionEvent e) {\r\n if (lGrupos.getSelectedIndex()!=-1) {\r\n cargarGrupo();\r\n lInfo.setText(\"\");\r\n\r\n }\r\n }\r\n });\r\n if (pGrupos == null) {\r\n pGrupos = new JScrollPane(lGrupos); \r\n pGrupos.setBounds(new Rectangle(260, 40, 100, 120));\r\n cargarListaGrupos();\r\n }\r\n return pGrupos;\r\n }", "private JTextPane getDetailPane() {\n if (detailPane == null) {\n detailPane = new JTextPane();\n detailPane.setFont(new Font(\"Monospaced\", Font.PLAIN, 14));\n }\n return detailPane;\n }", "public final ResizeDDContainer getWindow() {\r\n\t\t\treturn (ResizeDDContainer) getSource();\r\n\t\t}", "public final ResizeDDContainer getWindow() {\r\n\t\t\treturn (ResizeDDContainer) getSource();\r\n\t\t}", "public Pane<T> currentPane() {\n return currentPane(System.currentTimeMillis());\n }", "private TestUnitPanel getSelectedPanel(){\n\t\t\n\t\tTestUnitPanel selectedPanel = (TestUnitPanel)tabbedPane.getComponentAt(tabbedPane.getSelectedIndex());\n\t\tConsoleLog.Print(\"[TestMonitor] returned Unit: \" + getUnitKey());\n\t\treturn selectedPanel;\n\t}", "public int getPanelIndex(){\n\t\treturn tabbedPane.getSelectedIndex();\n\t}", "public Window getWindow() {\n\t\treturn selectionList.getScene().getWindow();\n\t}", "private javax.swing.JPanel getJContentPane() {\n if (jContentPane == null) {\n jContentPane = new javax.swing.JPanel();\n jContentPane.setLayout(new java.awt.BorderLayout());\n jContentPane.add(getPButtons(), java.awt.BorderLayout.SOUTH);\n jContentPane.add(getSpPrefixList(), java.awt.BorderLayout.CENTER);\n }\n return jContentPane;\n }", "private JScrollPane getScrollCategories() {\n\t\tif (scrollCategories == null) {\n\t\t\tscrollCategories = new JScrollPane();\n\t\t\tscrollCategories.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));\n\t\t\tscrollCategories.setViewportView(getListCategories());\n\t\t}\n\t\treturn scrollCategories;\n\t}", "public View e() {\n this.i = this.h.findViewById(c.e.popup_window_view);\n return this.i;\n }", "public Pane getPane() {\n\t\treturn pane;\n\t}", "public int getVerticalScrollBarPolicy() {\n/* 473 */ return this.verticalScrollBarPolicy;\n/* */ }", "private JScrollPane getConsoleScroll() {\r\n\t\tif (consoleScroll == null) {\r\n\t\t\tconsoleScroll = new JScrollPane();\r\n\t\t\tconsoleScroll.setViewportView(getConsole());\r\n\t\t}\r\n\t\treturn consoleScroll;\r\n\t}", "private JScrollPane getScrollPane() {\n\t\tif (scrollPane == null) {\n\t\t\tscrollPane = new JScrollPane();\n\t\t\tscrollPane.setViewportView(getTable());\n\t\t}\n\t\treturn scrollPane;\n\t}", "private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t\tjContentPane.add(getTlbNavigate(), BorderLayout.NORTH);\r\n\t\t\tjContentPane.add(getPnlCenter(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "public JScrollPane getScrollDireccion(){\n\t\tif(scrollDireccion == null){\n\t\t\tscrollDireccion = new JScrollPane();\n\t\t\tscrollDireccion.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\n\t\t\tscrollDireccion.setViewportView(getDireccion());\n\t\t}\n\t\treturn scrollDireccion;\n\t}", "public int getScrollPosition(){\n\t\treturn mFirstItemPosition;\n\t}", "public AccessibleRole getAccessibleRole() {\n/* 1492 */ return AccessibleRole.SCROLL_PANE;\n/* */ }", "private JScrollPane getJScrollPane() {\n\t\tif (jScrollPane == null) {\n\t\t\tjScrollPane = new JScrollPane();\n\t\t\tjScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\t\t}\n\t\treturn jScrollPane;\n\t}", "public Scroller getScroller() { return _scroller; }", "private JScrollPane getJScrollPane() {\n\t\tif (jScrollPane == null) {\n\t\t\tjScrollPane = new JScrollPane();\n\t\t\tjScrollPane.setBounds(new Rectangle(8, 20, 445, 225));\n\t\t\tjScrollPane.setViewportView(getJtableOutput());\n\t\t}\n\t\treturn jScrollPane;\n\t}", "private JPanel createScrollPaneKeyWords() {\n\n JPanel panelScroll = new JPanel(new GridLayout());\n panelScroll.setBorder(BorderFactory.createTitledBorder(PADDING_BORDER,\n \"Keywords List \", TitledBorder.LEFT, TitledBorder.TOP));\n\n this.keywordList = demonstrationApplicationController.getKeywordsList();\n this.jListKeyword = new JList(new ModelListSelectable(keywordList));\n\n JScrollPane scrollPane = new JScrollPane(jListKeyword);\n scrollPane.setBorder(PADDING_BORDER);\n\n panelScroll.add(scrollPane);\n\n return panelScroll;\n }", "public JTextPane getDialog() {\n\t\treturn dialog;\n\t}", "private JScrollPane getJScrollPane()\n {\n if( jScrollPane == null )\n {\n jScrollPane = new JScrollPane();\n jScrollPane.setViewportView( getM_areaRecieved() ); // Generated\n }\n return jScrollPane;\n }", "private JScrollPane getScrollPaneDataOrganizer(){\n if (this.scrollPaneDataOrganizer == null){\n scrollPaneDataOrganizer = new JScrollPane(getDataTable());\n scrollPaneDataOrganizer.setBounds(0, panelMenuData.getHeight(), panelDataset.getWidth(), panelDataset.getHeight());\n }\n return this.scrollPaneDataOrganizer ;\n }", "public PDAnnotationPopup getPopup() {\n/* 157 */ COSDictionary popup = (COSDictionary)getCOSObject().getDictionaryObject(\"Popup\");\n/* 158 */ if (popup != null)\n/* */ {\n/* 160 */ return new PDAnnotationPopup(popup);\n/* */ }\n/* */ \n/* */ \n/* 164 */ return null;\n/* */ }", "public WindowContent getViewContent() {\r\n return this.windowContent;\r\n }", "private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tjContentPane = new JPanel();\n\t\t\tjContentPane.setLayout(new BorderLayout());\n\t\t\tjContentPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(\n\t\t\t\t\t5, 5, 5, 5));\n\t\t\tjContentPane.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n\t\t\tjContentPane.add(getScrollPane(), java.awt.BorderLayout.CENTER);\n\t\t}\n\t\treturn jContentPane;\n\t}", "private JScrollPane getJScrollPane() {\n\t\tif (jScrollPane == null) {\n\t\t\tjScrollPane = new JScrollPane();\n\t\t\tjScrollPane.setViewportView(getJTable());\n\t\t}\n\t\treturn jScrollPane;\n\t}", "private javax.swing.JScrollPane getJScrollPane() {\n\t\tif(jScrollPane == null) {\n\t\t\tjScrollPane = new javax.swing.JScrollPane();\n\t\t\tjScrollPane.setViewportView(getJTableTitular());\n\t\t\tjScrollPane.setPreferredSize(new java.awt.Dimension(647,242));\n\t\t\tjScrollPane.setBackground(new java.awt.Color(242,242,237));\n\t\t}\n\t\treturn jScrollPane;\n\t}", "public static AnchorPane getContentBox(){\n return MainUIController.contentBox;\n }", "private JPanel getJPanel() {\n\tif (certInfoPane == null) {\n\t certInfoPane = new TemplateButtonPanel();\n\t certInfoPane.setPreferredSize(new Dimension(500, 300));\n\t certInfoPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));\n\t \n\t // use SwingUtilities.invokeLater() to update the gui because\n\t // these may be originating from a different worker thread\n\t selection.addListSelectionListener(new ListSelectionListener() {\n\t\t public void valueChanged(ListSelectionEvent ev) {\n\t\t\tif (ev.getValueIsAdjusting()) return;\n\t\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t public void run() {\n\t\t\t\tupdateSelection();\n\t\t\t }\n\t\t\t});\t\t\t\n\t\t }\n\t });\n\t store.addListDataListener(new ListDataListener() {\n\t\tpublic void intervalAdded(ListDataEvent e) { }\n\t\tpublic void intervalRemoved(ListDataEvent e) { }\n\t\tpublic void contentsChanged(ListDataEvent e) {\n\t\t SwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t updateSelection(); // for buttons\n\t\t\t certInfoPane.refresh();\n\t\t\t}\n\t\t });\t\t\t\n\t\t}\n\t });\n\t}\n\treturn certInfoPane;\n }", "private javax.swing.JPanel getPaneContent() {\r\n\t\tif (paneContent == null) {\r\n\t\t\t\r\n\t\t\tpaneContent = new javax.swing.JPanel();\r\n\t\t\tpaneContent.setLayout(new BoxLayout(getPaneContent(), BoxLayout.Y_AXIS));\r\n\t\t\tpaneContent.setEnabled(true);\r\n\t\t\tpaneContent.setPreferredSize(new java.awt.Dimension(800,600));\r\n\t\t\tpaneContent.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.PLAIN, 12));\r\n\t\t\tpaneContent.add(getPaneDisplay(), null);\r\n\t\t\tpaneContent.add(getTxtStatus(), null);\r\n\t\t}\r\n\t\treturn paneContent;\r\n\t}", "public Pane getPane() {\n return this.meldingPane;\n }", "private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tGridBagConstraints gridBagScrollPane = new GridBagConstraints();\n\t\t\tgridBagScrollPane.fill = GridBagConstraints.BOTH;\n\t\t\tgridBagScrollPane.gridy = 0;\n\t\t\tgridBagScrollPane.weightx = 1.0;\n\t\t\tgridBagScrollPane.weighty = 1.0;\n\t\t\tgridBagScrollPane.gridwidth = 2;\n\t\t\tgridBagScrollPane.gridx = 0;\n\t\t\tGridBagConstraints gridBagButtonOk = new GridBagConstraints();\n\t\t\tgridBagButtonOk.gridx = 1;\n\t\t\tgridBagButtonOk.anchor = GridBagConstraints.EAST;\n\t\t\tgridBagButtonOk.insets = new Insets(5, 0, 5, 5);\n\t\t\tgridBagButtonOk.gridy = 1;\n\t\t\tGridBagConstraints gridBagButtonCancel = new GridBagConstraints();\n\t\t\tgridBagButtonCancel.gridx = 0;\n\t\t\tgridBagButtonCancel.insets = new Insets(5, 5, 5, 0);\n\t\t\tgridBagButtonCancel.gridy = 1;\n\t\t\tjContentPane = new JPanel();\n\t\t\tjContentPane.setLayout(new GridBagLayout());\n\t\t\tjContentPane.add(getJButtonCancel(), gridBagButtonCancel);\n\t\t\tjContentPane.add(getJButtonOk(), gridBagButtonOk);\n\t\t\tjContentPane.add(getJScrollPane(), gridBagScrollPane);\n\t\t}\n\t\treturn jContentPane;\n\t}", "public AnchorPane getChatPane() {\n return this.chatPane;\n }", "public Rectangle getScrollRectangle() {\r\n return scrollRectangle;\r\n }", "JScrollBar getScrollBar() {\n return scrollBar;\n }", "private JScrollPane getJScrollPaneListaCamaras() {\r\n\t\tif (jScrollPaneListaCamaras == null) \r\n\t\t\tjScrollPaneListaCamaras = new JScrollPane();\r\n\t\t\t\t\r\n\t\tjScrollPaneListaCamaras.setViewportView(getJListCamaras());\r\n\t\t\t\t\r\n\t\treturn jScrollPaneListaCamaras;\r\n\t}", "private JScrollPane getJScrollPane() {\n if (jScrollPane == null) {\n jScrollPane = new JScrollPane();\n jScrollPane.setViewportView(getGridmapTable());\n }\n return jScrollPane;\n }", "public Boolean getContainerScroll () {\r\n\t\treturn (Boolean) getStateHelper().eval(PropertyKeys.containerScroll);\r\n\t}", "private JScrollPane getJScrollPaneVar() {\r\n\t\tif (jScrollPaneVar == null) {\r\n\t\t\tjScrollPaneVar = new JScrollPane();\r\n\t\t\tjScrollPaneVar.setBounds(new Rectangle(7, 18, 638, 50));\r\n\t\t\tjScrollPaneVar.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);\r\n\t\t\tjScrollPaneVar.setViewportView(getJTableVar());\r\n\t\t}\r\n\t\treturn jScrollPaneVar;\r\n\t}", "private JScrollPane getResultScrollPane() {\r\n\t\tif (resultScrollPane == null) {\r\n\t\t\tresultScrollPane = new JScrollPane();\r\n\t\t\tresultScrollPane.setPreferredSize(new Dimension(3, 60));\r\n\t\t\tresultScrollPane.setViewportView(getResultTextPane());\r\n\t\t}\r\n\t\treturn resultScrollPane;\r\n\t}", "public Region getObject() {\n\t\treturn myScrollPane;\n\t}", "private JScrollPane setInnerScrollPane() {\n JScrollPane jsp = new JScrollPane();\n jsp.setViewportView(setOrderList());\n return jsp;\n }", "private JPanel createScrollPaneProducts() {\n\n JPanel panelScroll = new JPanel(new GridLayout());\n panelScroll.setBorder(BorderFactory.createTitledBorder(PADDING_BORDER,\n \"Products List: \", TitledBorder.LEFT, TitledBorder.TOP));\n\n this.productsList = this.demonstrationApplicationController.getProductsList();\n this.jListProduct = new JList(new ModelListSelectable(this.productsList));\n JScrollPane scrollPane = new JScrollPane(jListProduct);\n scrollPane.setBorder(PADDING_BORDER);\n\n panelScroll.add(scrollPane);\n\n return panelScroll;\n }", "public Pane getPane(String id) throws IndexOutOfBoundsException\n {\n for (Pane pane : paneArrayList)\n {\n if (pane.idProperty().get().equals(id))\n {\n return pane;\n }\n }\n throw new IndexOutOfBoundsException(\"Ugyldigt input - sæde udenfor grænserne\");\n }", "public int getHorizontalScrollBarPolicy() {\n/* 522 */ return this.horizontalScrollBarPolicy;\n/* */ }", "private javax.swing.JScrollPane getJScrollPane() {\n\t\tif(jScrollPane == null) {\n\t\t\tjScrollPane = new javax.swing.JScrollPane();\n\t\t\tjScrollPane.setViewportView(getJTextPane());\n\t\t\tjScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\t\t}\n\t\treturn jScrollPane;\n\t}", "private JScrollPane getSpPrefixList() {\n if (spPrefixList == null) {\n spPrefixList = new JScrollPane();\n spPrefixList.setViewportView(getLbPrefixList());\n spPrefixList.setPreferredSize(new java.awt.Dimension(400, 150));\n spPrefixList.setFocusable(false);\n }\n return spPrefixList;\n }", "public Window getParentWindow()\n {\n return LibSwingUtil.getWindowAncestor(parentDialog);\n }", "public void getPopup() {\n\t\t\tglobal.btnClick(popup);\n\t\t}", "B scrollToSelectedItem(boolean scrollToSelectedItem);", "public SelectionPanel(){\n\t\tthis.setHbarPolicy(ScrollBarPolicy.ALWAYS);\n\t\tthis.setVbarPolicy(ScrollBarPolicy.NEVER);\n\t\tsetButton();\n\t\tthis.setContent(container);\n\t\tthis.setPrefHeight(65);\n\t\tthis.setPrefWidth(700);\n\t\tcontainer.setVisible(false);\n\t}", "int getScrollTop();", "private JScrollPane getJScrollPane2() {\r\n\t\tif (jScrollPane2 == null) {\r\n\t\t\tjScrollPane2 = new JScrollPane();\r\n\t\t\tjScrollPane2.setViewportView(getImagePane());\r\n\t\t}\r\n\t\treturn jScrollPane2;\r\n\t}", "private JScrollPane getJPanel_table_member() {\n\t\tif (jScrollPane_table_member == null) {\n\t\t\tjScrollPane_table_member = new JScrollPane();\n\t\t\tjScrollPane_table_member.setName(\"jScrollPane_table_member\");\n\t\t\tjScrollPane_table_member.setViewportView(getJTable_member());\n\t\t\tjScrollPane_table_member.setFont(new Font(\"Dialog\", Font.PLAIN, 14));\n\t\t}\n\t\treturn jScrollPane_table_member;\n\t}", "@FXML\n private void handleMainListPanelScrollDown() {\n mainTaskListPanel.scrollToNext();\n }", "@Override\n public void popupShown(PopupPanelManager.PopupEvent event) {\n if (popupButtonPanel.getSelectedButton() != null) {\n Rectangle selectionButtonBounds = popupButtonPanel.getSelectedButton()\n .getBounds();\n popupButtonPanel.scrollRectToVisible(selectionButtonBounds);\n }\n }", "private Component getPreviewPane() {\n\t\tImageIcon img = new ImageIcon(image.getScaledInstance(100, 140, Image.SCALE_DEFAULT));\n\t\tJLabel preview = new JLabel(img);\n\t\t\n\t\treturn preview;\n\t}", "public int getScrollOffset() {\n return visibility.getValue();\n }", "public abstract View getMainDialogContainer();", "private FindDialog getFindDialog() {\r\n if (findDialog == null) {\r\n findDialog = new FindDialog(textViewer);\r\n findDialog.centerRelativeTo(this);\r\n getViewProperties().addProperties(\"find\",findDialog.getPreferences(),true);\r\n\r\n // Hide the find dialog when this pane becomes invisible\r\n addHierarchyListener(new HierarchyListener() {\r\n public void hierarchyChanged(HierarchyEvent e) {\r\n if (findDialog.isVisible() && !isShowing()) {\r\n findDialog.setVisible(false);\r\n }\r\n }\r\n });\r\n }\r\n return findDialog;\r\n }" ]
[ "0.68676054", "0.6374207", "0.63137543", "0.6267722", "0.61136234", "0.60365397", "0.6010708", "0.59835654", "0.5965726", "0.5864607", "0.58496165", "0.5775531", "0.5755447", "0.5745801", "0.5740523", "0.57346237", "0.572305", "0.5714028", "0.57096046", "0.5705413", "0.5691057", "0.5685793", "0.5667386", "0.5655859", "0.5601241", "0.55942494", "0.55862135", "0.5577309", "0.5570198", "0.5555753", "0.55504626", "0.5548235", "0.5540507", "0.5538493", "0.5518756", "0.55154806", "0.5515445", "0.5504249", "0.55009776", "0.55009776", "0.54972667", "0.54909813", "0.54837143", "0.5481892", "0.5457297", "0.5449491", "0.54457927", "0.54315645", "0.54267704", "0.5402008", "0.5397954", "0.538539", "0.53843486", "0.53583515", "0.5354359", "0.5349018", "0.53394103", "0.5311186", "0.5293177", "0.5292698", "0.52911437", "0.52833605", "0.52650076", "0.5264162", "0.5258166", "0.5256257", "0.5230418", "0.5223825", "0.52229744", "0.5207643", "0.52011776", "0.5200551", "0.51924396", "0.51917857", "0.51859635", "0.5178897", "0.5178738", "0.5160911", "0.5157771", "0.51568", "0.5152635", "0.51508546", "0.5134713", "0.5131501", "0.51236504", "0.51233333", "0.5111135", "0.5107178", "0.5105915", "0.50975513", "0.5084033", "0.5074691", "0.5073467", "0.50733495", "0.5058035", "0.5051906", "0.50474983", "0.50444305", "0.50438094", "0.5041362" ]
0.56470406
24
makes frame, starts graphics
public static void main(String[] args) { RunGameOfLife frame = new RunGameOfLife(); frame.setSize(600,600); frame.setVisible(true); reset.doClick(); generateValues(-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildFrame();", "private static void draw() {\n\t\tinitField();\n\t\tview = new View(field);\n\t\tview.setSize(viewWidth, viewHeight);\n\t\tframe = new JFrame();\n\t\tframe.setSize(fwidth, fheight);\n\t\tframe.setTitle(\"Land Mine\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.add(view);\n\t\tframe.setVisible(true);\n\t}", "private void drawGui() {\n\n this.frame = new JFrame(\"Find and Seek Game\");\n this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.frame.setLayout(new BorderLayout());\n frame.addKeyListener(keyListener);\n initializeFrame();\n this.frame.setVisible(true);\n\n }", "public void start() {\r\n setupCenter();\r\n setupEast();\r\n\r\n myFrame.setTitle(\"TCSS 305 Tetris\");\r\n myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n myFrame.setLocationByPlatform(true);\r\n myFrame.pack();\r\n myFrame.setMinimumSize(MINIMUM_SIZE);\r\n myFrame.setSize(DEFAULT_SIZE);\r\n myFrame.setVisible(true);\r\n\r\n myTimer.start();\r\n startMusic();\r\n }", "private void init(){\n\t\tadd(new DrawSurface());\n\t\tsetTitle(\"Animation Exercise\");\n\t\tsetSize(640, 480);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "Frame createFrame();", "public void start() {\n initGUI();\n initDemo();\n\n float target = 1000 / 60.0f;\n float frameAverage = target;\n long lastFrame = System.currentTimeMillis();\n float yield = 10000f;\n float damping = 0.1f;\n\n while (running) {\n // adaptive timing loop from Master Onyx\n long timeNow = System.currentTimeMillis();\n frameAverage = (frameAverage * 10 + (timeNow - lastFrame)) / 11;\n lastFrame = timeNow;\n\n yield += yield * ((target / frameAverage) - 1) * damping + 0.05f;\n\n for (int i = 0; i < yield; i++) {\n Thread.yield();\n }\n\n update();\n\n // render\n Graphics2D g = (Graphics2D) strategy.getDrawGraphics();\n g.setColor(background);\n g.fillRect(0, 0, 500, 500);\n\n draw(g);\n renderGUI(g);\n g.dispose();\n strategy.show();\n }\n }", "private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }", "public launchFrame() {\n \n initComponents();\n \n }", "FRAME createFRAME();", "public void start() {\n\t\tthis.setSize(500, 500);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "public void launch() {\r\n\t\tthis.setLocation(200, 200);\r\n\t\tthis.setSize(COLS * BLOCK_SIZE, ROWS * BLOCK_SIZE);\r\n\t\tthis.addKeyListener(new KeyMonitor());\r\n\t\tthis.addWindowListener(new WindowAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.setVisible(true);\r\n\t\t\r\n\t\tnew Thread(PaintThread).start();\r\n\t\t\r\n\t}", "private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }", "public void setup() {\n\t\t//This throws an exception and causes us to reenter once \"frame\" exists\n\t\tsize(VIEW_WIDTH,VIEW_HEIGHT,P2D);\n\t\ttxt = createFont(\"Vera.ttf\",90,true);\n\t\tframeRate(60);\n\t\tif (!frame.isResizable()){\n\t\t\tframe.setResizable(true);\n\t\t}\n\t}", "public void begin() {\n\t\tg.setColor(bgColor);\n\t\tg.fillRect(0, 0, width, height);\n\t\tg.setColor(Color.black);\n\t}", "public void launch() {\n m_frame.pack();\n m_frame.setVisible(true);\n }", "public FrameJogo() {\n initComponents();\n createBufferStrategy(2);\n Thread t = new Thread(this);\n t.start();\n }", "public void createAndShowGUI(){\r\n\t\t//You want the jframe to close everything when it is closed\r\n\t\tjframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tif(maximized){\r\n\t\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\tsWidth = (int)screenSize.getWidth();\r\n\t\t\tsHeight = (int)screenSize.getHeight();\r\n\t\t\tjframe.setSize(sWidth, sHeight);\r\n\t\t\tjframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\t\tjframe.setUndecorated(true);\r\n\t\t\tjframe.setResizable(true);\r\n\t\t\tjframe.setVisible(true);\r\n\t\t\tcWidth = sWidth;\r\n\t\t\tcHeight = sHeight;\r\n\t\t}else{\r\n\t\t\tjframe.setResizable(false);\r\n\t\t\t//Makes the jframe visible\r\n\t\t\tjframe.setVisible(true);\r\n\t\t\t//Sets the size of the jframe\r\n\t\t\tjframe.setSize(sWidth, sHeight);\r\n\t\t\t\r\n\t\t\t//I have no fucking idea why it needs this but it does\r\n\t\t\ttry{\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Set the content width\r\n\t\t\tcWidth = jframe.getContentPane().getWidth();\r\n\t\t\t//Set the content height\r\n\t\t\tcHeight = jframe.getContentPane().getHeight();\r\n\t\t}\r\n\r\n\t\t//Set up the game menu\r\n\t\tGameMenu gmenu = new GameMenu((Graphics2D)(jframe.getContentPane().getGraphics()),cWidth,cHeight, new Input(jframe));\r\n\t\t//Draw the main menu\r\n\t\tgmenu.drawMainMenu();\r\n\t}", "public void start() {\n try {\n //getting the capabilities object of GL2 profile\n final GLProfile profile = GLProfile.get(GLProfile.GL2);\n GLCapabilities capabilities = new GLCapabilities(profile);\n\n // The canvas\n final GLCanvas glcanvas = new GLCanvas(capabilities);\n Renderer s = new Renderer();\n glcanvas.addGLEventListener(s);\n glcanvas.addMouseListener(s);\n glcanvas.addMouseMotionListener(s);\n glcanvas.addKeyListener(s);\n glcanvas.setSize(1024, 780);\n //creating frame\n final Frame frame = new Frame (\" Budik\");\n final JButton btHelp = new JButton(\"?\");\n final Help help;\n help = new Help();\n JToolBar tlacitka = new JToolBar(\"Help\");\n tlacitka.add(btHelp);\n frame.add(tlacitka, BorderLayout.NORTH);\n btHelp.setMnemonic(KeyEvent.VK_F1);\n btHelp.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JDialog dialog = new JDialog(frame);\n JTextArea textArea = new JTextArea(help.getText());\n textArea.setBackground(help.getBackround());\n textArea.setEditable(false);\n dialog.add(textArea);\n dialog.setTitle(help.getTitle());\n dialog.setSize(new Dimension(800, 600));\n dialog.setLocationRelativeTo(frame);\n dialog.setModal(true);\n dialog.setVisible(true);\n }\n });\n\n\n\n frame.add(glcanvas);\n frame.setSize( 1024, 780 );\n frame.setVisible(true);\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n super.windowClosing(e);\n System.exit(0);\n }\n });\n\n final FPSAnimator animator = new FPSAnimator(glcanvas,30,true);\n animator.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "public void run() {\n\t\t\t\tLayoutFrame frame = new LayoutFrame();\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}", "public void launchFrame() {\n\t\tf.getContentPane().add(sbrText);\n\t\tf.getContentPane().add(btnQuit);\n\n\t\t// Close when the close button is clicked\n\t\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// Display Frame\n\t\tf.pack(); // Adjusts frame to size of components\n\t\tf.setVisible(true);\n\t}", "@Override protected void startup() {\n BlaiseGraphicsTestFrameView view = new BlaiseGraphicsTestFrameView(this);\n canvas1 = view.canvas1;\n root1 = view.canvas1.getGraphicRoot();\n canvas1.setSelectionEnabled(true);\n show(view);\n }", "public void render(){\n\t\tBufferStrategy bs = frame.getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tframe.createBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\trenderGraphics(bs);\n\t}", "public void render() {\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null) { //if the buffer strategy doesnt get created, then you create it\n\t\t\tcreateBufferStrategy(3); //the number 3 means it creates triple buffering\n\t\t\treturn;\t\t\t\t\t//, so when you backup frame gets displayed (2) it will also have a backup\t\n\t\t}\n\t\t\n\t\t//apply data to the buffer \"bs\"\n\t\t//this is creating a link to graphics to drawing graphics to the screen.\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t/**\n\t\t * You input all of your graphics inbetween the g object and g.dispose();\n\t\t */\n\t\t//###################\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\n\t\t//###################\n\t\tg.dispose(); //this dispose of all the graphics\n\t\tbs.show(); //this will make the next available buffer visible\n\t}", "public void draw() {\n\t //FrameRate should only 5 when there is no activity. Otherwise, 60\n if (!EventQueue.getInstance().isTiccing() && System.currentTimeMillis() - lastActive >= 300) {\n noLoop();\n setFrameRate(5);\n println(\"no draw activity\");\n } else{\n \t setFrameRate(60);\n }\n background(255);\n //Process menu data at the beginning\n // Menu menuSing = Menu.getInstance();\n // if ((boolean) menuSing.getControllerValue(\"Button0\")) {\n // KeyMap.getInstance().run('q');\n // }\n\n pushMatrix();\n //Enable scrolling\n translate(0, verticalScroll);\n StringManager.getInstance().draw();\n\n popMatrix();\n\n //if (frameCount % 10 == 0)System.out.println(frameRate);\n\n //Draw menu after\n Menu.getInstance().draw();\n }", "private void initFrame() {\r\n\tframe = new JFrame( \"Dammen\" );\r\n\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\tframe.setSize(ScreenSize.WIDTH + 25, ScreenSize.HEIGHT + 50);\r\n\r\n\tframe.setVisible(true);\r\n\t\r\n\tframe.setLocationRelativeTo(null);\r\n }", "public StartScreen()\n { \n // Create a new world with 1111x602 cells with a cell size of 1x1 pixels.\n super(1111, 602, 1); \n prepare();\n background.playLoop();\n }", "public void run() {\n gf = addGameFrame(\"Pacman\", displayW, displayH);\n }", "public void start() {\n\t\t\n\t\t/*\n\t\t * This is the main JFrame that everything will be placed on. \n\t\t * The size is set to a maximum value, and made unresizable to make repainting easier to achieve.\n\t\t */\n\t\tJFrame frame = new JFrame(\"Paint\");\n\t\tframe.setSize(Canvas.getMaxWindowSize(), Canvas.getMaxWindowSize());\n\t\tframe.setResizable(false);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t/*\n\t\t * The mainPanel is the panel on which all the other panels will be organized.\n\t\t * It uses a BorderLayout to divide the panel into 5 possible areas: North, South, West, East, and Center.\n\t\t */\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\tframe.add(mainPanel);\n\t\t\n\t\t/*\n\t\t * The canvas is added to the center of the mainPanel.\n\t\t */\n\t\tCanvas canvas = new Canvas();\n\t\tmainPanel.add(canvas, BorderLayout.CENTER);\n\t\t\n\t\t/*\n\t\t * The topToolPanel is a JPanel that will also use a BorderLayout to organize items placed upon it.\n\t\t * It is placed in the North portion of the mainPanel.\n\t\t */\n\t\tJPanel topToolPanel = new JPanel(new BorderLayout());\n\t\tmainPanel.add(topToolPanel, BorderLayout.NORTH);\n\t\t\n\t\t/*\n\t\t * The shapeToolsPanel is JPanel on which all the buttons for different shapes will be placed. \n\t\t * It is placed in the West portion of the topToolPanel.\n\t\t */\n\t\tJPanel shapeToolsPanel = new JPanel();\n\t\ttopToolPanel.add(shapeToolsPanel, BorderLayout.WEST);\n\t\t\n\t\t/*\n\t\t * The usefulToolPanel will hold buttons for options like \"Fill\" or \"No Fill\", as well as our \"Undo\" button.\n\t\t */\n\t\tJPanel usefulToolPanel = new JPanel();\n\t\ttopToolPanel.add(usefulToolPanel, BorderLayout.EAST);\n\t\t\n\t\t/*\n\t\t * Each of the next five buttons added represent an option to choose a certain shape to draw.\n\t\t * They all get added to the shapeToolsPanel from left to right.\n\t\t */\n\t\tJButton rectButton = new JButton(\"Rectangle\");\n\t\tshapeToolsPanel.add(rectButton);\n\t\trectButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"rectangle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton circButton = new JButton (\"Circle\");\n\t\tshapeToolsPanel.add(circButton);\n\t\tcircButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"circle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton triButton = new JButton (\"Triangle\");\n\t\tshapeToolsPanel.add(triButton);\n\t\ttriButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"triangle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton lineButton = new JButton (\"Line\");\n\t\tshapeToolsPanel.add(lineButton);\n\t\tlineButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"line\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton penButton = new JButton (\"Pen\");\n\t\tshapeToolsPanel.add(penButton);\n\t\tpenButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"pen\");\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t/*\n\t\t * The following three buttons are useful tools for the program to use: the option to choose whether or not to fill shapes, and the undo option.\n\t\t * Each of these will be added to the usefulToolPanel, once again from right to left.\n\t\t */\n\t\tJButton fillButton = new JButton(\"Fill\");\n\t\tusefulToolPanel.add(fillButton);\n\t\tfillButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setIsFilled(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton outlineButton = new JButton(\"No Fill\");\n\t\tusefulToolPanel.add(outlineButton);\n\t\toutlineButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setIsFilled(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton increaseButton = new JButton (\"Increase width\");\n\t\tusefulToolPanel.add(increaseButton);\n\t\tincreaseButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeThickness(Canvas.getShapeThickness() + 1);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton decreaseButton = new JButton (\"Decrease width\");\n\t\tusefulToolPanel.add(decreaseButton);\n\t\tdecreaseButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tCanvas.setShapeThickness(Canvas.getShapeThickness() - 1);\n\t\t\t\t}catch(IllegalArgumentException exception) {\n\t\t\t\t\tSystem.out.println(\"The shape thickness cannot be zero.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton undoButton = new JButton (\"Undo\");\n\t\tusefulToolPanel.add(undoButton);\n\t\tundoButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tcanvas.undo();\n\t\t\t\t}catch(IndexOutOfBoundsException exception) {\n\t\t\t\t\tSystem.out.println(\"No item in shape list to undo.\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\t * The colorPanel is a JPanel which utilizes a GridLayout to organize buttons from the top to the bottom.\n\t\t * It is set up to have more rows than are actually filled to minimize the size of each button on it.\n\t\t */\n\t\tJPanel colorPanel = new JPanel(new GridLayout(defaultGridRows, defaultGridColumns, defaultGridPadding, defaultGridPadding));\n\t\tmainPanel.add(colorPanel, BorderLayout.WEST);\n\t\t\n\t\t/*\n\t\t * Each of the following buttons will be added to the colorPanel.\n\t\t * They will stack one on top of the other as the grid is set up to only have one column.\n\t\t * Additionally, the text portion of each button will be set to the color that the button is connected to.\n\t\t */\n\t\tJButton blackButton = new JButton (\"Black\");\n\t\tcolorPanel.add(blackButton);\n\t\tblackButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.black);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton yellowButton = new JButton (\"Yellow\");\n\t\tyellowButton.setForeground(Color.yellow);\n\t\tcolorPanel.add(yellowButton);\n\t\tyellowButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.yellow);\n\t\t\t}\n\t\t});\n\n\t\tJButton greenButton = new JButton (\"Green\");\n\t\tgreenButton.setForeground(Color.green);\n\t\tcolorPanel.add(greenButton);\n\t\tgreenButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.green);\n\t\t\t}\n\t\t});\n\n\t\tJButton blueButton = new JButton (\"Blue\");\n\t\tblueButton.setForeground(Color.blue);\n\t\tcolorPanel.add(blueButton);\n\t\tblueButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.blue);\n\t\t\t}\n\t\t});\n\n\t\tJButton magentaButton = new JButton (\"Magenta\");\n\t\tmagentaButton.setForeground(Color.magenta);\n\t\tcolorPanel.add(magentaButton);\n\t\tmagentaButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.magenta);\n\t\t\t}\n\t\t});\n\n\t\tJButton redButton = new JButton (\"Red\");\n\t\tredButton.setForeground(Color.red);\n\t\tcolorPanel.add(redButton);\n\t\tredButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.red);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton pinkButton = new JButton (\"Pink\");\n\t\tpinkButton.setForeground(Color.pink);\n\t\tcolorPanel.add(pinkButton);\n\t\tpinkButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.pink);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tframe.setVisible(true);\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "private void initialize() {\n\t\tframePirateEventScreen = new JFrame();\n\t\tframePirateEventScreen.setBounds(100, 100, 630, 241);\n\t\tframePirateEventScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tJButton btnContinue = new JButton(\"CONTINUE\");\n\t\tbtnContinue.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnContinue.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfinishedWindow();\n\t\t\t}\n\t\t});\n\t\tframePirateEventScreen.getContentPane().setLayout(new MigLayout(\"\", \"[85px,grow]\", \"[grow][23px]\"));\n\n\t\tJLabel lblNewLabel = new JLabel(\n\t\t\t\t\"You have been boarded by pirates! You will have to beat them in a game to deter them.\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tframePirateEventScreen.getContentPane().add(lblNewLabel, \"cell 0 0\");\n\t\tframePirateEventScreen.getContentPane().add(btnContinue, \"cell 0 1,alignx center,aligny center\");\n\t}", "public void run(){\n\t\tframe = new JFrame(\"Dogfight\");\n\t\tframe.setSize(368,385);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\top = new OptionPanel();\n\t\tgp = new GamePanel(numplanes);\n\t\tip = new InstructionPanel();\n\t\tframe.getContentPane().add(op);\n\t\tframe.addKeyListener(gp);\n\t\tframe.setVisible(true);\n\t\tinitializeQuestionArray();\n\t\t\n\t}", "@Override\n public void run() {\n JFrame frame = new JFrame(\"Survey\");\n frame.setPreferredSize(new Dimension(300, 400));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n createComponents(frame.getContentPane());\n frame.pack();\n frame.setVisible(true);\n }", "private void buildAndDisplayFrame() {\n\n\t\tframe.add(panelForIncomingCall, BorderLayout.NORTH);\n\t\tpanelForIncomingCall.add(welcomeThenDisplayCallInfo);\n\n\t\tframe.add(backgroundPanel, BorderLayout.CENTER);\n\t\tbackgroundPanel.add(userInstructions);\n\t\tbackgroundPanel.add(startButton);\n\t\tbackgroundPanel.add(declineDisplay);\n\n\t\tframe.add(acceptDeclineBlockBottomPanel, BorderLayout.SOUTH);\n\t\tacceptDeclineBlockBottomPanel.add(acceptButton);\n\t\tacceptDeclineBlockBottomPanel.add(declineButton);\n\t\tacceptDeclineBlockBottomPanel.add(blockButton);\n\n\t\tframe.setSize(650, 700); // sizes frame to whatever we want\n\t\tframe.setLocationRelativeTo(null); // puts at center of screen\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public StartProgramFrame() {\n initComponents();\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tEx02 frame=new Ex02();\r\n\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t}catch(Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "private void draw() {\n frames++;\n MainFrame.singleton().draw();\n }", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "public frame1() {\n initComponents();\n cs = new Esqueleto(jLabel1.getGraphics());\n Caminar= cs.caminardoAbajo();\n Caminar.start();\n x=0;\n }", "public BMTron()\n\t{\n\t\tframe = new JFrame(\"Serpentine\");\n\t\tframe.setVisible(true);\n\t\tframe.setSize(793 + 5, 623 + 25);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.addKeyListener(this);\n\t\tdraw = new Drawing();\n\t\tframe.add(draw);\n\t\tinitial();\n\t\tinitialize();\n\t\tstartMove();\n\t}", "public NewJFrame1() {\n initComponents();\n\n dip();\n sh();\n }", "public static void drawStartWindow() throws MalformedURLException {\n\n\tURL url = new URL(\"http://i.imgur.com/rR9t3dX.gif\");\n\tIcon icon = new ImageIcon(url);\n\tJLabel label = new JLabel(icon);\n\n\tJFrame f = new JFrame(\"Animation\");\n\n\tf.getContentPane().add(label);\n\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\tf.setLocationRelativeTo(null);\n\tf.setVisible(true);\n\n\tf.add(startB);\n\tstartB.setBounds(85, 80, 300, 20);\n\tf.add(playerOneName);\n\tplayerOneName.setBounds(85, 5, 300, 20);\n\tf.add(playerTwoName);\n\tplayerTwoName.setBounds(85, 30, 300, 20);\n\tf.add(gameNum);\n\tgameNum.setBounds(85, 55, 300, 20);\n\tf.getContentPane().add(label);\n\tf.pack();\n\tf.setLocationRelativeTo(null);\n\tstartB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t\ttry {\n\t\t Runner.getNames();\n\t\t} catch (Exception e2) {\n\t\t // TODO Auto-generated catch block\n\t\t e2.printStackTrace();\n\t\t}\n\t\tif (Integer.parseInt(getNum()) <= 0) {\n\t\t System.out.println(\"Invalid Input\");\n\n\t\t} else {\n\t\t try {\n\t\t\trunGame();\n\t\t\tf.setVisible(false);\n\t\t\tf.dispose();\n\t\t } catch (MalformedURLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t }\n\t\t}\n\t }\n\t});\n\n }", "public void startScreen(Graphics g) {\n\t\tg.setFont(f1);\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Welcome to Dooley Jump\", 80, 250);\n\t\t\n\t\tg.setColor(new Color(148, 209, 113));\n\t\tg.fillRect(200, 300, 200, 50);\n\t\tg.setFont(f2);\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"play\", 270, 330);\n\t\t\n\t\tg.setFont(f3);\n\t\tg.drawString(\"Programmers: Angela Yu, Faustina Ryu, Samdrea Hsu\", 65, 380);\n\t\tg.drawString(\"Graphics Help: Emily Yu\", 65, 410);\n\t\tg.drawString(\"Music: Blinding Lights-The Weeknd, Butter-BTS\", 65, 440);\n\t\tg.drawString(\"Never Gonna Give You Up-Rick Astley\", 132, 465);\n \n\t}", "private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"WAR OF MINE\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new Gameframe();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.setSize(800,1000);\n frame.setVisible(true);\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 621, 453);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblBlackjackVersion = new JLabel(\"BlackJack Version .01\");\r\n\t\tlblBlackjackVersion.setFont(new Font(\"Tahoma\", Font.PLAIN, 29));\r\n\t\tlblBlackjackVersion.setBounds(155, 55, 305, 59);\r\n\t\tframe.getContentPane().add(lblBlackjackVersion);\r\n\t\t\r\n\t\tJButton btnStart = new JButton(\"Start\");\r\n\t\tbtnStart.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tkontroll1.start();\r\n\t\t\t\t\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnStart.setBackground(Color.WHITE);\r\n\t\tbtnStart.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\r\n\t\tbtnStart.setToolTipText(\"Start Blackjack\");\r\n\t\tbtnStart.setBounds(201, 185, 163, 47);\r\n\t\tframe.getContentPane().add(btnStart);\r\n\t}", "public static void GameStart() throws IOException {\n\t\tJLabel label = new JLabel(new ImageIcon(\"title.png\"));\r\n\t\t\t\t \r\n\t\tJFrame title = new JFrame();\r\n\t\ttitle.add(label);\r\n\t\ttitle.getContentPane().add(label);\r\n\t\ttitle.pack();\r\n\t\ttitle.setLocationRelativeTo(null);\r\n\t\tlabel.repaint();\r\n\t\ttitle.setVisible(true); \r\n\t}", "public void start() {\n\t\tobj = new SlotMachine();\n\t\tsetContentPane(new JLabel(new ImageIcon(\"src/images/background.jpg\")));\n\t\t//design the main interface\n\t\tdesign();\n\n\t\t//Initialise the 3 reels\n\t\tnew SlotMachineController().initializeReels();\n\t\t//add 3 reels of panel to slotmachines panels\n\t\treel1.add(new SlotMachineController(reel1, 1));\n\t\treel2.add(new SlotMachineController(reel2, 2));\n\t\treel3.add(new SlotMachineController(reel3, 3));\n\t\t//add mouselistners to 3 reels\n\t\tnew SlotMachineController().stopSpinning();\n\t\t//design the frame\n\t\tsetTitle(\"Slot Machine\");\n\t\tImageIcon img = new ImageIcon(\"src/images/icon.png\");\n\t\tsetIconImage(img.getImage());\n\t\tsetSize(580, 720);\n\t\tsetMinimumSize(new Dimension(580, 720));\n\t\tsetVisible(true);\n\t}", "void setupFrame()\n {\n int wd = shopFrame.getWidth();\n sellItemF(wd);\n\n requestItemF(wd);\n setAllVisFalse();\n }", "public void start(){\n JmeFormatter formatter = new JmeFormatter();\n\n Handler consoleHandler = new ConsoleHandler();\n consoleHandler.setFormatter(formatter);\n\n Logger.getLogger(\"\").removeHandler(Logger.getLogger(\"\").getHandlers()[0]);\n Logger.getLogger(\"\").addHandler(consoleHandler);\n \n createCanvas(appClass);\n \n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n \n SwingUtilities.invokeLater(new Runnable(){\n public void run(){\n JPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\n createFrame();\n \n //currentPanel.add(canvas, BorderLayout.CENTER);\n mMainFrame.pack();\n startApp();\n mMainFrame.setLocationRelativeTo(null);\n mMainFrame.setVisible(true);\n }\n });\n \n \n }", "public void run() {\n\t\t//only makeFrame once\n\t\tif(!running){\n\t\t\tmakeFrame();\n\t\t}\n\t\tmenuFrame.setVisible(true);\n\t}", "private void initFrame() {\n setLayout(new BorderLayout());\n }", "public static void run(){\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n PlanHomeCoach frame = new PlanHomeCoach();\n frame.init();\n Dimension screenSize =Toolkit.getDefaultToolkit().getScreenSize();\n frame.setLocation(screenSize.width/2-400/2,screenSize.height/2-700/2);\n frame.setResizable(false);\n frame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "public Screen(Frame frame) { \n frame.addMouseListener(new KeyHandler()); // Adds a mouse listener to the JFrame\n frame.addMouseMotionListener(new KeyHandler()); // Adds a mouse motion listener to the JFrame\n gameLoop.start(); // Starts the thread\n }", "public void run()\n {\n //Generate text, pack and show the frame\n generateTextArea();\n pack();\n setMinimumSize(getSize());\n setVisible(true);\n }", "private static void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n frame = new JFrame(\"ATC simulator\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n atcscreen = new AtcScreen();\r\n atcscreen.setOpaque(true);\r\n frame.setContentPane(atcscreen);\r\n \r\n //Display the window.\r\n frame.setSize(1000,1000);\r\n //atcscreen.setSize(300,300);\r\n //frame.pack();\r\n frame.setVisible(true);\r\n }", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "public static void startGame()\r\n\t{\r\n\t\tnew ModeFrame();\r\n\t}", "private void createAndInitPictureFrame() {\r\n frame = new com.FingerVeinScanner.Frame(picture,picture2);\r\n\t\tthis.pictureFrame = frame.getFrame(); // Create the JFrame.\r\n\t\tthis.pictureFrame.setResizable(true); // Allow the user to resize it.\r\n\t\tthis.pictureFrame.getContentPane().\r\n\t\tsetLayout(new BorderLayout()); // Use border layout.\r\n\t\tthis.pictureFrame.setDefaultCloseOperation\r\n\t\t(JFrame.DISPOSE_ON_CLOSE); // When closed, stop.\r\n\t\tthis.pictureFrame.setTitle(picture.getTitle());\r\n\t\t//PictureExplorerFocusTraversalPolicy newPolicy =\r\n\t\t//\tnew PictureExplorerFocusTraversalPolicy();\r\n\t\t//this.pictureFrame.setFocusTraversalPolicy(newPolicy);\r\n\t}", "public void go() {\n update();\n borders();\n render();\n }", "public static void changeFrame() {\r\n\t\t\r\n\t}", "private UI() {\r\n window = new JFrame();\r\n window.setSize(800, 450);\r\n window.setResizable(false);\r\n window.setLocation(0, 0);\r\n window.setVisible(true);\r\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n window.setTitle(\"RadarApp\");\r\n windowgfx = window.getGraphics();\r\n try{\r\n sound = Audio.getInstance();\r\n } catch(MidiUnavailableException e){\r\n sound = null;\r\n }\r\n\r\n \r\n }", "public void display() {\r\n\t\tJFrame myFrame = new JFrame(\"BlackJack\");\r\n\t\tmyFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tmyFrame.setContentPane(this);\r\n\t\tmyFrame.setPreferredSize(new Dimension(700, 550));\r\n\t\tmyFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\t// Display the window.\r\n\t\tmyFrame.pack();\r\n\t\tmyFrame.setVisible(true);\r\n\t\t//game = new Blackjack();\r\n\t}", "public void run() {\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t\t\tframe.setJMenuBar((new MyJMenuBar(frame)).menuBar);\n\t\t\t\t\n\t\t\t\t//Display the window.\n\t\t\t\t//frame.pack();\n\n\t\t\t\t//Set up the content pane.\n\t\t\t\tframe.addLoadingMessage(frame.getContentPane());\n\t\t\t\tframe.pack();\n\t\t\t\tframe.setSize(new Dimension((int)(frame.getSize().getWidth()), 300));\n\t\t\t\tframe.setResizable(false);\n\t\t\t\tframe.setVisible(true);\n\t\t\t\tframe.update(frame.getGraphics());\n }", "public static void spielstart() {\n\n\t\tThread thread = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tgameboard = new GameFrame();\n\n\t\t\t}\n\t\t};\n\n\t\tthread.start();\n\n\t}", "public void start() {\n\t\tcurrentFrameIndex = 0;\n\t}", "public void start(){\n getBoard();\n prepareBoard();\n renderBoard();\n }", "public void runGame()\r\n\t{\r\n\t\tmainFrame.runGame();\r\n\t}", "public void display() {\n JFrame win = new JFrame(\"My Maze\");\n win.setLocation(25, 25);\n win.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n win.add(this);\n win.pack();\n win.setVisible(true);\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "public static void Start(){\r\n\t\t// gets rid of JPanel flickering on some computers (like my windows XP)\r\n\t\tSystem.setProperty(\"sun.awt.noerasebackground\", \"true\");\r\n\t\t\r\n\t\t// TODO: add window's icon\r\n\t\tframe = new JFrame(\"Helix\");\r\n\t\t//JFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Choose lookAndFeel that is closest to the OS you are using.\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t\t//UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Create the main menu bar\r\n\t\tsetMenu(getDefaultMenu());\r\n\t\t//frame.setVisible(true);\r\n\t\t\r\n\t\tframe.setMinimumSize(new Dimension(400, 300));\r\n\t\t\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\r\n\t\tDimension setDimension = new Dimension(400, 300);\r\n\t\twhile(screenSize.width > setDimension.width && screenSize.height > setDimension.height + 400){\r\n\t\t\tsetDimension.width += 400;\r\n\t\t\tsetDimension.height += 300;\r\n\t\t}\r\n\t\tframe.setSize(setDimension);\r\n\t\tframe.setPreferredSize(setDimension);\r\n\t\t\r\n\t\t// TODO: add X buttons to the tabs.\r\n\t\tmainTabbedPane = new JTabbedPane();\r\n\t\t\r\n\t\tframe.add(mainTabbedPane);\r\n\t\t\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\r\n\t\tframe.addWindowListener(new WindowListener(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowActivated(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\r\n\t\t\t\tSystem.out.println(\"Window closed\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\t\tSystem.out.println(\"Window closing\");\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowIconified(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t/*\r\n\t\ttry {\r\n\t\t\t// Choose lookAndFeel that is closest to the OS you are using.\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (InstantiationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalAccessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnsupportedLookAndFeelException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t}", "public void start(int xSize, int ySize) {\n\t\tGameFrame g = new GameFrame(xSize, ySize);\n\t\tg.setVisible(true);\n\t\t\n\t}", "public static void createGUI(GUIbrain draw) {\n JFrame window = new JFrame(\"BrainToC\");\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n window.setPreferredSize(new Dimension(500,520));\n window.getContentPane().add(draw);\n window.setGlassPane(draw);\n //window.setLocationRelativeTo(null);\n window.setResizable(false);\n window.pack();\n window.setVisible(true);\n draw.setFocusable(true);\n draw.setVisible(true);\n }", "private void paintMenu(){ \n\t\t\n\t\t//Idee: Vllt. lieber Menü auf unsichtbar setzen und immer wieder anzeigen, wenn benötigt? Vllt. auch praktisch für Pause...Aber was mit entsprechenden Labels?\n\t\tif(spiel_status == 3){ //Spiel noch gar nicht gestartet\n\t\t\tframe3 = new JFrame(\"Spiel starten?\");\n\t\t\tframe3.setLocation(650,300);\n\t\t\tframe3.setSize(100, 100);\n\t\t\tJButton b1 = new JButton(\"Einzelspieler\");\n\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\tJButton b2 = new JButton(\"Beenden\");\n\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\tJButton b3 = new JButton(\"Mehrspieler\");\n\t\t\tJButton b4 = new JButton(\"Einstellungen\");\n\t\t\tJButton b5 = new JButton(\"Handbuch\");\n\t\t\t\n\t\t\t//Neues Layout. 4 Zeilen, 1 Spalte. \n\t\t\tframe3.setLayout(new GridLayout(5,1));\n\t\t\tframe3.add(b1);\n\t\t\tframe3.add(b3);\n\t\t\tframe3.add(b4);\n\t\t\tframe3.add(b5);\n\t\t\tframe3.add(b2);\n\n\t\t\tframe3.pack();\n\t\t\tframe3.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\t\tsingleplayer = true;\n\t\t\t\t\tdoInitializations(frame3);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tb3.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tmultiplayer = true;\n\t\t\t\t\tpaintNetworkMenu();\n\t\t\t\t}\n\t\t\t});\t\t\t\n\t\t\t\n\t\t\tb4.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tpaintSettingMenu();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tb5.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \"+ \"resources\\\\handbuch\\\\Handbuch.pdf\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}\n\t\t\n\t\tif(spiel_status == 1|| spiel_status == 0){ //Wenn Spiel gewonnen oder verloren\n//\t\t\tif (!multiplayer){\n\t\t\t\tframe2 = new JFrame(\"Neues Einzelspielerspiel?\");\n\t\t\t\tframe2.setLocation(500,300);\n\t\t\t\tframe2.setSize(100, 100);\n\t\t\t\tJLabel label;\n\t\t\t\tif(spiel_status == 1){\n\t\t\t\t\tlabel = new JLabel(\"Bravo, du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t}else{\n\t\t\t\t\tif(player.getLifes() == 0){\n\t\t\t\t\t\tlabel = new JLabel(\"Schade, du hast verloren! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlabel = new JLabel(\"Du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tframe2.add(BorderLayout.NORTH, label);\n\t\t\t\tJButton b1 = new JButton(\"Neues Einzelspielerspiel\");\n\t\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tdoInitializations(frame2);\n\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n\t\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tspiel_status=3;\n\t\t\t\t\t\tpaintMenu();\n\t\t\t\t\t\tframe2.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\tframe2.add(BorderLayout.CENTER, b1);\n\t\t\t\tframe2.add(BorderLayout.SOUTH, b2);\n\t\t\t\tframe2.pack();\n\t\t\t\tframe2.setVisible(true);\n\t\t\t\tspiel_status = 0;\n\t\t\t}\n//\t\t}else{\n//\t\t\tframe2 = new JFrame(\"Ende\");\n//\t\t\tframe2.setLocation(500,300);\n//\t\t\tframe2.setSize(100, 100);\n//\t\t\tJLabel label;\n//\t\t\tif(player.getLifes() == 0){\n//\t\t\t\tlabel = new JLabel(\"Du Lusche hast verloren!\");\n//\t\t\t}else{\n//\t\t\t\tlabel = new JLabel(\"Boom-Headshot! Du hast gewonnen!\");\n//\t\t\t}\n//\t\t\t\n//\t\t\tframe2.add(BorderLayout.NORTH, label);\n//\t\t\t\n//\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n//\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n//\t\t\tb2.addActionListener(new ActionListener(){\n//\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n//\t\t\t\t\tif(sound_running){\n//\t\t\t\t\t\tsoundlib.stopLoopingSound();\n//\t\t\t\t\t}\n//\t\t\t\t\tspiel_status=3;\n//\t\t\t\t\tpaintMenu();\n//\t\t\t\t\tframe2.setVisible(false);\n//\t\t\t\t\tframe2.dispose();\n//\t\t\t\t\t\n//\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t});\n//\t\t\tframe2.add(BorderLayout.CENTER, b2);\n//\t\t\tframe2.pack();\n//\t\t\tframe2.setVisible(true);\n//\t\t\tspiel_status = 0;\n//\t\t}\n\t\tspiel_status = 0; // Daraus folgt, dass wenn man das Spiel per ESC-taste verlässt, man verliert.\n\t\t\n\t}", "public void render(){\n //this block is pre-loading 2 frames in\n BufferStrategy bs = this.getBufferStrategy();\n if(bs == null){\n this.createBufferStrategy(2);\n return;\n }\n\n Graphics g = bs.getDrawGraphics();\n Graphics2D g2d = (Graphics2D) g;\n ///////////////////////////\n //Draw things below here!\n g.setColor(Color.white);\n g.fillRect(0, 0, 800, 800);\n\n g2d.translate(-camera.getX(), -camera.getY());\n\n g.setColor(Color.gray);\n g.fillRect(0, 0, 500, 500);\n //render all the objects\n handler.render(g);\n\n //g2d.translate(camera.getX(), camera.getY());\n //Draw things above here!\n ///////////////////////////\n g.dispose();\n bs.show();\n }", "public void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tWindo frame = new Windo();\r\n\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\\u5E78\\u8FD0\\u8F6C\\u76D8\");\n\t\tlblNewLabel.setBounds(131, 13, 208, 35);\n\t\tlblNewLabel.setIcon(new ImageIcon(RandomCall.class.getResource(\"/images/\\u968F\\u673A\\u7528\\u6237.png\")));\n\t\tlblNewLabel.setFont(new Font(\"宋体\", Font.BOLD, 30));\n\t\t\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\t/*\n\t\t *名字显示区域\n\t\t */\n\t\tlblNewLabel_1 = new JLabel(\"name\");\n\t\tlblNewLabel_1.setFont(new Font(\"宋体\", Font.ITALIC, 30));\n\t\tlblNewLabel_1.setBounds(178, 91, 113, 52);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\t/*\n\t\t * 开始按钮\n\t\t */\n\t\tstart = new JButton(\"\\u5F00\\u59CB\");\n\t\tstart.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstartAction(e); \n\t\t\t}\n\t\t});\n\t\tstart.setBounds(14, 198, 113, 27);\n\t\tframe.getContentPane().add(start);\n\t\t\n\t\t/*\n\t\t * 停止按钮\n\t\t */\n\t\tJButton stop = new JButton(\"\\u6682\\u505C\");\n\t\tstop.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstopAction(e); \n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\tstop.setBounds(165, 198, 113, 27);\n\t\tframe.getContentPane().add(stop);\n\t\t\n\t\tJButton back = new JButton(\"\\u8FD4\\u56DE\\u4E3B\\u754C\\u9762\");\n\t\tback.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tIndex index = new Index(); \n\t\t\t\tindex.getFrame().setVisible(true);\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tback.setBounds(305, 198, 113, 27);\n\t\tframe.getContentPane().add(back);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private void startGUI() {\r\n myFrame.setTitle(\"Media Library\");\r\n myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n myFrame.setLocationByPlatform(true);\r\n myFrame.pack();\r\n\r\n myFrame.setVisible(true);\r\n }", "void go(){\n\t\twindow.setSize(28, 80);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.setVisible(true);\n\t\twindow.setResizable(false);\n\t\twindow.add(new PewGrid());\n\t\t// Adds a listener for mouse related events\n\t\twindow.addMouseListener(new mouseevent());\n\t\twindow.repaint();\n\t\t//move();\n\t}", "public void start() throws InterruptedException {\t\t\r\n\t\t\r\n\t\tIntroPanel intro = new IntroPanel(this);\r\n\t\tgameFrame.add(intro);\r\n\t\tgameFrame.pack();\r\n\t\tgameFrame.setVisible(true);\r\n\t\tgameFrame.repaint();\r\n\t\t\r\n\t\tTimeUnit.SECONDS.sleep(9);\r\n\t\t\r\n\t\tintro.setVisible(false);\r\n\t\tskipIntro();\r\n\t\t\r\n\t}", "public void run()\r\n\t{\r\n\t\tthis.mainFrame.setVisible(true);\r\n\t}", "private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }", "private void render() {\n\n\tbs=display.getCanvas().getBufferStrategy();\t\n\t\n\tif(bs==null) \n\t {\t\n\t\tdisplay.getCanvas().createBufferStrategy(3);\n\t\treturn ;\n\t }\n\t\n\tg=bs.getDrawGraphics();\n\n\t//Clear Screen\n\tg.clearRect(0, 0, width, height);\n\t\n\tif(State.getState()!=null )\n\t\tState.getState().render(g);\n\t\n\t//End Drawing!\n\tbs.show();\n\tg.dispose();\n\t\n\t}", "public void startRendering() {\n if (!justRendered) {\n justRendered = true;\n \n if (Flags.wireFrame) p.render_wireFrame();\n else p.render();\n }\n }", "public static void prepareGUI() {\n\t\tframe = new JFrame(\"Solid Adventure : Catch All Virtumon\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Driver demo = new Driver();\n demo.addComponentToPane(frame.getContentPane());\n\n //Display the window.\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\t}", "public void createAndShowGUI() {\n\n setTitle(title);\n // Sets what to do when frame closes\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setIconImage(new ImageIcon(ClassLoader.getSystemResource(ICON_PATH)).getImage());\n\n //shows the frame\n pack();\n setLocationRelativeTo(null); //centers frame\n setVisible(true);\n }", "void start() {\n \t\tThread logicThread = new Thread(logic);\n \t\tThread graphicThread = new Thread(graphics);\n \n \t\tlogicThread.start();\n \t\tgraphicThread.start();\n \t}", "protected void drawStartGame(){\n startBorder = new Rectangle(355, 525, 90, 50);\n startBorder.setFillColor(pink);\n startBorder.setFilled(true);\n\n startBox = new Rectangle(360, 530, 80, 40);\n startBox.setFillColor(Color.black);\n startBox.setFilled(true);\n\n startText = new GraphicsText(\"START\", 365, 555);\n startText.setFont(font);\n startText.setStrokeColor(new Color(88, 30, 220));\n\n canvas.add(startBorder);\n canvas.add(startBox);\n canvas.add(startText);\n }", "public void run() {\n\t\tframe.setVisible(true);\n\t}", "private void prepareFrame() {\n logger.debug(\"prepareFrame : enter\");\n\n // initialize the actions :\n registerActions();\n final Container container;\n\n if (Bootstrapper.isHeadless()) {\n container = null;\n } else {\n final JFrame frame = new JFrame(ApplicationDescription.getInstance().getProgramName());\n\n // handle frame icon\n final Image jmmcFavImage = ResourceImage.JMMC_FAVICON.icon().getImage();\n frame.setIconImage(jmmcFavImage);\n\n // get screen size to adjust minimum window size :\n final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n logger.info(\"screen size = {} x {}\", screenSize.getWidth(), screenSize.getHeight());\n // hack for screens smaller than 1024x768 screens:\n final int appWidth = 950;\n final int appHeightMin = (screenSize.getHeight() >= 850) ? 800 : 700;\n\n final Dimension dim = new Dimension(appWidth, appHeightMin);\n frame.setMinimumSize(dim);\n frame.addComponentListener(new ComponentResizeAdapter(dim));\n frame.setPreferredSize(INITIAL_DIMENSION);\n\n App.setFrame(frame);\n\n container = frame.getContentPane();\n }\n // init the main panel:\n createContent(container);\n\n StatusBar.show(\"application started.\");\n\n logger.debug(\"prepareFrame : exit\");\n }", "public NewJFrame() {\n initComponents();\n mcam.setLineWrap(true);\n\n }", "void startAnimation();", "public void run()\n {\n m_frame = new DrawingFrame();\n \n m_frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n m_frame.addWindowListener(new WindowAdapter() {\n public void windowClosing(WindowEvent evt)\n {\n try\n {\n m_context.getBundle(0).stop();\n }\n catch (BundleException ex)\n {\n ex.printStackTrace();\n }\n }\n });\n \n m_frame.setVisible(true);\n \n m_shapetracker = new ShapeTracker(m_context, m_frame);\n m_shapetracker.open();\n }", "@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }", "private static void createAndShowGUI() {\r\n\t\t// Create and set up the window.\r\n\t\tframe = new JFrame(\"Captura 977R\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Set up the content pane.\r\n\t\taddComponentsToPane(frame.getContentPane());\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tDimension windowSize = frame.getSize();\r\n\r\n\t\tint windowX = Math.max(0, (screenSize.width - windowSize.width) / 2);\r\n\t\tint windowY = Math.max(0, (screenSize.height - windowSize.height) / 2);\r\n\r\n\t\tframe.setLocation(windowX, windowY); // Don't use \"f.\" inside\r\n\t\t// constructor.\r\n\t\tframe.setVisible(true);\r\n\t}", "public static void newGame() throws IOException {\n\t\tmancalaFrame.setContentPane( new BoardGraphicsLabel() ); // bottom level board\t\r\n\t\tmancalaFrame.add( new PitsGraphicsPanel() ); // add pits jbuttons from custom layered pane\r\n\t\t\t\t\r\n\t\t// create the top layer glass pane for repainting stones and labels\r\n\t\t// glass pane allows buttons to be pushed with components on top\r\n\t\tstonePaintGlassPane = new StonePaintGlassPane( mancalaFrame.getContentPane() );\r\n\t\t\r\n\t\tmancalaFrame.setGlassPane( stonePaintGlassPane );\r\n\t\t\t\t\r\n\t\t\t\t// grid bag layout, will be used to place pit buttons in proper location\r\n\t\t\t\t// in Class PitsGraphicsPanel\r\n\t\tmancalaFrame.setLayout( new GridBagLayout() );\r\n\t\t\t\t// set true to glassPane\r\n\t\tstonePaintGlassPane.setVisible(true);\r\n\t\t\t\t\r\n\t\t\t\t// keep frame one size so we don't have to calculate resizing\r\n\t\t\t\t// sorry for the laziness\r\n\t\tmancalaFrame.setResizable(false);\r\n\t\tmancalaFrame.pack(); // set all proper sizes to prefered size\r\n\t\tmancalaFrame.setVisible(true); // set visible\r\n\t}", "public static void main(String[] args) {\n JFrame win = new JFrame(\"GraphicsDemo1\");\r\n win.setSize(800,600);\r\n win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n GraphicsDemo1 canvas = new GraphicsDemo1();\r\n win.add( canvas );\r\n win.setVisible(true);\r\n }" ]
[ "0.73729765", "0.7073154", "0.706517", "0.70125", "0.70093006", "0.70010465", "0.69882846", "0.6987978", "0.69484484", "0.6942153", "0.69264305", "0.6897719", "0.6887596", "0.68825334", "0.68825006", "0.68739325", "0.68726474", "0.6872102", "0.6843607", "0.6838095", "0.6832664", "0.6812135", "0.68027925", "0.67692643", "0.6754333", "0.67464125", "0.6741845", "0.67253345", "0.6724845", "0.6712977", "0.670866", "0.66960645", "0.6686723", "0.66551334", "0.66518426", "0.6629657", "0.66290426", "0.66276115", "0.6616726", "0.66075826", "0.66036755", "0.660341", "0.6602237", "0.6593993", "0.65912616", "0.6590559", "0.6586849", "0.65774673", "0.656737", "0.6560239", "0.6554318", "0.6542275", "0.6541684", "0.65218633", "0.652118", "0.6517833", "0.65132654", "0.6512828", "0.6507994", "0.650298", "0.65007704", "0.6499079", "0.6497806", "0.6497461", "0.6488841", "0.64802665", "0.6475338", "0.6472576", "0.6467235", "0.64669275", "0.6464507", "0.64626944", "0.6459898", "0.6458421", "0.64509416", "0.64458925", "0.64431256", "0.6442591", "0.64405406", "0.6439276", "0.6437475", "0.64369076", "0.64334947", "0.6432267", "0.64255244", "0.64253503", "0.6417743", "0.6413463", "0.6411584", "0.6411569", "0.64063805", "0.6401928", "0.63976324", "0.6379347", "0.63770604", "0.6372577", "0.6372323", "0.63672596", "0.63656855", "0.6363556", "0.6359187" ]
0.0
-1
creating a JPanel on top of the screen with controls
private JPanel topBar() { //creating a top bar with controls JPanel topBar = new JPanel(); Color myPurp = new Color(191, 123, 123); topBar.setBackground(myPurp); //reset button with listener topBar.add(reset); reset.addActionListener(this); //creating button that starts simulation start.setSelected(false); start.addActionListener(this); topBar.add(start); //creating button that stops simulation stop.setSelected(true); stop.addActionListener(this); topBar.add(stop); //button group to ensure you cannot start and stop at same time ButtonGroup startStop = new ButtonGroup(); startStop.add(start); startStop.add(stop); //creating label that shows # of steps steps.setHorizontalAlignment(JLabel.CENTER); topBar.add(steps); return topBar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildTopPanel() {\n \t\tJPanel panel = new JPanel();\n \t\tpanel.setLayout(new BorderLayout(10, 10));\n \t\t\n \t\t// this does not need to be referenced else where, only for layout\n \t\tJPanel paneButtons = new JPanel();\n \t\tGridLayout bl = new GridLayout(2, 1);\n \t\tpaneButtons.setLayout(bl);\n \t\t\n \t\tpaneButtons.add(bCastOff);\n \t\tpaneButtons.add(bSavePlayer);\n \t\t\n \t\t// add all components on top:\n \t\tpanel.add(imgDisplay, BorderLayout.LINE_START);\n \t\tpanel.add(paneEditFields, BorderLayout.CENTER);\n \t\tpanel.add(paneButtons, BorderLayout.LINE_END);\n \t\t\n \t\tadd(panel, BorderLayout.PAGE_START);\n \t}", "private void addComponents() {\n //this.getContentPane().add(new ViewDeckComputer(), BorderLayout.NORTH);\n createTopPanel();\n createCentralPanel();\n createBottomPanel();\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 }", "protected void addComponentsToPane() {\n mainPanel = new JPanel(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n\n\n gameField = new GameField(this);\n gameField.setPreferredSize(new Dimension(screenWidth / 3, screenHeight / 2));\n gameField.setBorder(BorderFactory.createLineBorder(Color.black));\n\n gameFieldPanel = new JPanel();\n LayoutManager overlay = new OverlayLayout(gameFieldPanel);\n gameFieldPanel.setLayout(overlay);\n gameFieldPanel.add(gameField);\n\n// gameCharsFieldPanel.setOpaque(true);\n// gameCharsFieldPanel.setPreferredSize(new Dimension(screenWidth/3, screenHeight/3));\n// gameFieldPanel.add(gameCharsFieldPanel);\n\n drawX = new DrawX();\n gameFieldPanel.add(drawX);\n\n drawO = new DrawO();\n gameFieldPanel.add(drawO);\n\n c.fill = GridBagConstraints.HORIZONTAL;\n c.gridwidth = 3;\n c.gridx = 0;\n c.gridy = 0;\n mainPanel.add(gameFieldPanel, c);\n\n// addLinesButton = new JButton(\"Draw Lines\");\n// c.fill = GridBagConstraints.HORIZONTAL;\n//// c.gridwidth = 3;\n// c.gridx = 0;\n// c.gridy = 1;\n// mainPanel.add(addLinesButton, c);\n//\n frame.add(mainPanel);\n }", "private void createTopPanel(){\n computerPaquetView = new ViewDeckVisible(true);\n this.getContentPane().add(computerPaquetView);\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 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}", "private void makeDisplay() {\n\n\t\t// setLayout to be a BoxLayout\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\t// call these methods ???? to be defined later\n\n\t\taddOscServerAddressPanel();\n\t\taddGlobalControlPanel();\n\t\taddFirstSynthPanel();\n\t\taddSecondSynthPanel();\n\t\taddThirdSynthPanel();\n\t}", "public MainPanel()\n\t{\n\t\tsuper();\n\t\t\n\t\tthis.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); \n\t\t_brickbackground = new ImageIcon(\"brickbackground.jpg\").getImage();\n\t\t\n \n\t\t_paddle2 = new PaddleShape();\n\t\t_paddle1 = new PaddleShape();\n \n\t\n\t\t \n\t\t\n\t\t\n\t\tHolder _holder = new Holder(BrickPanel);\n\t\t\n\t\tBrickPanel = new BrickPanel(_holder, _paddle1, _paddle2, controlPanel, this);\n\t\t\n\t\tMainMenu = new MainMenu(this);\n\t\tMainMenu.setLayout(new BoxLayout(MainMenu, BoxLayout.Y_AXIS));\n\t\tMainMenu.setPreferredSize(new Dimension(800, 450));\n\t\tMainMenu.setMaximumSize(new Dimension(800, 450));\n\t\t\n\t\tcontrolPanel = new ControlPanel(BrickPanel, this, _holder, _paddle1, _paddle2, MainMenu);\n\t\tcontrolPanel.setLayout(new GridLayout(1,5));\n\t\tcontrolPanel.setPreferredSize(new Dimension(800, 65));\n\t\tcontrolPanel.setMaximumSize(new Dimension(800, 65));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tthis.add(BrickPanel); \n\t\tthis.add(controlPanel); \n\t\tthis.add(MainMenu);\n\t\t\n\t\tcontrolPanel.setVisible(false);\n\t\tBrickPanel.setVisible(false);\n\t\tMainMenu.setVisible(true);\n\t\tMyClickListener listener = new MyClickListener(this, BrickPanel, _holder);\n\t\tthis.addMouseListener(listener);\n this.addMouseMotionListener(listener);\n this.addKeyListener(listener);\n\t\tthis.setFocusable(true);\n\t\t\n\t\t//create a button instead of the play rectangle !!!!!!!!!!!!!!!!\n\t\t\n\t\t\n\t\t\n\t}", "public void initPanel()\n\t{\n\t\tthis.setVisible(false);\n\t\t//this.setLayout(new BorderLayout());\n \n\t\t//*Layout setup\n\t\t\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\t//this.setLayout(layout);\n\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\t\t\n\t\t\t\t\n\t\t//frame = new JFrame();\n offscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n onscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n offscreen = offscreenImage.createGraphics();\n onscreen = onscreenImage.createGraphics();\n setXscale();\n setXscale();\n offscreen.setColor(DEFAULT_CLEAR_COLOR);\n offscreen.fillRect(0, 0, width, height);\n setPenColor();\n setPenRadius();\n setFont();\n clear();\n\n // add antialiasing\n RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n offscreen.addRenderingHints(hints);\n\n \n // frame stuff\n ImageIcon icon = new ImageIcon(onscreenImage);\n drawLabel = new JLabel(icon);\n\n drawLabel.addMouseListener(this);\n drawLabel.addMouseMotionListener(this);\n \n //Create buttons\n resetButton = new JButton();\n undoButton = new JButton();\n \n undoButton.setVisible(true);\n undoButton.setEnabled(true);\n undoButton.setName(\"Undo\");\n undoButton.setText(\"Undo\");\n undoButton.setSize(75, 30);\n undoButton.setPreferredSize(new Dimension(75,30));\n \n resetButton.setVisible(true);\n resetButton.setEnabled(true);\n resetButton.setName(\"Reset\");\n resetButton.setText(\"Reset\");\n \tresetButton.setSize(75, 30);\n \tresetButton.setPreferredSize(new Dimension(75,30));\n \t\n //this.add(resetButton, BorderLayout.NORTH);\n //this.add(undoButton, BorderLayout.NORTH);\n \n // JPanel mainPanel = new JPanel(new BorderLayout());\n\n // JPanel northPanel = new JPanel();\n // northPanel.add(resetButton);\n // northPanel.add(undoButton);\n // mainPanel.add(northPanel, BorderLayout.NORTH);\n // mainPanel.add(drawLabel, BorderLayout.CENTER);\n \n\n // generalColorValue = getColorParameter(Skin.GENERAL_TEXT_COLOR); \n //controlColorValue = getColorParameter(Skin.CONTROL_BACKGROUND_COLOR); \n \n\t\t//trimColorValue = getColorParameter(Skin.TRIM_COLOR); \n\t \n\t\tinitComboBox();\n\t\t//this.setContentPane(drawLabel); <---------------------------\n this.add(drawLabel, BorderLayout.CENTER);\n \n this.addKeyListener(this); // JLabel cannot get keyboard focus\n this.setResizable(true);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows\n //this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window\n this.setTitle(name);\n // frame.setJMenuBar(createMenuBar());\n this.pack();\n this.requestFocusInWindow();\n this.setVisible(true);\n \n\t}", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tqueryButton = new JButton(\"query\");\n\t\tthis.add(queryButton);\n\t\tthis.add(displayPane);\n\t\tdisplayArea = new JTextArea(10,30);\n\t\tadd(displayArea);\n\t\t\n\t\t\n\t}", "private void createUI() throws FactoryException {\n assert theGame != null;\n assert ghostController != null;\n\n buttonPanel = new ButtonPanel(this);\n buttonPanel.initialize();\n\n pi = new PacmanInteraction(this, theGame);\n pi.addController(ghostController);\n buttonPanel.setListener(pi);\n this.addKeyListener(new PacmanKeyListener(pi));\n\n boardView = createBoardView();\n animator = new Animator(boardView);\n pi.addController(animator);\n\n points = new PointsPanel();\n points.initialize(theGame.getPointManager());\n theGame.attach(points);\n\n JPanel mainGrid = new JPanel();\n mainGrid.setLayout(new BorderLayout());\n mainGrid.setName(\"jpacman.topdown\");\n mainGrid.add(points, BorderLayout.NORTH);\n mainGrid.add(boardView, BorderLayout.CENTER);\n mainGrid.add(buttonPanel, BorderLayout.SOUTH);\n\n getContentPane().add(mainGrid);\n\n int width = Math.max(boardView.windowWidth(), buttonPanel.getWidth());\n int height = boardView.windowHeight() + buttonPanel.getHeight();\n setSize(width, height);\n setGridSize();\n\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n setName(\"jpacman.main\");\n setTitle(\"JPacman\");\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 }", "private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \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 void createComponents() {\n view = new JPanel(new GridBagLayout());\n\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 1;\n constraints.fill = GridBagConstraints.BOTH;\n\n view.add(new JPanel(), constraints);\n\n constraints.gridy = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 1;\n constraints.weighty = 4;\n constraints.weightx = 6;\n view.add(renderMain(), constraints);\n\n constraints.gridx = 2;\n constraints.weightx = 1;\n constraints.weighty = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 0;\n constraints.gridy = 2;\n view.add(renderBottom(), constraints);\n\n registerEvents();\n }", "private JPanel topPanel()\r\n\t{\r\n\t\tJPanel top = new JPanel();\r\n\t\ttop.setLayout(new GridLayout(0,1));\r\n\t\ttop.add(input);\r\n\t\t//top.add(submit);\r\n\t\treturn top;\r\n\t}", "public void addToJPanel() {\r\n\t\tedit_terrain.add(header);\r\n\t\tJLabel blank1 = new JLabel(\"\");\r\n\t\tedit_terrain.add(blank1);\r\n\t\t\r\n\t\tedit_terrain.add(add_terrain);\r\n\t\tJLabel blank2 = new JLabel(\"\");\r\n\t\tedit_terrain.add(blank2);\r\n\t\t\r\n\t\tedit_terrain.add(scale_lb);\r\n\t\tedit_terrain.add(scale);\r\n\t\t\r\n\t\tedit_terrain.add(shape_lb);\r\n\t\tedit_terrain.add(shape_cb);\r\n\t\t\r\n\t\tedit_terrain.add(material_lb);\r\n\t\tedit_terrain.add(material_cb);\r\n\t\t\r\n\t\tedit_terrain.add(colour_lb);\r\n\t\tedit_terrain.add(colour_cb);\r\n\t\t\r\n\t\tedit_terrain.add(position_x_lb);\r\n\t\tedit_terrain.add(position_x);\r\n\t\t\r\n\t\tedit_terrain.add(position_y_lb);\r\n\t\tedit_terrain.add(position_y);\r\n\t\t\r\n\t\tedit_terrain.add(apply_terrain);\r\n\t\tedit_terrain.add(reset_terrain);\r\n\t\t\r\n\t\tsetAllFont();\r\n\t}", "private void initComponents() {\r\n\r\n \tholdPanel = new HoldPanel(getBackground());\r\n \tnextPanel = new NextPanel(getBackground());\r\n linesPanel = new LinesPanel(getBackground());\r\n levelPanel = new LevelPanel(getBackground());\r\n scorePanel = new ScorePanel(getBackground());\r\n statisticsPanel = new StatisticsPanel(getBackground());\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n setBackground(new java.awt.Color(0, 0, 0));\r\n \r\n paintPanel.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)));\r\n\r\n// javax.swing.GroupLayout paintPanelLayout = new javax.swing.GroupLayout(paintPanel);\r\n// paintPanel.setLayout(paintPanelLayout);\r\n// paintPanelLayout.setHorizontalGroup(\r\n// paintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n// .addGap(0, 0, Short.MAX_VALUE)\r\n// );\r\n// paintPanelLayout.setVerticalGroup(\r\n// paintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n// .addGap(0, 400, Short.MAX_VALUE)\r\n// );\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(layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(statisticsPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(holdPanel, javax.swing.GroupLayout.Alignment.TRAILING, 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(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(linesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\r\n .addComponent(paintPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(scorePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(nextPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(levelPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(linesPanel, 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(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(holdPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(statisticsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(scorePanel, 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 .addComponent(nextPanel, 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 .addComponent(levelPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(paintPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }", "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 void setupGUI(){\r\n\t\t\r\n\t\tfinal GUIFactory guifactory = GUIFactory.instance();\r\n\t\tfinal MTApplication app = (MTApplication)item.getView().getRenderer();\r\n\t\tfinal float leftiness = app.getWidth()*5/6;\r\n\t\tfinal float xPos = leftiness + 5;\r\n\t\t\r\n\t\t\r\n\t\toverlay = new MTOverlayContainer( app);\r\n\t\titem.getView().getRoot().addChild( overlay);\r\n\t\t\r\n\t\t// _THE_ PANEL \r\n\t\t\r\n\t\tpnlPanel = guifactory.createPanel( leftiness, 0, app.getWidth()-leftiness, app.getHeight(),\"pnlPanel\", overlay);\t\t\t\r\n\t\t\r\n\t\t// INTERACTION PANEL\r\n\t\t\r\n\t\tpnlInteraction = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlInteraction\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlInteraction.setNoFill( true);\r\n\t\t\r\n\t\t// EDIT PANEL\r\n\t\t\r\n\t\tpnlEdit = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlEdit\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlEdit.setVisible( false);\r\n\t\tpnlEdit.setNoFill( true);\r\n\t\t\r\n\t\t\r\n\t\t// ITEM NAME TEXTAREA\r\n\t\t\r\n\t\tString itemName = item.getName();\r\n\t\tif(itemName == null || itemName.equals( \"\"))\r\n\t\t\titemName = item.getID();\r\n\t\ttxtItemName = guifactory.createTextArea(itemName, \"txtItemName\", pnlPanel);\r\n\t\ttxtItemName.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getY() + 10\t\r\n\t\t\t\t));\r\n\r\n\r\n\t\t// PANEL PICTURE\r\n\r\n\t\tVector3D pnlInteractionPos = pnlInteraction.getPosition( TransformSpace.GLOBAL);\r\n\t\tpnlPicture = guifactory.createPanel( pnlInteractionPos.getX()+50, pnlInteractionPos.getY()+50, 100, 100, \"pnlPicture\", pnlInteraction);\r\n\t\tpnlPicture.setAnchor( PositionAnchor.CENTER);\r\n\t\tpnlPicture.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\tpnlInteractionPos.getX() + pnlInteraction.getWidthXY( TransformSpace.GLOBAL)/2,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 50 + pnlPicture.getHeightXY( TransformSpace.GLOBAL)/2\r\n\t\t\t\t));\r\n\t\tpnlPicture.setTexture( GUITextures.instance().getByDevice( DeviceType.getDeviceType( device)));\r\n\t\t\r\n\t\t\r\n\t\t// POWER USAGE TEXTAREA\r\n\t\t\r\n\t\tString powerUsage = \"n/a\";\r\n\t\tif( device.getPowerUsage() != null && device.getPowerUsage().getValue() != null){\r\n\t\t\tpowerUsage = device.getPowerUsage().getValue().toString();\r\n\t\t}\r\n\t\t\r\n\t\ttxtPowerUsage = guifactory.createTextArea( \"Power usage: \" + powerUsage + \" Watts\", \"txtPowerUsage\", pnlInteraction);\r\n\t\ttxtPowerUsage.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 140\t\t\r\n\t\t\t\t\t\t));\r\n\t\ttxtPowerUsage.setVisible( false);\r\n\t\t\r\n\t\t\r\n\t\t// ON/OFF BUTTON\r\n\t\t\r\n\t\tbtnOnOff = guifactory.createButton( \"Turn device On/Off\", \"btnOnOff\", pnlInteraction);\r\n\t\tbtnOnOff.setPosition( txtPowerUsage.getPosition( TransformSpace.GLOBAL));\r\n\t\tbtnOnOff.addGestureListener( TapProcessor.class, new BtnOnOffListener());\r\n\t\t\r\n\t\t\r\n\t\t// SUBDEVICE BUTTON PANEL\r\n\t\t\r\n\t\tpnlSubDeviceButtons = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getX(),\r\n\t\t\t\tbtnOnOff.getVectorNextToComponent( 10, false).getY(),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tdevice.getSubDevice().size() * (btnOnOff.getHeight()+10),\r\n\t\t\t\t\"pnlSubDeviceButtons\",\r\n\t\t\t\tpnlInteraction);\r\n\t\t\r\n\t\t// SUB DEVICE BUTTONS\r\n\t\t\r\n\t\tsubDeviceButtons = new LinkedList<MTButton>();\r\n\t\tfor( int i = 0; i < device.getSubDevice().size(); i++){\r\n\t\t\t\r\n\t\t\tPhysicalDevice subDevice = device.getSubDevice().get( i);\r\n\t\t\t\r\n\t\t\t// get button's caption\r\n\t\t\tString caption = subDevice.getName();\r\n\t\t\tif(caption == null || caption.equals( \"\"))\r\n\t\t\t\tcaption = subDevice.getId();\r\n\t\t\t\r\n\t\t\tMTButton btnSubDevice = guifactory.createButton( caption, \"btnSubDevice_\" + subDevice.getId(), pnlSubDeviceButtons);\r\n\t\t\tbtnSubDevice.setPosition(\r\n\t\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\t\r\n\t\t\t\t\t\tpnlSubDeviceButtons.getPosition( TransformSpace.GLOBAL).getY() + i*(btnSubDevice.getHeight() + 10)\r\n\t\t\t\t\t));\r\n\t\t\t\r\n\t\t\tsubDeviceButtons.add( btnSubDevice);\r\n\t\t\tbtnSubDevice.addGestureListener( TapProcessor.class, new BtnSubDeviceListener( subDevice));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// EDIT BUTTON\r\n\t\t\r\n\t\tbtnEdit = guifactory.createButton( \"Edit\", \"btnEdit\", pnlInteraction);\r\n\t\tbtnEdit.setPosition( new Vector3D( xPos, app.getHeight() - 2*btnEdit.getHeight() - 30));\r\n\t\tbtnEdit.addGestureListener( TapProcessor.class, new BtnEditListener());\r\n\t\t\r\n\t\t\r\n\t\t// BUTTON HIDE\r\n\t\t\r\n\t\tbtnHide = guifactory.createButton( \"Hide menu\", \"btnHide\", pnlPanel);\r\n\t\tbtnHide.setPosition( new Vector3D( xPos, app.getHeight() - btnHide.getHeight() - 20));\r\n\t\tbtnHide.addGestureListener( TapProcessor.class, new BtnHideListener());\r\n\t\t\r\n\t\t\r\n\t\t///// EDIT-ELEMENTS /////\r\n\r\n\t\tchkMovePlanar = guifactory.createCheckButton( \"Move planar\", \"chkMovePlanar\", pnlEdit);\r\n\t\tchkMovePlanar.setPosition(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\ttxtItemName.getPosition( TransformSpace.GLOBAL).getY() + txtItemName.getHeightXY( TransformSpace.GLOBAL)+ 20\t\r\n\t\t\t\t));\r\n\t\tchkMovePlanar.addGestureListener( TapProcessor.class, new ChkMovePlanarListener());\r\n\r\n\t\t\r\n\t\tchkMoveY = guifactory.createCheckButton( \"Move up/down\", \"chkMoveY\", pnlEdit);\r\n\t\tchkMoveY.setPosition( chkMovePlanar.getVectorNextToComponent( 10, false));\r\n\t\tchkMoveY.addGestureListener( TapProcessor.class, new ChkMoveYListener());\r\n\r\n\t\t\r\n\t\tchkRotate = guifactory.createCheckButton( \"Rotate\", \"chkRotate\", pnlEdit);\r\n\t\tchkRotate.setPosition( chkMoveY.getVectorNextToComponent( 10, false));\r\n\t\tchkRotate.addGestureListener( TapProcessor.class, new ChkRotateListener());\r\n\r\n\t\t\r\n\t\tchkScale = guifactory.createCheckButton( \"Scale\", \"chkScale\", pnlEdit);\r\n\t\tchkScale.setPosition( chkRotate.getVectorNextToComponent( 10, false));\r\n\t\tchkScale.addGestureListener( TapProcessor.class, new ChkScaleListener());\r\n\r\n\t\t\r\n\t\tbtnChangeVisualisation = guifactory.createButton( \"Change Style\", \"btnChangeVisualisation\", pnlEdit);\r\n\t\tbtnChangeVisualisation.setPosition( chkScale.getVectorNextToComponent( 10, false));\r\n\t\tbtnChangeVisualisation.addGestureListener( TapProcessor.class, new BtnChangeVisualisationListener());\r\n\t\t\r\n\t\t\r\n\t\tbtnSave = guifactory.createButton( \"Save\", \"btnSave\", pnlEdit);\r\n\t\tbtnSave.setPosition( btnEdit.getPosition());\r\n\t\tbtnSave.addGestureListener( TapProcessor.class, new BtnSaveListener());\r\n\t}", "private void addPanelstoBookPanel() {\r\n this.add(centerPanel, BorderLayout.CENTER);\r\n\r\n /**\r\n * Add the bookPanel to the baseScreen en revalidate and repaint\r\n */\r\n Main.getController().getBaseScreen().mainContainer.add(this, BorderLayout.CENTER);\r\n Main.getController().getBaseScreen().mainContainer.revalidate();\r\n Main.getController().getBaseScreen().mainContainer.repaint();\r\n }", "private void createManualJPanel() {\r\n createJPanelWithManual();\r\n JFrame frame = new JFrame();\r\n customizeFrame(frame);\r\n }", "public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }", "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "public void addComponentsToPanel() {\n\t\tpanel.add(backBtn);\n\t\tpanel.add(forgotPassword);\n\t\tpanel.add(txtPass);\n\t\tpanel.add(txtSendEmail);\n\t\tpanel.add(remindMeBtn);\n\n\t\tpanel.add(backgroundLabel);\n\t}", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "public UI() {\r\n\t\tsetPreferredSize(new Dimension(1100, 720));\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(chatPanel(), BorderLayout.CENTER);\r\n\t\tadd(serverPanel(), BorderLayout.EAST);\r\n\t\taddListeners();\r\n\t}", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tthis.add(firstButton);\n\t\tthis.add(firstField);\n\t}", "private void showContent(){\n\t\tLayoutManager overlay = new OverlayLayout(this);\n\t\tsetLayout(overlay);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tBorderLayout layout = new BorderLayout();\n\t\tlayout.setHgap(10);\n\t layout.setVgap(10);\n\t\tpanel.setLayout(layout); \n\t\tpanel.setBorder(new EmptyBorder(new Insets(20,50,20,50)));\n\t\tpanel.setOpaque(false);\n\t\tadd(panel);\n\t\t\n\t /*\n\t * Top Panel of the Game Screen\n\t * Buttons: back to home, suspend, quit and restart\n\t */\n\t JPanel controlPanel = new JPanel();\n\t controlPanel.setLayout(new GridLayout(1,4, 1, 1));\n\t\tcontrolPanel.setOpaque(false);\n\t\tpanel.add(controlPanel, BorderLayout.NORTH);\n\t\t\n\t\tIcon back = new ImageIcon(\"assets/back.jpg\");\n\t\tJButton btnBack = new JButton(back);\n\t\tbtnBack.setOpaque(false);\n\t\tbtnBack.setContentAreaFilled(false);\n\t\tbtnBack.setBorderPainted(false);\n\t\tbtnBack.setFocusPainted(false);\n\t\tbtnBack.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tgsPcs.firePropertyChange(\"exit\", null, null);\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnBack);\n\t\tcontrolPanel.add(new JLabel(\"\"));\n\t\t//controlPanel.add(new JLabel(\"\"));\n\t\t\n\t\tIcon restart = new ImageIcon(\"assets/restart.jpg\");\n\t\tJButton btnRestart = new JButton(restart);\n\t\tbtnRestart.setOpaque(false);\n\t\tbtnRestart.setContentAreaFilled(false);\n\t\tbtnRestart.setBorderPainted(false);\n\t\tbtnRestart.setFocusPainted(false);\n\t\tbtnRestart.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tmazeSession.resetSession();\n\t\t\t\trepaint();\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnRestart);\n\n\t\tIcon exit = new ImageIcon(\"assets/exit.jpg\");\n\t\tJButton btnQuit = new JButton(exit);\n\t\tbtnQuit.setOpaque(false);\n\t\tbtnQuit.setContentAreaFilled(false);\n\t\tbtnQuit.setBorderPainted(false);\n\t\tbtnQuit.setFocusPainted(false);\n\t\tbtnQuit.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif(showConfirmExit() == JOptionPane.OK_OPTION){\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic int showConfirmExit(){\n\t\t return JOptionPane.showConfirmDialog(null,\"Are you sure?\",\"Yes\",JOptionPane.OK_CANCEL_OPTION);\n\t\t \n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnQuit);\n\t\t\n\t\tthis.mazeDrawer.setOpaque(false);\n\t\tthis.mazeDrawer.setPreferredSize(new Dimension(150, 150));\n\t\tpanel.add(this.mazeDrawer, BorderLayout.CENTER);\n\t\t\n\t\t/*\n\t\t * Bottom Panel of the Game Screen\n\t\t * Contains music slider and game score \n\t\t */\n\t\tJPanel bottomPanel = new JPanel();\n\t\tbottomPanel.setOpaque(false);\n\t\tFlowLayout layout1 = new FlowLayout();\n\t layout1.setHgap(10); \n\t bottomPanel.setLayout(layout1);\n\t\tpanel.add(bottomPanel, BorderLayout.SOUTH);\n\t\t\n\t\tJLabel lblCourseID = new JLabel(\"Course ID: \");\n\t\tlblCourseID.setForeground(Color.WHITE);\n\t\tlblCourseID.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tbottomPanel.add(lblCourseID);\n\t\tJLabel courseID = new JLabel (mazeSession.getCourseID());\n\t\tcourseID.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tcourseID.setForeground(Color.WHITE);\n\t\tbottomPanel.add(courseID);\n\t\t\n\t\tJLabel lblScore = new JLabel(\"\\t\\t\\t\\t\\t\\t\\tScore:\");\n\t\tlblScore.setForeground(Color.WHITE);\n\t\tlblScore.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tthis.scoreLabel = new JLabel(Integer.toString(this.mazeSession.getScore()));\n\t\tscoreLabel.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tscoreLabel.setForeground(Color.WHITE);\n\t\tbottomPanel.add(lblScore);\n\t\tbottomPanel.add(this.scoreLabel);\n\t\t\n\t\t// background image\n\t\tImagePanel image = new ImagePanel(\n\t\t\tnew ImageIcon(\"assets/forest2.png\").getImage());\n\t\tadd(image);\n\t}", "public void InitializeComponents(){\n\n\n screen = new JPanel();\n screen.setLayout(null);\n screen.setBackground(Color.BLUE);\n this.getContentPane().add(screen);\n ScreenComps();\n\n }", "public JComponent createTopPanel() {\n\n\t//\tcontent();\n\t\tfields = new JTextField[NBR_FIELDS];\n\t\tmyTable = new PalletTable(db);\n\t\ttable = new JTable(myTable);\n\t\ttable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n\t\ttable.setPreferredScrollableViewportSize(new Dimension(750, 100));\n table.setFillsViewportHeight(true);\n\t\tscroll = new JScrollPane(table);\n\t//\tcontent();\n\t\tmainPanel= new JPanel();\n\t\tmainPanel.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.gridy=0;\n\t\tmainPanel.add(scroll,c);\n\t\tc.gridy=1;\n\t\tmainPanel.add(content(),c);\n\t\t//scroll.setPreferredSize(new Dimension(300,250));\n\t\treturn mainPanel;\n\t}", "private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}", "private void initComponents() {\n\n scenePanel = new javax.swing.JPanel();\n\n setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.PAGE_AXIS));\n\n scenePanel.setLayout(new javax.swing.BoxLayout(scenePanel, javax.swing.BoxLayout.LINE_AXIS));\n add(scenePanel);\n }", "private void setupUI() {\r\n\t\tWindow.setTitle(\"Battle\");\r\n\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\tpanel.addStyleName(NAME);\r\n\t\tinitWidget(panel);\r\n\t\t\r\n\t\tlabelTitle = new Label(\"Battle\");\r\n\t\tlabelTitle.addStyleName(Styles.page_title);\r\n\t\tpanel.add(labelTitle);\r\n\t\t\r\n\t\tLabel instructions = new Label(\"Click to go!\");\r\n\t\tpanel.add(instructions);\r\n\r\n\t\tHorizontalPanel hPanel = new HorizontalPanel();\r\n\t\tpanel.add(hPanel);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\thPanel.add(canvas);\r\n\r\n\t\tVerticalPanel vPanelInfo = new VerticalPanel();\r\n\t\thPanel.add(vPanelInfo);\r\n\t\t\r\n\t\tlabelInfo = new Label();\r\n\t\tlabelInfo.addStyleName(Styles.battle_info);\r\n\t\tvPanelInfo.add(labelInfo);\r\n\t\t\r\n\t\tvPanelInfoHistory = new VerticalPanel();\r\n\t\tvPanelInfoHistory.addStyleName(Styles.battle_info_history);\r\n\t\tvPanelInfo.add(vPanelInfoHistory);\r\n\r\n\t\t\r\n\t\tcanvas.setWidth(width + \"px\");\r\n\t\tcanvas.setHeight(height + \"px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(width);\r\n\t\tcanvas.setCoordinateSpaceHeight(height);\r\n\r\n\t\t//Adding handlers seems to create a performance issue in Java\r\n\t\t//mode, but likely not in javascript\r\n\t\tcanvas.addMouseDownHandler(this);\r\n//\t\tcanvas.addMouseUpHandler(this);\r\n//\t\tcanvas.addMouseMoveHandler(this);\r\n\r\n\t\tcontext2d = canvas.getContext2d();\r\n\r\n\t\tlastUpdate = System.currentTimeMillis();\r\n\t\ttimer = new Timer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\t\tupdate(now - lastUpdate);\r\n\t\t\t\tlastUpdate = now;\r\n\r\n\t\t\t\tdraw();\r\n\t\t\t}\r\n\t\t};\r\n\t\ttimer.scheduleRepeating(1000 / 60);\r\n\t}", "public RepalyPanel() {\n\t\t\ttry {\n//\t\t\t\tthis.addMouseListener(new MouseAdapter() {\n//\t\t\t\t\t@Override\n//\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n//\t\t\t\t\t\tSystem.out.println(e.getX() + \" \" + e.getY());\n//\t\t\t\t\t}\n//\t\t\t\t});\n\n\t\t\t\tsetLayout(null);\n\n\t\t\t\t// 退出按键\n\t\t\t\tjbRestart = MyButton.makeButton(restart, restart_down,\n\t\t\t\t\t\trestart_hover);\n\t\t\t\tadd(jbRestart);\n\t\t\t\tjbRestart.setBounds(540, 355, 140, 56);\n\t\t\t\tjbRestart.addActionListener(this);\n\n\t\t\t\t// 确认退出按键\n\t\t\t\tjbContinue = MyButton.makeButton(continue_pic, continue_down,\n\t\t\t\t\t\tcontinue_hover);\n\t\t\t\tadd(jbContinue);\n\t\t\t\tjbContinue.setBounds(345, 355, 140, 56);\n\t\t\t\tjbContinue.addActionListener(this);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "private void setupUI() {\n\t\tpanel1 = new JPanel();\n\t\tpanel1.setLayout(new BorderLayout(0, 0));\n\t\tfinal JPanel panel2 = new JPanel();\n\t\tpanel2.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2));\n\t\tpanel2.setBackground(Color.BLACK);\n\t\tpanel2.setPreferredSize(new Dimension(800, 34));\n\t\tpanel1.add(panel2, BorderLayout.SOUTH);\n\t\tstopButton = new JButton();\n\t\tstopButton.setText(\"STOP\");\n\t\tstopButton.setPreferredSize(new Dimension(82, 30));\n\t\tpanel2.add(stopButton);\n\t\tclsButton = new JButton();\n\t\tclsButton.setPreferredSize(new Dimension(82, 30));\n\t\tclsButton.setText(\"CLS\");\n\t\tpanel2.add(clsButton);\n\t\trunButton = new JButton();\n\t\trunButton.setPreferredSize(new Dimension(82, 30));\n\t\trunButton.setText(\"RUN\");\n\t\tpanel2.add(runButton);\n\t\tcaretLabel = new JLabel();\n\t\tcaretLabel.setPreferredSize(new Dimension(82, 30));\n\t\tcaretLabel.setForeground(Color.pink);\n\t\tpanel2.add(caretLabel);\n\t\tmainTextArea = new ShellTextComponent(this);\n\t\tmainTextArea.setCaretColor(new Color(Colors.COLORS[14]));\n\t\tfinal JScrollPane scrollPane1 = new JScrollPane(mainTextArea);\n\n\t\tpanel1.add(scrollPane1, BorderLayout.CENTER);\n\t\tpanel1.setPreferredSize(new Dimension(800, 600));\n\t}", "public GUI() {\n super(\"Day Planner\");\n setSize(465,550);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n addWindowListener(new CheckOnExit() {});\n basePanel = new JPanel(new CardLayout());\n init();\n \n \n basePanel.setVisible(true);\n add(basePanel);\n }", "public SudoFrame() {\n topPanel = new JTabbedPane();\n bottomPanel = new JPanel();\n bottomPanel.setOpaque(false);\n\n paintButton();\n paintSudo();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Soduku\");\n\n JPanel contentPaneBoss = new ContentPanel();\n this.setContentPane(contentPaneBoss);\n\n contentPaneBoss.setLayout(new BoxLayout(contentPaneBoss, BoxLayout.Y_AXIS));\n// contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(topPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(bottomPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n\n this.setBounds(900, 100, 450, 450);\n // this.pack();\n// this.setResizable(false);\n this.setVisible(true);\n }", "public BoardPanel() {\n\t\t\tfinal Dimension size = new Dimension(600, 600);\n\t\t\tsetSize(size);\n\t\t\tsetPreferredSize(size);\n\t\t\t\n\t\t\taddMouseListener(new ClickHandler());\n\t\t}", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "private void addPanels() {\n\t\tthis.add(dicePanel, BorderLayout.WEST);\n\t\tthis.add(inputPanel, BorderLayout.CENTER);\n\t\tthis.add(infoPanel, BorderLayout.SOUTH);\n\t}", "public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }", "public JPanel menuPanel() {\n\t\tJPanel mpanel = new JPanel(null);\n\t\tmpanel.setBounds(0, 100, 700, 300);\n\t\tmpanel.setBackground(Color.PINK);\n\t\tFont lblfont = new Font(\"SansSerif\", Font.BOLD, 30);\n\t\t\n\t\tworkerBtn = new JButton(workerpic);\n\t\tvisitorBtn = new JButton(visitorpic);\n\t\tworkerBtn.addActionListener(this);\n\t\tvisitorBtn.addActionListener(this);\n\t\tvisitorBtn.setBounds(100, 50, 150, 200);\n\t\tworkerBtn.setBounds(450, 50, 150, 200);\n\t\t\n\t\tlblworker.setBounds(450, 0, 150, 50);\n\t\tlblvisitor.setBounds(100, 0, 150, 50);\n\t\tlblworker.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblvisitor.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblworker.setFont(lblfont);\n\t\tlblvisitor.setFont(lblfont);\n\t\tmpanel.add(lblworker);\n\t\tmpanel.add(lblvisitor);\n\t\tmpanel.add(visitorBtn);\n\t\tmpanel.add(workerBtn);\n\t\treturn mpanel;\n\t}", "public IsingPlotController(){\n\t\tfullPanel = new JPanel();\n\t\tfullPanel.setLayout(new BorderLayout());\n\t\t\n\t\tJPanel headerPanel = new JPanel();\n\t\theaderPanel.setLayout(new BorderLayout());\n\t\theaderPanel.setBackground(Color.white);\n\t\tbackButton = new JButton(\"Back\");\n\t\theaderPanel.add(backButton,BorderLayout.WEST);\n\t\t\n\t\tthis.view = new ImagePanel();\n\t\t\n\t\tfullPanel.add(headerPanel,BorderLayout.NORTH);\n\t\tfullPanel.add(view);\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 $$$setupUI$$$() {\r\n panel1 = new BackGroundPanel();\r\n panel1.setOpaque(false);\r\n panel1.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n final Spacer spacer1 = new Spacer();\r\n panel1.add(spacer1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n textPane1 = new JTextArea();\r\n textPane1.setFont(new Font(\"HGMinchoL\", textPane1.getFont().getStyle(), 22));\r\n textPane1.setText(\"\");\r\n textPane1.setEditable(false);\r\n textPane1.setOpaque(false);\r\n panel1.add(textPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"Answer:\");\r\n panel1.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n textField1 = new JTextField();\r\n panel1.add(textField1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SWINGButton = createButton(\"bat\", \"SWING!\");\r\n //SWINGButton.setText(\"SWING\");\r\n panel1.add(SWINGButton, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n formattedTextField1 = new JFormattedTextField();\r\n formattedTextField1.setEditable(false);\r\n formattedTextField1.setFont(new Font(\"HGMinchol\", formattedTextField1.getFont().getStyle(), 22));\r\n panel1.add(formattedTextField1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n }", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new BorderLayout(0, 0));\n }", "public NewJPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "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}", "public OrderPanel() {\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tsetBounds(100, 100, 800, 600);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tcontentPane.setLayout(new BorderLayout(0, 0));\n\t\tsetContentPane(contentPane);\n\t\t\n\t\tpanel = new JPanel();\n\t\tpanel.setBounds(0, 0, 800, 600);\n\t\tcontentPane.add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tthis.initDisplayPanel();\n\t\tthis.initFields();\n\t\tpanel.setVisible(true);\n\t\t\n\t}", "private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n }", "private void setUpPanel() { \n this.setPreferredSize(new Dimension(myWidth, myHeight)); \n // Set this panel as a grid panel with 1 column, 6 rows. \n this.setLayout(new GridLayout(NUM_ROWS, 1)); \n // Create the next piece panel.\n this.myNextPiece = new TetrisNextPiecePanel();\n this.add(myNextPiece); \n // Add another panel which will show game instruction.\n final HowToPlayPanel instructionsPanel = new HowToPlayPanel();\n this.add(instructionsPanel);\n // add the last panel which will show the scores, level, game state etc.\n this.setUpLastPanel();\n }", "public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private void setupPanels() {\n\t\tsplitPanel.addEast(east, Window.getClientWidth() / 5);\n\t\tsplitPanel.add(battleMatCanvasPanel);\n\t\tpanelsSetup = true;\n\t}", "private void createBottomPanel() {\n humanPaquetView = new ViewDeckVisible(false);\n this.getContentPane().add(humanPaquetView);\n }", "private JPanel buildContentPane(){\t\n\t\tinitialiseElements();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new FlowLayout());\n\t\tpanel.setBackground(Color.lightGray);\n\t\tpanel.add(scroll);\n\t\tpanel.add(bouton);\n\t\tpanel.add(bouton2);\n\t\treturn panel;\n\t}", "private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "private void geometry()\n\t\t{\n\t\t// JComponent : Instanciation\n\t\tpanel = new JPanelVideo(video);\n\t\t// Layout : Specification\n\t\t\t{\n\t\t\tBorderLayout borderLayout = new BorderLayout();\n\t\t\tsetLayout(borderLayout);\n\n\t\t\t// borderLayout.setHgap(20);\n\t\t\t// borderLayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tadd(panel);\n\t\t}", "public void manageComponent() {\n menu = new JMenuBar();\n mainbox = new JScrollPane();\n toolbox = new JPanel();\n paintBox = new JPanel();\n optionbox = new JPanel();\n statusbar = new JPanel();\n paintModule = new PaintModule();\n\n // component setting\n createToolBox(toolbox);\n createMenu(menu);\n createOptionBox(optionbox);\n createStatusBar(statusbar);\n this.setLayout(new BorderLayout());\n\n // add component to container\n paintBox.add(paintModule);\n mainbox.setViewportView(paintBox);\n\n\n this.add(menu, BorderLayout.NORTH);\n this.add(mainbox, BorderLayout.CENTER);\n this.add(toolbox, BorderLayout.WEST);\n this.add(optionbox, BorderLayout.EAST);\n this.add(statusbar, BorderLayout.SOUTH);\n\n }", "@Override\n public final void initGui() {\n \tKeyboard.enableRepeatEvents(true);\n\t\t\n \tif(components == null) {\n \t\tcomponents = Lists.newArrayList();\n \t\t\n \t\ttry {\n \t\t\tbuildGui();\n \t\t} catch(Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n \t\n \t// XXX: Untested. Might lead to crash. Leaving it in for now.\n \tif(this.behindScreen != null) {\n \t\tthis.behindScreen.width = this.width;\n \t\tthis.behindScreen.height = this.height;\n \t\tthis.behindScreen.initGui();\n \t}\n \t\n \tlayoutGui();\n }", "protected void createContents() {\n\t\tMonitor primary = this.getDisplay().getPrimaryMonitor();\n\t\tRectangle bounds = primary.getBounds();\n\t\tRectangle rect = getBounds();\n\t\tint x = bounds.x + (bounds.width - rect.width) / 2;\n\t\tint y = bounds.y + (bounds.height - rect.height) / 2;\n\t\tsetLocation(x, y);\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 static void createAndShowUI(){\n JFrame frame = new JFrame(\"TargetTest\");\n TargetTest test = new TargetTest();\n frame.setLayout(new FlowLayout());\n frame.getContentPane().add(test.getMainPanel());\n //frame.getContentPane().add(test.getControlsPanel());\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n frame.pack();\n\n frame.setLocationRelativeTo(null);\n\n frame.setVisible(true);\n}", "private void setupLayout() {\r\n\t\tgetContentPane().add(panel);\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 BoardGUI()\n {\n setBackground(Color.GRAY);\n setLayout(null);\n }", "private void buildGUI() throws IOException {\n jPanel = new JPanel() {\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(img2, 0, 0, null);\n }\n };\n jPanel.setVisible(true);\n jPanel.setLayout(null);\n jPanel.getAutoscrolls();\n jPanel.setBounds(100, 0, screenResolution.getWidth() - 100, screenResolution.getHeight());\n this.add(jPanel);\n\n buildJPanelSide();\n chatGUI();\n\n this.validate();\n this.repaint();\n }", "UserLoginPanel() {\n\t\tJPanel myPanel = new MyPanel();\n\t\tJPanel feedbackPanel = new FeedbackPanel();\n\n\t\tthis.setLayout(new GridLayout(3, 1));\n\t\tthis.add(feedbackPanel);\n\t\tthis.add(myPanel);\n\t\tthis.add(new JPanel());\n\n\t\tthis.setVisible(true);\n\t}", "private void startPanel() {\n this.setLayout(null);\n this.setBounds(0, 0, DoggyDayCareGui.WIDTH, DoggyDayCareGui.HEIGHT);\n JLabel title = new JLabel(\"Please Enter Your Dog's Information:\");\n title.setFont(new Font(\"Calibri\", Font.BOLD, 20));\n title.setBounds(90,20,400, 100);\n this.add(title);\n JLabel weightHeadsUp = new JLabel(\"Please be careful with your weight input from 0 to 200\");\n weightHeadsUp.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n weightHeadsUp.setBounds(90,90,400, 100);\n this.add(weightHeadsUp);\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 RoundPanelOJ() {\n initComponents();\n setOpaque(false);\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 }", "private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}", "public void displayComponent() {\n menuPanel = new InGameMenuPanel();\n objPanel = new ObjectivePanel();\n\n objButtonPanel = new JPanel();\n optionButtonPanel = new JPanel();\n menuButtonPanel = new JPanel();\n endTurnButtonPanel = new JPanel();\n chatContainPanel = new JPanel();\n chatFieldPanel = new JPanel();\n chatDisplayFieldPanel = new JPanel();\n chatTypeSelectionPanel = new JPanel();\n chatTextFieldPanel = new JPanel();\n\n chatContainPanel.setLayout(null);\n chatTextFieldPanel.setLayout(null);\n chatFieldPanel.setLayout(null);\n chatDisplayFieldPanel.setLayout(null);\n setLayout(new BorderLayout());\n\n //chat panel\n chatField = new JTextField(100);\n chatType = new JComboBox(chatTypeName);\n displayChatArea = new JTextArea();\n displayChatArea.setLineWrap(true);\n displayChatArea.setWrapStyleWord(true);\n displayChatArea.setEditable(false);\n chatScrollPane = new JScrollPane(displayChatArea);\n chatScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n chatContainPanel.setPreferredSize(new Dimension(getWidth(), 130));\n chatFieldPanel.setBounds(0, 90, 600, 45);\n chatDisplayFieldPanel.setBounds(0, 0, 585, 90);\n chatScrollPane.setBounds(0, 0, 585, 90);\n chatTypeSelectionPanel.setBounds(0, 5, 80, 45);\n chatTextFieldPanel.setBounds(85, 0, 500, 40);\n chatField.setBounds(0, 5, 500, 30);\n\n chatContainPanel.setOpaque(false);\n chatFieldPanel.setOpaque(false);\n chatDisplayFieldPanel.setOpaque(false);\n chatTextFieldPanel.setOpaque(false);\n chatTypeSelectionPanel.setOpaque(false);\n\n checkBoolean = true;\n\n //display the panel and paint the cover\n rightPanel = new JPanel() {\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(rightCover.getImage(), 0, 0, getWidth(), getHeight(), null);\n g.drawImage(objButtonIcon.getImage(), 8, 8, null); // paint the objective button icon\n g.drawImage(optionButtonIcon.getImage(), 56, 7, null); // paint the option button\n g.drawImage(menuButtonIcon.getImage(), 105, 7, null); // paint the menu button\n g.drawImage(endTurnButtonIcon.getImage(), 153, 11, null); //paint the end turn button\n g.drawImage(teamLightIcon1.getImage(), 11, 178, null); //paint team light icon for decoration\n g.drawImage(teamLightIcon2.getImage(), 161, 177, null); //paint team light icon for decoration\n }\n };\n\n rightPanel.setPreferredSize(new Dimension(200, 720));\n rightPanel.setLayout(null);\n\n //objective button configuration\n objButtonPanel.setBounds(8, 8, objButtonIcon.getIconWidth(), objButtonIcon.getIconHeight());\n objButtonPanel.setOpaque(false);\n\n //option button configuration\n optionButtonPanel.setBounds(56, 7, optionButtonIcon.getIconWidth(), optionButtonIcon.getIconHeight());\n optionButtonPanel.setOpaque(false);\n //if it's in the player turn, option button will available to press. the optionCheckBoolean will true as long as\n //it's a player turn or a button others than end turn has not been pressed.\n\n //menu button configuration\n menuButtonPanel.setBounds(105, 7, menuButtonIcon.getIconWidth(), menuButtonIcon.getIconHeight());\n menuButtonPanel.setOpaque(false);\n //if it's in the player turn, menu button will available to press. the menuButtonCheckBoolean will true as long as\n //it's a player turn or a button others than end turn has not been pressed.\n\n //end turn button configuration\n endTurnButtonPanel.setBounds(153, 11, endTurnButtonIcon.getIconWidth(), endTurnButtonIcon.getIconHeight());\n endTurnButtonPanel.setOpaque(false);\n //if it's in the player turn, end turn will available to press. the end turn boolean will true as long as\n //it's a player turn or a button others than end turn has not been pressed.\n\n\n //add the button panel\n rightPanel.add(objButtonPanel);\n rightPanel.add(optionButtonPanel);\n rightPanel.add(menuButtonPanel);\n rightPanel.add(endTurnButtonPanel);\n\n //add chat to panel\n chatContainPanel.add(chatDisplayFieldPanel);\n chatContainPanel.add(chatFieldPanel);\n chatFieldPanel.add(chatTypeSelectionPanel);\n chatFieldPanel.add(chatTextFieldPanel);\n chatTypeSelectionPanel.add(chatType);\n chatTextFieldPanel.add(chatField);\n chatDisplayFieldPanel.add(chatScrollPane);\n\n //add the contain button panel in\n add(rightPanel, BorderLayout.EAST);\n add(chatContainPanel, BorderLayout.SOUTH);\n\n }", "public GamePanel() {\n this.setLayout(null);\n\n initializeStateLabel();\n\n initializePileLabel();\n\n initializeSetColorButton();\n\n initializeDrawButton();\n initializeHideButton();\n\n this.setVisible(true);\n }", "public LottoGUI() {\n\t\tsetTitle(\"CompSci Lotto\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 500, 300);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(Color.LIGHT_GRAY);\n\t\tcontentPane.setInheritsPopupMenu(true);\n\t\tcontentPane.setIgnoreRepaint(true);\n\t\tcontentPane.setForeground(Color.RED);\n\t\tcontentPane.setVisible(true); //<--------KEEP THIS SET TO TRUE\n\t\tcontentPane.setOpaque(false);\n\t\tcontentPane.setBorder(new EmptyBorder(1, 5, 1, 5));\n\t\tsetContentPane(contentPane);\t\t\n\n\t\t//3 JPanel variables for text at bottom, numbers & buttons\n\t\tJPanel panel_TextInfo = new JPanel(); //panel for text fields at bottom\n\t\tpanel_TextInfo.setBackground(Color.WHITE);\n\t\t\n\t\tJPanel panel_Numbers = new JPanel(); //panel for numbers\n\t\t\n\t\tJPanel panel_Buttons = new JPanel(); //panel for buttons\n\t\tpanel_Buttons.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\t\n\t\tgl_contentPane_1 = new GroupLayout(contentPane);\n\t\tgl_contentPane_1.setHorizontalGroup(\n\t\t\tgl_contentPane_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPane_1.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPane_1.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addComponent(panel_TextInfo, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(gl_contentPane_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(panel_Buttons, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(panel_Numbers, GroupLayout.PREFERRED_SIZE, 372, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t);\n\t\tgl_contentPane_1.setVerticalGroup(\n\t\t\tgl_contentPane_1.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPane_1.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPane_1.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t.addComponent(panel_Buttons, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(panel_Numbers, GroupLayout.DEFAULT_SIZE, 251, Short.MAX_VALUE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(panel_TextInfo, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(227))\n\t\t);\n\t\tpanel_Numbers.setLayout(null);\n\t\t\n\t\tnumbersPanel(panel_Numbers); //panel of number buttons\n\t\t\n\t\tbuttonsPanel(panel_Buttons); //panel of main colored buttons\n\t\t\n\t\ttextInfoBottom(panel_TextInfo); //info about current status\n\t\t\n\t\t\n\t}", "public JPanel createSouthPanel() {\n\t\tsouth = new JPanel(new GridLayout(1, 1));\n\t\t// adds start button and its functionality\n\t\tstartGame();\n\t\treturn south;\n\t}", "public UserInterfaceJFrame() {\n initComponents();\n jPanel1.add(new FeatureViewPanel());\n jPanel2.add(new DataVisualizationPanel());\n jPanel3.add(new DataParserPanel());\n }", "private void createGameGraphics() {\n\t\tgameGraphics=new JPanel();\n\t\tgameGraphics.setPreferredSize(new Dimension(width,height));\n\t\tgameGraphics.setFocusable(false);\n\t\tthis.add(gameGraphics,\"Center\");\n\t\tgameGraphics.setVisible(true);\n\t\tgameGraphics.setDoubleBuffered(true);\n\t\tgameGraphics.setIgnoreRepaint(true);\n\t}", "private Component doInit() {\n\t\tJXPanel panel = new JXPanel();\n\t\tpanel.setLayout(new BorderLayout());\n\n\t\t// create a label\n\t\tfinal JXLabel label = new JXLabel();\n\t\tlabel.setFont(new Font(\"Segoe UI\", Font.BOLD, 14));\n\t\tlabel.setText(\"task pane item 1 : a label\");\n\t\tlabel.setIcon(Images.NetworkDisconnected.getIcon(32, 32));\n\t\tlabel.setHorizontalAlignment(JXLabel.LEFT);\n\t\tlabel.setBackgroundPainter(getPainter());\n\n\t\t// tweak with the UI defaults for the taskpane and taskpanecontainer\n\t\tchangeUIdefaults();\n\n\t\t// create a taskpanecontainer\n\t\tJXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer();\n\n\t\t// create a taskpane, and set it's title and icon\n\t\tJXTaskPane taskpane = new JXTaskPane();\n\t\ttaskpane.setTitle(\"My Tasks\");\n\t\ttaskpane.setIcon(Images.Quit.getIcon(24, 24));\n\n\t\t// add various actions and components to the taskpane\n\t\ttaskpane.add(label);\n\t\ttaskpane.add(new AbstractAction() {\n\t\t\tprivate static final long serialVersionUID = -7314920635669764914L;\n\t\t\t{\n\t\t\t\tputValue(Action.NAME, \"task pane item 2 : an action\");\n\t\t\t\tputValue(Action.SHORT_DESCRIPTION, \"perform an action\");\n\t\t\t\tputValue(Action.SMALL_ICON,\n\t\t\t\t\t\tImages.NetworkConnected.getIcon(32, 32));\n\t\t\t}\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlabel.setText(\"an action performed\");\n\t\t\t}\n\t\t});\n\n\t\t// add the task pane to the taskpanecontainer\n\t\ttaskpanecontainer.add(taskpane);\n\n\t\t// set the transparency of the JXPanel to 50% transparent\n\t\tpanel.setAlpha(0.7f);\n\n\t\tpanel.add(taskpanecontainer, BorderLayout.CENTER);\n\t\tpanel.setPreferredSize(new Dimension(250, 200));\n\n\t\treturn panel;\n\t}", "private JPanel makeControlPanel() {\n\n final JPanel panel = new JPanel(new FlowLayout(3));\n final JButton refreshButton = new JButton(new ImageIcon(iconMaker(\"refreshREAL.png\")));\n refreshButton.setFocusPainted(false);\n refreshButton.addActionListener(this::refreshButtonClicked);\n refreshButton.setToolTipText(\"Refresh Item Price(s)\");\n //checkButton.setPreferredSize(new Dimension(25,25));\n JButton viewLink = new JButton(new ImageIcon(iconMaker(\"visitSite.png\")));\n viewLink.setToolTipText(\"Visit Item Website\");\n JButton deleteItem = new JButton(new ImageIcon(iconMaker(\"delete.png\")));\n deleteItem.setToolTipText(\"Remove Item\");\n JButton addItem = buttonMaker(\"additem.png\");\n addItem.setToolTipText(\"Add Item to Price Watcher\");\n JButton editItem = buttonMaker(\"edititem.png\");\n editItem.setToolTipText(\"Edit Item Details\");\n\n\n viewLink.setFocusPainted(false);\n deleteItem.setFocusPainted(false);\n\n viewLink.addActionListener(this::viewPageClicked);\n panel.add(refreshButton);\n panel.add(viewLink);\n panel.add(deleteItem);\n panel.add(addItem);\n panel.add(editItem);\n\n return panel;\n }", "private void init() {\n\t\treturnJPanel = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_return, 0, 0, d.width, d.height, null);\n\t\t\t}\n\t\t};\n\t\treturnJPanel.addMouseListener(new Click_return());\n\t\treturnJPanel.setOpaque(false);\n\t\t\n\t\tname = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_select, 0, 0, d.width, d.height, null);\n\t\t\t\t}\n\t\t};\n\t\tname.setOpaque(false);\n\t\t\n\t\tfree = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_free, 0, 0, d.width, d.height, null);\n\t\t\t}\n\t\t};\n\t\tfree.setOpaque(false);\n\t\tfree.addMouseListener(new Click_free());\n\n\t\t\n\t\ttopbar = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tg.drawImage(image_topbar, 0, 0, 960, 102, null);\n\t\t\t}\n\t\t};\n\t\ttopbar.setOpaque(false);\n\t\ttopbar.add(returnJPanel);\n\t\ttopbar.add(name);\n\t\t//topbar.add(free);\n\t\t//topbar.add(message);\n\t\tadd(topbar);\n\t\t\n\t\tmiddleBar = new JPanel();\n\t\tmiddleBar.setOpaque(false);\n\t\t\n\t\tmiddleLeft = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_tradition, 0, 0, d.width, d.height, null);\n\t\t\t}\n\t\t};\n\t\tmiddleLeft.setOpaque(false);\n\t\tmiddleLeft.addMouseListener(new Click_Classic());\n\t\t\n\t\tmiddleRight = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_laizi, 0, 0, d.width, d.height, null);\n\t\t\t}\n\t\t};\n\t\tmiddleRight.setOpaque(false);\n\n\t\tmiddleBar.add(middleLeft);\n\t\tmiddleBar.add(middleRight);\n\t\tadd(middleBar);\n\t\t\n\t\tbottomBar = new JPanel();\n\t\tbottomBar.setOpaque(false);\n\t\t\n\t\theadJPanel = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_head, 10, 10, (int)d.getWidth()-20, (int)d.getHeight()-20, null);\n\t\t\t\tg.drawImage(image_headframe, 0, 0, (int)d.getWidth(), (int)d.getHeight(), null);\n\t\t\t}\t\n\t\t};\n\t\theadJPanel.setOpaque(false);\n\t\theadJPanel.addMouseListener(new Click_mydata());\n\t\t\n\t\tuserMessage = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_headmessage, 0, 0, d.width, d.height, null);\n\t\t\t\tg.drawImage(image_beans, 20, 60, 44, 42, null);\n\t\t\t\t}\n\t\t};\n\t\tuserMessage.setOpaque(false);\n\t\t\n\t\thelp = new JPanel(){\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tDimension d = getSize();\n\t\t\t\tg.drawImage(image_help, 0, 0, d.width, d.height, null);\n\t\t\t\t}\n\t\t};\n\t\thelp.setOpaque(false);\n\t\thelp.addMouseListener(new Click_help());\n\t\t\n\t\tbottomBar.add(headJPanel);\n\t\tbottomBar.add(userMessage);\n\t\t//bottomBar.add(honor);\n\t\tbottomBar.add(free);\n\t\t//bottomBar.add(message);\n\t\tbottomBar.add(help);\n\t\tadd(bottomBar);\n\t\t\n\t}", "private JPanel buildTopPanel() {\n\t\tJPanel topPanel = new JPanel(new BorderLayout());\n\t\t\n\t\tJLabel titleLabel = new JLabel(\"Montessori Monkeys\");\n\t\ttitleLabel.setFont(Design.getSmallTitleFont());\n\t\ttitleLabel.setForeground(Design.getDarkGreen());\n\t\t\n\t\t//empty border around the title (top, left, bottom, right)\n\t\ttitleLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\t\t\t\t\n\t\tJLabel adminLogin = new JLabel(\"Admin Login\");\n\t\tadminLogin.setFont(Design.getBoldFont());\n\t\tadminLogin.setBorder(BorderFactory.createEmptyBorder(10, 30, 10, 10));\n\t\t\n\t\ttopPanel.add(titleLabel, BorderLayout.NORTH);\n\t\ttopPanel.add(adminLogin, BorderLayout.CENTER);\t\n\t\ttopPanel.setBackground(Design.getLightGreen());\n\t\t\n\t\treturn topPanel;\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 void createAndShowGUI() {\n\t\tJFrame frame = new JFrame(\"Pong\");\n\t\tframe.setResizable(false);\n\t\tframe.setVisible(true);\n\n\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tframe.add(board, BorderLayout.CENTER);\n\t\tframe.add(topPanel, BorderLayout.NORTH);\n\n\t\tframe.pack();\n\t}", "public void addToJPanel() {\r\n\t\tsave_objects.add(header);\r\n\t\tJLabel blank1 = new JLabel(\"\");\r\n\t\tsave_objects.add(blank1);\r\n\t\t\r\n\t\tsave_objects.add(title_lb);\r\n\t\tsave_objects.add(title);\r\n\t\t\r\n\t\tsave_objects.add(width_lb);\r\n\t\tsave_objects.add(width);\r\n\t\t\r\n\t\tsave_objects.add(height_lb);\r\n\t\tsave_objects.add(height);\r\n\t\t\r\n\t\tsave_objects.add(save);\r\n\t\tsave_objects.add(reset);\r\n\t\t\r\n\t\tsetAllFont();\r\n\t}", "private void controllersUI() {\n\t\tc.setLayout(null);\n\t\tc.setBackground(whiteColor);\n\t\t\n\t\tlbPullTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbPullTitle.setOpaque(true);\n\t\tlbPullTitle.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 18));\n\t\tlbPullTitle.setBounds(0, 0, 320, 52);\n\t\t\n\t\ttxtPulls.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 12));\n\t\ttxtPulls.setBounds(0, 52, 320, 420);\n\t\t\n\t\ttxtMsg.setBounds(10, 480, 230, 35);\n\t\tbtnMsg.setBounds(250, 476, 60, 40);\n\t\t\n\t\tc.add(txtPulls);\n\t\tc.add(lbPullTitle);\n\t\tc.add(btnMsg);\n\t\tc.add(txtMsg);\n\t\t\n\t\tbtnMsg.addActionListener(this);\n\t}", "private void initMainComponents() {\n\t\tsetBackground(Color.RED);\n\t\tsetTitle(\"TABL\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 974, 842);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(100, 149, 237));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\t\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\t\n\t\tlayeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(10, 40, 941, 757);\n\t\tcontentPane.add(layeredPane);\n\t\t\n\t\tsetForeground(Color.BLACK);\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(AdminManageUsers.class.getResource(\"/resources/Logo.PNG\")));\n\n\t}", "public GameWindow(){\n setSize(1012,785);\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n setLayout(null);\n\n JLabel sun = new JLabel(\"SUN\");\n sun.setLocation(37,80);\n sun.setSize(60,20);\n\n GamePanel gp = new GamePanel(sun);\n gp.setLocation(0,0);\n getLayeredPane().add(gp,new Integer(0));\n \n PlantCard sunflower = new PlantCard(new ImageIcon(this.getClass().getResource(\"images/cards/card_sunflower.png\")).getImage());\n sunflower.setLocation(110,8);\n sunflower.setAction((ActionEvent e) -> {\n gp.activePlantingBrush = PlantType.Sunflower;\n });\n getLayeredPane().add(sunflower,new Integer(3));\n\n PlantCard peashooter = new PlantCard(new ImageIcon(this.getClass().getResource(\"images/cards/card_peashooter.png\")).getImage());\n peashooter.setLocation(175,8);\n peashooter.setAction((ActionEvent e) -> {\n gp.activePlantingBrush = PlantType.Peashooter;\n });\n getLayeredPane().add(peashooter,new Integer(3));\n\n PlantCard freezepeashooter = new PlantCard(new ImageIcon(this.getClass().getResource(\"images/cards/card_freezepeashooter.png\")).getImage());\n freezepeashooter.setLocation(240,8);\n freezepeashooter.setAction((ActionEvent e) -> {\n gp.activePlantingBrush = PlantType.FreezePeashooter;\n });\n getLayeredPane().add(freezepeashooter,new Integer(3));\n\n\n\n getLayeredPane().add(sun,new Integer(2));\n setResizable(false);\n setVisible(true);\n }", "private void addComponents() {\r\n\t\t// initialize properties and add.\r\n\t\tthis.add(initializeChatArea(), BorderLayout.CENTER);\r\n\t\tthis.add(initializeSubPanel(), BorderLayout.SOUTH);\r\n\t}", "public HoaDonJPanel() {\n initComponents(); \n this.init();\n }", "private static void createAndShowGUI() {\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLayout(new BorderLayout());\r\n\r\n JPanel parametersPanel = new JPanel();\r\n parametersPanel.setPreferredSize(new Dimension(preferredWidth, 50));\r\n \r\n addComponentsToPane(parametersPanel);\r\n \r\n frame.add(parametersPanel, BorderLayout.PAGE_START);\r\n \r\n schedulePanel.add(monLabel);\r\n schedulePanel.add(tueLabel);\r\n schedulePanel.add(wedLabel);\r\n schedulePanel.add(thuLabel);\r\n schedulePanel.add(friLabel);\r\n schedulePanel.setPreferredSize(new Dimension(preferredWidth, 500));\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.setViewportView(schedulePanel);\r\n JPanel bigPanel = new JPanel(); \r\n bigPanel.setLayout(new BorderLayout());\r\n bigPanel.setPreferredSize(schedulePanel.getPreferredSize());\r\n bigPanel.add(scrollPane, BorderLayout.CENTER);\r\n frame.add(bigPanel, BorderLayout.CENTER);\r\n\r\n frame.setJMenuBar(createMenu());\r\n \r\n frame.pack();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n }", "public HomePanel()\n\t{\n\t\tbCol = new Color(51, 204, 255);\n\t\tcl = new CardLayout();\n\t\t\n\t\t//Initiating sciIm JLabel and adding image onto it\n\t\tsciIm = new JLabel();\n\t\tsciIm.setHorizontalAlignment(JLabel.CENTER);\n\t\tsciIm.setVerticalAlignment(JLabel.CENTER);\n\t\tImageIcon sci = new ImageIcon(\"Science.jpg\");\n\t\tsciIm.setIcon(sci);\n\n\t\t//Initiating JButtons, adding ActionListener, setting colors, setting Fonts\n\t\tFont jbFont = new Font(\"Serif\", Font.PLAIN, 20);\n\n\t\tplay = new JButton(\"Play\");\n\t\tplay.setOpaque(true);\n\t\tplay.setBackground(bCol);\n\t\tplay.setFont(jbFont);\n\t\tplay.addActionListener(this);\n\t\t\n\t\tinst = new JButton(\"Instructions\");\n\t\tinst.setBackground(bCol);\n\t\tinst.setOpaque(true);\n\t\tinst.setFont(jbFont);\n\t\tinst.addActionListener(this);\n\n\t\ths = new JButton(\"High Scores\");\n\t\ths.setBackground(bCol);\n\t\ths.setOpaque(true);\n\t\ths.setFont(jbFont);\n\t\ths.addActionListener(this);\n\t\t\n\t\ttePan = new JButton(\"All Science Terms\");\n\t\ttePan.setBackground(bCol);\n\t\ttePan.setOpaque(true);\n\t\ttePan.setFont(jbFont);\n\t\ttePan.addActionListener(this);\n\t\t\n\t\t//Initiating JPanel, setting color and BorderLayout,\n\t\t//and adding JLabel with image and buttons panel\n\t\tbase = new JPanel();\n\t\tbase.setBackground(bCol);\n\t\tbase.setLayout(new BorderLayout());\n\t\tbase.add(sciIm, BorderLayout.CENTER);\n\t\tBasePanel bp = new BasePanel();\n\t\tbase.add(bp, BorderLayout.SOUTH);\n\n\t\t//Setting cardLayout to entire panel and adding instances\n\t\t//of other panels to cardLayout.\n\t\tsetLayout(cl);\n\t\tip = new InstructPanel();\n\t\thsp = new HigScoPanel();\n\t\t//gp = new GamePanel();\n\t\tfp = new InfoPanel();\n\t\ttp = new TermsPanel();\n\t\tadd(\"Info\", fp);\n\t\tadd(\"Base\", base);\n\t\tadd(\"Instructions\", ip);\n\t\tadd(\"High Scores\", hsp);\n\t\t//add(\"Game\", gp);\n\t\tadd(\"Terms\", tp);\n\t\tcl.show(this, \"Base\");\n\t}", "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}", "private void setUp() {\r\n add(myNextPiece, BorderLayout.NORTH);\r\n add(myScorePanel, BorderLayout.CENTER);\r\n add(myControl, BorderLayout.SOUTH);\r\n }", "private void setDisplay() {\n\t\tDimension d = new Dimension(160,40);\n\t\tsetPreferredSize(d);\n\t\tsetMaximumSize(d);\n\t\tsetMinimumSize(d);\n\t\tsetLayout(new BorderLayout());\n\t\tsetBorder(new EmptyBorder(3,0,3,0));\n\t\tbtnUser = new RoundedButton(new Color(0xEEEEEE), new Color(0xCCCCCC));\n\t\tJPanel pnlInner = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t\t\n\t\tpnlIcon = new JPanel(new BorderLayout());\n\t\tpnlIcon.add(lblUserListIcon, BorderLayout.CENTER);\n//\t\tpnlIcon.setBackground(new Color(0xEEEEEE));\n\t\tpnlIcon.setOpaque(false);\n\t\t\n\t\tpnlIcon.setBorder(new EmptyBorder(0,5, 0, 5));\n\t\t\n\t\tpnlName = new JPanel(new BorderLayout());\n\t\tpnlName.add(lblUserListName, BorderLayout.CENTER);\n//\t\tpnlName.setBackground(new Color(0xEEEEEE));\n\t\tpnlName.setOpaque(false);\n\t\t\n\t\tpnlInner.add(pnlIcon);\n\t\tpnlInner.add(pnlName);\n\t\t\n\t\tsetOpaque(true);\n\t\tsetBackground(Color.WHITE);\n\t\t\n\t\tbtnUser.add(pnlIcon, BorderLayout.WEST);\n\t\tbtnUser.add(pnlName, BorderLayout.CENTER);\n\t\tadd(btnUser, BorderLayout.CENTER);\n\t}", "public void setupBottomPanel() {\n\t\tURL url = getClass().getResource(\".coredata/background/BottomCenter.png\");\n\t\tchatSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\turl = getClass().getResource(\".coredata/background/LeftTeamBans.png\");\n\t\tblueBanSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\turl = getClass().getResource(\".coredata/background/RightTeamBans.png\");\n\t\tpurpleBanSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\tbottomPanel = new JLayeredPane();\n\t\tbottomPanel.setPreferredSize(new Dimension(1280, 243));\n\t\tJLabel blueBanLabel = new JLabel();\n\t\tJLabel chatLabel = new JLabel();\n\t\tJLabel purpleBanLabel = new JLabel();\n\t\tblueBanLabel.setIcon(blueBanSlot);\n\t\tchatLabel.setIcon(chatSlot);\n\t\tpurpleBanLabel.setIcon(purpleBanSlot);\n\t\tbottomPanel.add(blueBanLabel, new Integer(0));\n\t\tbottomPanel.add(chatLabel, new Integer(0));\n\t\tbottomPanel.add(purpleBanLabel, new Integer(0));\n\t\tquit = new JButton();\n\t\tquit.setName(\"quit\");\n\t\tquit.setOpaque(false);\n\t\tquit.addActionListener(this);\n\t\tquit.setBorderPainted(false);\n\t\tquit.setContentAreaFilled(false);\n\t\tquit.setBounds(27, 165, 240, 30);\n\t\tbottomPanel.add(quit, new Integer(1));\n\t\tcreateNoBanButton();\n\t\tadd(bottomPanel, BorderLayout.PAGE_END);\n\t\tblueBanLabel.setBounds(0, 0, 279, 243);\n\t\tchatLabel.setBounds(279, 0, 1004, 243);\n\t\tpurpleBanLabel.setBounds(1004, 0, 1280, 243);\n\t}" ]
[ "0.7386513", "0.7374907", "0.7370715", "0.7285876", "0.71751297", "0.71473676", "0.7100722", "0.7079666", "0.7054307", "0.7019911", "0.69502693", "0.693342", "0.69293", "0.69281214", "0.6922087", "0.6908607", "0.6897049", "0.6889216", "0.68760395", "0.68721586", "0.68716335", "0.68646365", "0.6853233", "0.68466115", "0.68442285", "0.683727", "0.68201363", "0.6784214", "0.6768147", "0.6759993", "0.67511314", "0.6747688", "0.6745176", "0.6741061", "0.67408216", "0.67368084", "0.6730552", "0.67134935", "0.67119515", "0.6710696", "0.67090666", "0.6687242", "0.6686493", "0.6678113", "0.6658018", "0.6655171", "0.6652783", "0.66450095", "0.66431564", "0.66431564", "0.66366065", "0.662684", "0.6620899", "0.6613775", "0.661078", "0.659958", "0.6594463", "0.6591866", "0.6591447", "0.65842444", "0.6569637", "0.6568532", "0.656812", "0.6560312", "0.65447146", "0.6526743", "0.65155363", "0.6514214", "0.6512447", "0.65112513", "0.65052974", "0.64858073", "0.64808714", "0.6478005", "0.64761174", "0.6473156", "0.64706093", "0.6468073", "0.64663976", "0.64500403", "0.6449544", "0.644713", "0.64468", "0.6443888", "0.6442232", "0.6435211", "0.6435142", "0.64269286", "0.6426441", "0.64221233", "0.6418427", "0.6416787", "0.6414476", "0.64124995", "0.6405074", "0.6404862", "0.64028496", "0.6396048", "0.6394737", "0.6393774", "0.63880134" ]
0.0
-1
creating a left bar with controls
private JPanel leftBar() { JPanel leftBar = new JPanel(); Color myPurp = new Color(191, 123, 123); leftBar.setBackground(myPurp); leftBar.setLayout(new BoxLayout(leftBar, BoxLayout.Y_AXIS)); //creating slider that determines speed JLabel milliSecs = new JLabel("ms between", JLabel.LEFT); JLabel generations = new JLabel("generations", JLabel.LEFT); speed.addChangeListener(this); speed.setPaintTicks(true); speed.setMajorTickSpacing(500); speed.setPaintLabels(true); speed.setMinorTickSpacing(250); leftBar.add(milliSecs); leftBar.add(generations); leftBar.add(speed); //creating slider that determines grid size JLabel dimensionsLabel = new JLabel("dimensions"); gridSize.addChangeListener(this); gridSize.setPaintTicks(true); gridSize.setMajorTickSpacing(10); gridSize.setPaintLabels(true); leftBar.add(dimensionsLabel); leftBar.add(gridSize); pack(); return leftBar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JPanel topBar() {\n\t\t\n\t\t//creating a top bar with controls\n\t\tJPanel topBar = new JPanel();\n\t\tColor myPurp = new Color(191, 123, 123);\n\t\ttopBar.setBackground(myPurp);\n\t\t\n\t\t//reset button with listener\n\t\ttopBar.add(reset);\n\t\treset.addActionListener(this);\n\t\t\n\t\t//creating button that starts simulation\n\t\tstart.setSelected(false);\n\t\tstart.addActionListener(this);\n\t\ttopBar.add(start);\n\t\t\n\t\t//creating button that stops simulation\n\t\tstop.setSelected(true);\n\t\tstop.addActionListener(this);\n\t\ttopBar.add(stop);\n\t\t\n\t\t//button group to ensure you cannot start and stop at same time\n\t\tButtonGroup startStop = new ButtonGroup();\n\t\tstartStop.add(start);\n\t\tstartStop.add(stop);\n\t\t\n\t\t//creating label that shows # of steps\n\t\tsteps.setHorizontalAlignment(JLabel.CENTER);\n\t\ttopBar.add(steps);\n\t\t\n\t\t\n\t\treturn topBar;\n\t}", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "private JMenuBar createbar(){\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t//Add a JMenu\n\t\tJMenu c = new JMenu(\"Create\");\n\t\tJMenu m = new JMenu(\"Manipulate\"); \n\t\tJMenu o = new JMenu(\"Other\");\n\n\t\tmenuBar.add(c);\n\t\tmenuBar.add(m);\n\t\tmenuBar.add(o);\n\n\t\t//Create menu\n\t\tJMenuItem cPyramid = new JMenuItem(\"Pyramid\");\n\t\tJMenuItem cSquare = new JMenuItem(\"Square\");\n\t\tJMenuItem cStar = new JMenuItem(\"Star\");\n\t\tJMenuItem cSphere = new JMenuItem(\"Sphere\");\n\t\tJMenuItem cCube = new JMenuItem(\"Cube\");\n\t\tJMenuItem cLight = new JMenuItem(\"Light\");\n\n\t\tc.add(cPyramid);\n\t\tc.add(cSquare);\n\t\tc.add(cStar);\n\t\tc.add(cSphere);\n\t\tc.add(cCube);\n\t\tc.add(cLight);\n\t\t\n\n\t\t//Manipulate menu\n\t\tJMenuItem mModify = new JMenuItem(\"Modify\");\n\t\tJMenuItem mDelete = new JMenuItem(\"Delete\");\n\n\t\tm.add(mModify);\n\t\tm.add(mDelete);\n\n\t\tJMenuItem oDeleteAll = new JMenuItem(\"Delete All (lights remain but will be overwritten)\"); \n\t\tJMenuItem oPrint = new JMenuItem(\"Print Structure\");\n\n\t\to.add(oPrint);\n\t\to.add(oDeleteAll);\n\n\n\t\tcPyramid.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Pyramid, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\n\t\t});\n\n\t\tcSquare.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Square, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcStar.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Star, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcSphere.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Sphere, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\t\t\n\t\tcCube.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Cube, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcLight.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Light, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tmModify.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfor (Figure_deployment_type fig: draw.figurelist) {\n\t\t\t\t\tif (fig.getId()==draw.picked_figure){\n\t\t\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, fig.type, draw.picked_figure);\n\t\t\t\t\t\tif (cdialog.getAnswer()!=null){\n\t\t\t\t\t\t\tfig.modify(cdialog.getModify());\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\tmDelete.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint n =-1;\n\t\t\t\tfor (int i = 0; i < draw.figurelist.size(); i++) {\n\t\t\t\t\tif(draw.figurelist.get(i).getId()==draw.picked_figure)\n\t\t\t\t\t\tn=i;\n\t\t\t\t}\n\t\t\t\tif (n!=-1)\n\t\t\t\tdraw.figurelist.remove(n);\n\t\t\t}\n\t\t});\n\n\t\toDeleteAll.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdraw.figurelist.clear();\n\t\t\t}\n\t\t});\n\n\t\toPrint.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nArrayList<Figure_deployment_type> : {\");\n\t\t\t\tfor (Figure_deployment_type fig : draw.figurelist) {\n\t\t\t\t\tSystem.out.print(\"[ \");\n\t\t\t\t\tSystem.out.print(fig.toString());\n\t\t\t\t\tSystem.out.println(\" ]\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"}\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\treturn menuBar;\n\t}", "public Primary(){\r\n\t\tsuper(\"Welcome to Louis' Sushi bar!!!!\"); \r\n\t\tsetLayout(new FlowLayout());\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetSize(500, 200);\r\n\t\tsetVisible(true);\r\n\t\t\r\n\t\t\r\n//this is initailizing all the JLabels and buttons and adding an action listener to the buttons, here is here create the buttons for the different menus\r\n\t\tContinue = new JLabel(\"LOUIS' SHUSHI BAR, PRESS which menu you you would like to go to \");\r\n\t\tsushimenu = new JButton(\"SUSHI MENU\");\r\n\t\tsushimenu.addActionListener(this);\r\n\t\tmeatmenu = new JButton(\"MEAT MENU\");\r\n\t\tmeatmenu.addActionListener(this);\r\n\t\tsoupsaladmenu = new JButton(\"SOUP MENU\");\r\n\t\tsoupsaladmenu.addActionListener(this);\r\n\t\tadd (Continue);\r\n\t\tadd (sushimenu);\r\n\t\tadd (meatmenu);\r\n\t\tadd(soupsaladmenu);\r\n\t\r\n\t}", "SideBar(Node... nodes) {\r\n // create a bar to hide and show.\r\n setAlignment(Pos.CENTER);\r\n setStyle(\"-fx-padding: 10; -fx-background-color: linear-gradient(to bottom, lavenderblush, mistyrose); -fx-border-color: derive(mistyrose, -10%); -fx-border-width: 3;\");\r\n\r\n // create a button to hide and show the sidebar.\r\n controlButton = new Button(\"Sign Up!\");\r\n controlButton.setMaxWidth(Double.MAX_VALUE);\r\n controlButton.setTooltip(new Tooltip(\"Play sidebar login or sign up!\"));\r\n\r\n // apply the animations when the button is pressed.\r\n controlButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent actionEvent) {\r\n if(controlButton.getText().equalsIgnoreCase(\"Login!\")){\r\n getChildren().clear();\r\n getChildren().add(logincontainer);\r\n controlButton.setText(\"Sign Up!\");\r\n }else if(controlButton.getText().equalsIgnoreCase(\"Sign Up!\")){\r\n getChildren().clear();\r\n getChildren().add(new SignUp(layout));\r\n controlButton.setText(\"Login!\");\r\n }\r\n }\r\n });\r\n }", "private void buildLeftHandNavNar() {\n\t\tsetCurrentSelectedDefinitionObjId(null);\n\t\tsetCurrentSelectedParamerterObjId(null);\n\t\tsetCurrentSelectedFunctionObjId(null);\n\t\tgetFunctionArgumentList().clear();\n\t\tgetFunctionArgNameMap().clear();\n\t\trightHandNavPanel.clear();\n\t\tNavPills navPills = new NavPills();\n\t\tnavPills.setStacked(true);\n\t\t\n\t\tgeneralInformation = new AnchorListItem();\n\t\t//includeLibrary = new AnchorListItem();\n\t\tparameterLibrary = new AnchorListItem();\n\t\tdefinitionLibrary = new AnchorListItem();\n\t\tfunctionLibrary = new AnchorListItem();\n\t\tviewCQL = new AnchorListItem();\n\t\t\n\t\tgeneralInformation.setIcon(IconType.INFO);\n\t\tgeneralInformation.setText(\"General Information\");\n\t\tgeneralInformation.setTitle(\"General Information\");\n\t\tgeneralInformation.setActive(true);\n\t\t\n\t\t//includeLibrary.setIcon(IconType.INFO);\n\t\t//includeLibrary.setText(\"Inlude library\");\n\t\t//includeLibrary.setTitle(\"Inlude library\");\n\t\t//includeLibrary.setActive(true);\n\t\t\n\t\tparameterLibrary.setIcon(IconType.PENCIL);\n\t\tparameterLibrary.setTitle(\"Parameter\");\n\t\tparamBadge.setText(\"\" + viewParameterList.size());\n\t\tAnchor paramAnchor = (Anchor) (parameterLibrary.getWidget(0));\n\t\t// Double Click causing issues.So Event is not propogated\n\t\tparamAnchor.addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t});\n\t\tparamLabel.setStyleName(\"transparentLabel\");\n\t\tparamAnchor.add(paramLabel);\n\t\tparamBadge.setPull(Pull.RIGHT);\n\t\t//paramBadge.setMarginLeft(45);\n\t\tparamAnchor.add(paramBadge);\n\t\tparamAnchor.setDataParent(\"#navGroup\");\n\t\tparamAnchor.setDataToggle(Toggle.COLLAPSE);\n\t\tparameterLibrary.setHref(\"#collapseParameter\");\n\t\t\n\t\tparameterLibrary.add(paramCollapse);\n\t\t\n\t\tdefinitionLibrary.setIcon(IconType.PENCIL);\n\t\tdefinitionLibrary.setTitle(\"Define\");\n\t\tdefineBadge.setText(\"\" + viewDefinitions.size());\n\t\tAnchor defineAnchor = (Anchor) (definitionLibrary.getWidget(0));\n\t\t// Double Click causing issues.So Event is not propogated\n\t\tdefineAnchor.addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t});\n\t\tdefineLabel.setStyleName(\"transparentLabel\");\n\t\tdefineAnchor.add(defineLabel);\n\t\tdefineBadge.setPull(Pull.RIGHT);\n\t\t//defineBadge.setMarginLeft(52);\n\t\tdefineAnchor.add(defineBadge);\n\t\tdefineAnchor.setDataParent(\"#navGroup\");\n\t\tdefinitionLibrary.setDataToggle(Toggle.COLLAPSE);\n\t\tdefinitionLibrary.setHref(\"#collapseDefine\");\n\t\t\n\t\tdefinitionLibrary.add(defineCollapse);\n\t\t\n\t\tfunctionLibrary.setIcon(IconType.PENCIL);\n\t\t/* functionLibrary.setText(\"Functions\"); */\n\t\tfunctionLibrary.setTitle(\"Functions\");\n\t\t\n\t\tfunctionBadge.setText(\"\" + viewFunctions.size());\n\t\tAnchor funcAnchor = (Anchor) (functionLibrary.getWidget(0));\n\t\t// Double Click causing issues.So Event is not propogated\n\t\tfuncAnchor.addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t});\n\t\tfunctionLibLabel.setStyleName(\"transparentLabel\");\n\t\tfuncAnchor.add(functionLibLabel);\n\t\tfunctionBadge.setPull(Pull.RIGHT);\n\t\t\n\t\t//functionBadge.setMarginLeft(57);\n\t\tfuncAnchor.add(functionBadge);\n\t\tfuncAnchor.setDataParent(\"#navGroup\");\n\t\tfunctionLibrary.setDataToggle(Toggle.COLLAPSE);\n\t\tfunctionLibrary.setHref(\"#collapseFunction\");\n\t\t\n\t\tfunctionLibrary.add(functionCollapse);\n\t\t\n\t\tviewCQL.setIcon(IconType.BOOK);\n\t\tviewCQL.setText(\"View CQL\");\n\t\tviewCQL.setTitle(\"View CQL\");\n\t\t\n\t\tnavPills.add(generalInformation);\n\t\t//snavPills.add(includeLibrary);\n\t\tnavPills.add(parameterLibrary);\n\t\t\n\t\tnavPills.add(definitionLibrary);\n\t\tnavPills.add(functionLibrary);\n\t\tnavPills.add(viewCQL);\n\t\t\n\t\tnavPills.setWidth(\"200px\");\n\t\t\n\t\tmessagePanel.add(successMessageAlert);\n\t\tmessagePanel.add(warningMessageAlert);\n\t\tmessagePanel.add(errorMessageAlert);\n\t\tmessagePanel.add(warningConfirmationMessageAlert);\n\t\tmessagePanel.add(globalWarningConfirmationMessageAlert);\n\t\tmessagePanel.add(deleteConfirmationMessgeAlert);\n\t\t\n\t\t// rightHandNavPanel.add(messagePanel);\n\t\trightHandNavPanel.add(navPills);\n\t}", "private void createStatusBar() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(1, 4));\r\n\t\t\r\n\t\tlengthLab = new JLabel(\"Length: 0\");\r\n\t\tlengthLab.setForeground(Color.GRAY);\r\n\t\tlengthLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(lengthLab);\r\n\t\t\r\n\t\tlnLab = new JLabel(\"Ln: 0\");\r\n\t\tlnLab.setForeground(Color.GRAY);\r\n\t\tlnLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(lnLab);\r\n\t\t\r\n\t\tcolLab = new JLabel(\"Col: 1\");\r\n\t\tcolLab.setForeground(Color.GRAY);\r\n\t\tcolLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(colLab);\r\n\t\t\r\n\t selLab = new JLabel(\"Sel: 0\");\r\n\t\tselLab.setForeground(Color.GRAY);\r\n\t\tselLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(selLab);\r\n\t\t\r\n\t\tJLabel clock = new JLabel(new Date().toString());\r\n\t\tclock.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tpanel.add(clock, BorderLayout.PAGE_END);\r\n\t\ttimer = new Timer(100, (e) -> { \r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\tclock.setText(sdf.format(new Date()));\r\n\t\t});\r\n\t\ttimer.start();\r\n\t\t\r\n\t\tgetContentPane().add(panel, BorderLayout.PAGE_END);\r\n\t}", "private void northRegion() {\r\n\t\tthis.addComponent(BorderLayout.NORTH, sv);\r\n\t\t\r\n\t\tToolbar toolBar = new Toolbar();\r\n\t\tsetToolbar(toolBar);\r\n\t\ttoolBar.setTitle(\"ThePath Game\");\r\n\t\t\r\n\t\tCheckBox soundCheckBox = new CheckBox(\"Side Menu Item Check\");\r\n\t\tsoundCheckBox.getAllStyles().setBgTransparency(255);\r\n\t\tsoundCheckBox.getAllStyles().setBgColor(ColorUtil.LTGRAY);\r\n\t\t\r\n\t\tSoundCommand soundCommand = new SoundCommand(gw);\r\n\t\tsoundCheckBox.setCommand(soundCommand);\r\n\t\ttoolBar.addComponentToSideMenu(soundCheckBox);\r\n\t\t\r\n\t\tAccelerateCommand accelerateCommand = new AccelerateCommand(gw);\r\n\t\ttoolBar.addCommandToLeftSideMenu(accelerateCommand);\r\n\t\t\r\n\t\tAboutCommand aboutCommand = new AboutCommand(gw);\r\n\t\ttoolBar.addCommandToLeftSideMenu(aboutCommand);\r\n\t\t\r\n\t\tHelpCommand helpCommand = new HelpCommand(gw);\r\n\t\ttoolBar.addCommandToRightBar(helpCommand);\r\n\t\t\r\n\t\tExitCommand exitCommand = new ExitCommand();\r\n\t\ttoolBar.addCommandToLeftSideMenu(exitCommand);\r\n\t}", "private void makeLeftBox() {\n\t\tgamePanel = new JPanel();\n\t\tgamePanel.setLayout(new BorderLayout());\n\t\tgamePanel.setBackground(Color.GRAY);\n\t\tgamePanel.setOpaque(true);\n\t\tleft = new JPanel();\n\t\tleft.setLayout(new GridLayout(1,1));\n\t\tleft.setBackground(Color.GRAY);\n\t\tbanner = new JLabel(\"Jeopardy\", SwingConstants.CENTER);\n\t\tbanner.setBorder(new EmptyBorder(10,10,10,10));\n\t\tbanner.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tbanner.setForeground(Color.GRAY);\n\t\tbanner.setBackground(lightRed);\n\t\tbanner.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n\t\tbanner.setOpaque(true);\n\t\tmakeGameBoard();\n\t\t\n\t\tgamePanel.add(banner, BorderLayout.NORTH);\n\t\tgamePanel.add(board, BorderLayout.CENTER);\n\t\tleft.setOpaque(false);\n\t\tJPanel space = new JPanel();\n\t\tspace.setOpaque(false);\n\t\tgamePanel.add(space, BorderLayout.SOUTH);\n\t\tleft.add(gamePanel);\n\t\t\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame(\"Dashboard\");\r\n\t\tframe.getContentPane().setFont(new Font(\"Yu Gothic Medium\", Font.BOLD, 15));\r\n\t\tframe.getContentPane().setForeground(new Color(255, 255, 255));\r\n\t\tframe.getContentPane().setBackground(new Color(255, 255, 255));\r\n\t\tframe.setBackground(new Color(47, 79, 79));\r\n\t\tframe.setBounds(100, 100, 1126, 556);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tBorder blackline = BorderFactory.createLineBorder(Color.red);\r\n\t\t\r\n\t\tJLabel lbl_name = new JLabel(\"Name\");\r\n\t\tlbl_name.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_name.setForeground(new Color(255, 255, 255));\r\n\t\tlbl_name.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlbl_name.setBounds(625, 196, 127, 24);\r\n\t\tframe.getContentPane().add(lbl_name);\r\n\t\t\r\n\t\tJLabel lbl_photo = new JLabel(\"\");\r\n\t\tlbl_photo.setBackground(new Color(255, 255, 255));\r\n\t\tlbl_photo.setBounds(625, 28, 127, 148);\r\n\t\tlbl_photo.setBorder(blackline);\r\n\t\tframe.getContentPane().add(lbl_photo);\r\n\t\t\r\n\t\tJPanel menuPanel = new JPanel();\r\n\t\tmenuPanel.setBounds(0, 0, 278, 517);\r\n\t\tmenuPanel.setBackground(new Color(47, 79, 79));\r\n\t\tframe.getContentPane().add(menuPanel);\r\n\t\tmenuPanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel menuLabel = new JLabel(\"My Dashboard\");\r\n\t\tmenuLabel.setBounds(0, 0, 278, 54);\r\n\t\tmenuLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tmenuLabel.setForeground(new Color(255, 255, 255));\r\n\t\tmenuLabel.setFont(new Font(\"Bell MT\", Font.BOLD, 28));\r\n\t\tmenuLabel.setBackground(new Color(46, 139, 87));\r\n\t\tmenuLabel.setOpaque(true);\r\n\t\tmenuPanel.add(menuLabel);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(new Color(47, 79, 79));\r\n\t\tpanel.setForeground(new Color(255, 255, 255));\r\n\t\tpanel.setBounds(10, 80, 258, 45);\r\n\t\tmenuPanel.add(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel lbl_1 = new JLabel(\"\");\r\n\t\tlbl_1.setBounds(20, 5, 40, 35);\r\n\t\tlbl_1.setIcon(new ImageIcon(img_home));\r\n\t\tpanel.add(lbl_1);\r\n\t\t\r\n\t\tJButton btn_home = new JButton(\"Home\");\r\n\t\tbtn_home.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_home.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_home.setForeground(new Color(255, 255, 255));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_home.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_home.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Home is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_home.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_home.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_home.setBounds(66, 5, 142, 35);\r\n\t\tbtn_home.setOpaque(false);\r\n\t\tbtn_home.setContentAreaFilled(false);\r\n\t\tbtn_home.setBorderPainted(false);\r\n\t\tbtn_home.setFocusPainted(false);\r\n\t\tpanel.add(btn_home);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1.setLayout(null);\r\n\t\tpanel_1.setBounds(10, 145, 258, 45);\r\n\t\tmenuPanel.add(panel_1);\r\n\t\t\r\n\t\tJLabel lbl_2 = new JLabel(\"\");\r\n\t\tlbl_2.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_2.setBounds(20, 5, 40, 35);\r\n\t\tlbl_2.setIcon(new ImageIcon(img_leave));\r\n\t\tpanel_1.add(lbl_2);\r\n\t\t\r\n\t\tJButton btn_leave = new JButton(\"Apply Leave\");\r\n\t\tbtn_leave.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_leave.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_leave.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_leave.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Leave is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_leave.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_leave.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_leave.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_leave.setFocusPainted(false);\r\n\t\tbtn_leave.setContentAreaFilled(false);\r\n\t\tbtn_leave.setBorderPainted(false);\r\n\t\tbtn_leave.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1.add(btn_leave);\r\n\t\t\r\n\t\tJPanel panel_1_1 = new JPanel();\r\n\t\tpanel_1_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1_1.setLayout(null);\r\n\t\tpanel_1_1.setBounds(10, 210, 258, 45);\r\n\t\tmenuPanel.add(panel_1_1);\r\n\t\t\r\n\t\tJLabel lbl_3 = new JLabel(\"\");\r\n\t\tlbl_3.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_3.setBounds(20, 5, 40, 35);\r\n\t\tlbl_3.setIcon(new ImageIcon(img_marks));\r\n\t\tpanel_1_1.add(lbl_3);\r\n\t\t\r\n\t\tJButton btn_marks = new JButton(\"Marks\");\r\n\t\tbtn_marks.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_marks.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_marks.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_marks.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Marks is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_marks.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_marks.setOpaque(false);\r\n\t\tbtn_marks.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_marks.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_marks.setFocusPainted(false);\r\n\t\tbtn_marks.setContentAreaFilled(false);\r\n\t\tbtn_marks.setBorderPainted(false);\r\n\t\tbtn_marks.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1_1.add(btn_marks);\r\n\t\t\r\n\t\tJPanel panel_1_1_1 = new JPanel();\r\n\t\tpanel_1_1_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1_1_1.setLayout(null);\r\n\t\tpanel_1_1_1.setBounds(10, 275, 258, 45);\r\n\t\tmenuPanel.add(panel_1_1_1);\r\n\t\t\r\n\t\tJLabel lbl_4 = new JLabel(\"\");\r\n\t\tlbl_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_4.setBounds(20, 5, 40, 35);\r\n\t\tlbl_4.setIcon(new ImageIcon(img_attendance));\r\n\t\tpanel_1_1_1.add(lbl_4);\r\n\t\t\r\n\t\tJButton btn_attendance = new JButton(\"Atendance\");\r\n\t\tbtn_attendance.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_attendance.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_attendance.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_attendance.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Attendance is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_attendance.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_attendance.setOpaque(false);\r\n\t\tbtn_attendance.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_attendance.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_attendance.setFocusPainted(false);\r\n\t\tbtn_attendance.setContentAreaFilled(false);\r\n\t\tbtn_attendance.setBorderPainted(false);\r\n\t\tbtn_attendance.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1_1_1.add(btn_attendance);\r\n\t\t\r\n\t\tJLabel lbl_back = new JLabel(\"\");\r\n\t\tlbl_back.setBounds(278, 0, 832, 255);\r\n\t\tlbl_back.setIcon(new ImageIcon(img_background));\r\n\t\tframe.getContentPane().add(lbl_back);\r\n\t\t\r\n\t\tJLabel lbl_logo = new JLabel(\"\");\r\n\t\tlbl_logo.setBounds(308, 255, 278, 100);\r\n\t\tlbl_logo.setIcon(new ImageIcon(img_logo));\r\n\t\tframe.getContentPane().add(lbl_logo);\r\n\t\t\r\n\t\tJLabel lbl_welcome = new JLabel(\"WELCOME\");\r\n\t\tlbl_welcome.setForeground(new Color(47, 79, 79));\r\n\t\tlbl_welcome.setFont(new Font(\"Times New Roman\", Font.BOLD, 25));\r\n\t\tlbl_welcome.setBounds(308, 366, 239, 38);\r\n\t\tframe.getContentPane().add(lbl_welcome);\r\n\t\t\r\n\t\tJLabel lbl_name1 = new JLabel(\"Name\");\r\n\t\tlbl_name1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlbl_name1.setBounds(308, 415, 134, 24);\r\n\t\tframe.getContentPane().add(lbl_name1);\r\n\t\t\r\n\t\tJLabel lbl_id = new JLabel(\"ID : \");\r\n\t\tlbl_id.setForeground(new Color(47, 79, 79));\r\n\t\tlbl_id.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\t\tlbl_id.setBounds(308, 452, 90, 24);\r\n\t\tframe.getContentPane().add(lbl_id);\r\n\t\t\r\n\t\tJLabel lbl_id1 = new JLabel(\"Identification number\");\r\n\t\tlbl_id1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlbl_id1.setBounds(308, 482, 144, 24);\r\n\t\tframe.getContentPane().add(lbl_id1);\r\n\t\t\r\n\t\t\r\n\t}", "public void updateLeftPanel() {\n listPanel = new ListPanel(logic.getFilteredFocusedList(), this);\n listPanelPlaceholder.getChildren().clear();\n listPanelPlaceholder.getChildren().add(listPanel.getRoot());\n if (logic.getCurrentDisplayableType() == DisplayableType.EVENT) {\n moduleButton.getStyleClass().clear();\n moduleButton.getStyleClass().add(\"menuBarButton\");\n eventButton.getStyleClass().clear();\n eventButton.getStyleClass().addAll(\"menuBarButton\", \"active\");\n } else {\n assert logic.getCurrentDisplayableType() == DisplayableType.MODULE;\n eventButton.getStyleClass().clear();\n eventButton.getStyleClass().add(\"menuBarButton\");\n moduleButton.getStyleClass().clear();\n moduleButton.getStyleClass().addAll(\"menuBarButton\", \"active\");\n }\n }", "private void addControls() {\n\t\tarrow_up = new FlxSprite(FlxG.width/2-20,340);\r\n\t\tarrow_up.loadGraphic(R.drawable.arrow_up, false);\r\n\t\tarrow_up.setAlpha((float)0.7);\r\n\t\tthis.add(arrow_up);\r\n\t\t\r\n\t\tarrow_down = new FlxSprite(FlxG.width/2-20,400);\r\n\t\tarrow_down.loadGraphic(R.drawable.arrow_down, false);\r\n\t\tarrow_down.setAlpha((float)0.7);\r\n\t\tthis.add(arrow_down);\r\n\t\t\r\n\t\tarrow_right = new FlxSprite(FlxG.width/2+30,370);\r\n\t\tarrow_right.loadGraphic(R.drawable.arrow_right, false);\r\n\t\tarrow_right.setAlpha((float)0.7);\r\n\t\tthis.add(arrow_right);\r\n\t\t\r\n\t\tarrow_left = new FlxSprite(FlxG.width/2-70,370);\r\n\t\tarrow_left.loadGraphic(R.drawable.arrow_left, false);\r\n\t\tarrow_left.setAlpha((float)0.7);\r\n\t\tthis.add(arrow_left);\r\n\t}", "public void setMenu() {\n\t \n\t\ttop = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t add(top, BorderLayout.CENTER);\n\t \n\t lPro = new JLabel(\"Projects: \");\n\t top.add(lPro);\n\t \n\t cPro = new JComboBox();\n\t getProject();\n\t\ttop.add(cPro);\n\t\t\n\t\tview = new JButton(\"View Sample\");\n\t\ttop.add(view);\n\t\t\n\t\tbottom = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tcancel = new JButton(\"Cancel\");\n\t\tbottom.add(cancel);\n\t\t\n\t\tdownload = new JButton(\"Download\");\n\t\tbottom.add(download);\n\t\t\n\t\tsetActionListener();\t\n\t}", "private void setupLeftPanel()\n {\n // display the radio buttons for the various sorts.\n Box leftPanel = Box.createVerticalBox();\n Box buttonColumn = Box.createVerticalBox();\n Box nameDelayBox = Box.createHorizontalBox();\n buttonColumn.setBorder(BorderFactory.createTitledBorder(\"Algorithms\"));\n ButtonGroup bg = new ButtonGroup();\n sortTypeButtons = new JRadioButton[sortNames.length]; // to change which sorts are available, look at variables\n // at the top of the class.\n for (int i=0; i<sortNames.length; i++)\n {\n sortTypeButtons[i] = new JRadioButton(sortNames[i]);\n buttonColumn.add(sortTypeButtons[i]);\n bg.add(sortTypeButtons[i]);\n sortTypeButtons[i].addActionListener(this);\n }\n sortTypeButtons[0].setSelected(true);\n nameDelayBox.add(buttonColumn);\n\n // display the delay slider.\n delaySlider = new JSlider(JSlider.VERTICAL,0,20,1);\n delaySlider.addChangeListener(this);\n delaySlider.setMajorTickSpacing(1);\n delaySlider.setPaintTicks(true);\n Hashtable<Integer,JLabel> labelTable = new Hashtable<>();\n labelTable.put(0,new JLabel(\"0\"));\n labelTable.put(5,new JLabel(\"5\"));\n labelTable.put(10,new JLabel(\"10\"));\n labelTable.put(15,new JLabel(\"15\"));\n labelTable.put(20,new JLabel(\"20\"));\n delaySlider.setLabelTable(labelTable);\n delaySlider.setPaintLabels(true);\n delaySlider.setSnapToTicks(true);\n delaySlider.setBorder(new TitledBorder(\"Delay\"));\n nameDelayBox.add(delaySlider);\n leftPanel.add(nameDelayBox);\n\n // display the run/cancel and reset buttons.\n Box runResetPanel = Box.createHorizontalBox();\n runButton = new JButton(\"Run\");\n runButton.addActionListener(this);\n resetButton = new JButton(\"Reset\");\n resetButton.addActionListener(this);\n runResetPanel.add(runButton);\n runResetPanel.add(resetButton);\n leftPanel.add(runResetPanel);\n\n // shows popup menu of possible values of N.\n nMenu = new JComboBox<>();\n for (int v:possibleNValues) // see the variables at the top of the class to modify options shown.\n nMenu.addItem(v);\n nMenu.addActionListener(this);\n nMenu.setSelectedItem(100);\n nMenu.setBorder(new TitledBorder(\"Array Size (N)\"));\n leftPanel.add(nMenu);\n\n // label that indicates whether this list is sorted correctly\n leftPanel.add(new JLabel(\"Status\"));\n statusLabel = new JLabel(\"\");\n leftPanel.add(statusLabel);\n leftPanel.add(Box.createVerticalStrut(10));\n\n // label that indicates how much time (was/has been) spent on the most recent run\n leftPanel.add(new JLabel(\"Time\"));\n timeLabel = new JLabel(\"00.000\");\n leftPanel.add(timeLabel);\n leftPanel.add(Box.createVerticalStrut(10));\n\n // label that indicates which sort was run most recently.\n leftPanel.add(new JLabel(\"Latest Run\"));\n latestRunLabel = new JLabel(\"None\");\n leftPanel.add(latestRunLabel);\n leftPanel.add(Box.createVerticalGlue());\n\n // update alignment so things look nice.\n buttonColumn.setAlignmentY(Component.TOP_ALIGNMENT);\n nameDelayBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n runResetPanel.setAlignmentX(Component.LEFT_ALIGNMENT);\n nMenu.setAlignmentX(Component.LEFT_ALIGNMENT);\n delaySlider.setAlignmentY(Component.TOP_ALIGNMENT);\n statusLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n timeLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n latestRunLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n\n getContentPane().add(leftPanel,BorderLayout.WEST);\n\n }", "void createGUI(JFrame f) {\n TabbedSplitPanel centrePanel = new TabbedSplitPanel(new JPanel(),TabbedSplitPanel.RIGHT);\n centrePanel.addMenuPanel(new MenuPanel(\"Right Menu\", new JTextArea(\"Menu panel for right tabbed split panel\"),true));\n\n TabbedSplitPanel bottomPanel = new TabbedSplitPanel(centrePanel,SplitPanel.BOTTOM);\n MenuPanel mainBottomMenuPanel = new MenuPanel(\"Main bottom menu\", new JTextArea(\"Contents of bottom menu\"), true);\n bottomPanel.addMenuPanel(mainBottomMenuPanel);\n\n // A panel with a button in it\n JPanel panel = createAMenuView();\n\n TabbedSplitPanel leftPanel = new TabbedSplitPanel(bottomPanel, SplitPanel.LEFT);\n leftPanel.addMenuPanel(new MenuPanel(\"Left1\", panel, true));\n leftPanel.addMenuPanel(new MenuPanel(\"Left2\", new JTextArea(\"Left 2 text area\"),true));\n\n // A nested TabbedSplitPanel\n TabbedSplitPanel nestedPanel = new TabbedSplitPanel(new JTextArea(\"Panel Containing a Nested panel\"),SplitPanel.BOTTOM);\n nestedPanel.addMenuPanel(new MenuPanel(\"Nested bottom menu\",new JTextArea(\"Nested menu panel\"),true));\n centrePanel.addMenuPanel(new MenuPanel(\"Nested\",nestedPanel,true));\n\n f.setContentPane(leftPanel);\n\n }", "private void initSideBar(JSplitPane splitPane) {\n\t\tJPanel sidebar = new JPanel();\n\t\tJScrollPane leftComponent = new JScrollPane(sidebar);\n\t\tleftComponent.setMinimumSize(new Dimension(210, 400));\n\t\tsplitPane.setLeftComponent(leftComponent);\n\t\tGridBagLayout gbl_sidebar = new GridBagLayout();\n\t\tsidebar.setLayout(gbl_sidebar);\n\n\t\t// init basic constraints\n\t\tGridBagConstraints gbc_sidebar = new GridBagConstraints();\n\t\tgbc_sidebar.insets = new Insets(5, 5, 5, 5);\n\t\tgbc_sidebar.anchor = GridBagConstraints.CENTER;\n\t\tgbc_sidebar.gridx = 0;\n\t\tgbc_sidebar.gridy = 0;\n\t\t\n\t\t// init step buttons here so other buttons can reference them\n\t\tfinal JButton btnStepBack = new JButton(\"Step\");\n\t\tfinal JButton btnStepForward = new JButton(\"Step\");\n\t\t\n\t\t// run button\n\t\tfinal JButton btnRun = new JButton(new AbstractAction(\"Run\") {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tgraphicManager.clearStates();\n\t\t\t\tbtnStepForward.setEnabled(false);\n\t\t\t\ttry {\n\t\t\t\t\tmachine.run(inputText.getText());\n\t\t\t\t} catch (NoStartStateDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t} catch (NoTransitionDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t}\n\t\t\t\tupdate(); // update states, labels, text\n\t\t\t}\n\t\t});\n\t\tsidebar.add(btnRun, gbc_sidebar);\n\t\tcomponents.add(btnRun);\n\t\t\n\t\t// reset button\n\t\tfinal JButton btnReset = new JButton(new AbstractAction(\"Reset\") {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tmachine.reset(); // reset the automaton\n\t\t\t\tgraphicManager.clearStates(); // clear state selection\n\t\t\t\tlblCurrentInput.setText(\" \"); // clear read input display\n\t\t\t\t\n\t\t\t\tinputText.setEditable(true); // enable input editing\n\t\t\t\tbtnRun.setEnabled(true); // enable run btn\n\t\t\t\tbtnStepBack.setEnabled(false); // disable step back btn\n\t\t\t\tbtnStepForward.setEnabled(true); // enable step forward btn\n\t\t\t\t\n\t\t\t\tupdate(); // update states, labels, text\n\t\t\t}\n\t\t});\n\t\tgbc_sidebar.gridx++;\n\t\tsidebar.add(btnReset, gbc_sidebar);\n\t\tcomponents.add(btnReset);\n\t\t\n\t\t// step back button:\n\t\t// add arrow icon (Hamilton Continental blue)\n\t\ttry {\n\t\t\tURL url = MainWindow.class.getResource(\"/resources/arrow_left.png\");\n\t\t\tbtnStepBack.setIcon(new ImageIcon(url));\n\t\t\tbtnStepBack.setHorizontalTextPosition(SwingConstants.TRAILING);\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tbtnStepBack.setText(\"<-- Step\");\n\t\t}\n\t\t// add button action\n\t\tbtnStepBack.addActionListener(new AbstractAction() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tgraphicManager.clearStates(); // clear selections\n\t\t\t\tmachine.stepBack();\n\t\t\t\t\n\t\t\t\t// if reached beginning of current input\n\t\t\t\tif (machine.atStart()) {\n\t\t\t\t\tbtnStepBack.setEnabled(false); // disable step back\n\t\t\t\t\tlblCurrentInput.setText(\" \"); // clear read input display\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tlblCurrentInput.setText(\"Just read: \" + \n\t machine.getCurrentInput());\n\t\t\t\tbtnStepForward.setEnabled(true); // enable step forward\n\t\t\t\tupdate(); // update states, labels, text\n\t\t\t}\n\t\t});\n\t\tbtnStepBack.setEnabled(false); // disable step back\n\t\tgbc_sidebar.gridx = 0;\n\t\tgbc_sidebar.gridy++;\n\t\tsidebar.add(btnStepBack, gbc_sidebar);\n\t\tcomponents.add(btnStepBack);\n\t\t\n\t\t// step forward button:\n\t\t// add arrow icon (Hamilton Continental blue)\n\t\ttry {\n\t\t\tURL url = MainWindow.class.getResource(\"/resources/arrow_right.png\");\n\t\t\tbtnStepForward.setIcon(new ImageIcon(url));\n\t\t\tbtnStepForward.setHorizontalTextPosition(SwingConstants.LEADING);\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tbtnStepForward.setText(\"Step -->\");\n\t\t}\n\t\t// add button action\n\t\tbtnStepForward.addActionListener(new AbstractAction() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\n\t\t\t\t// if first step, set input\n\t\t\t\tif (machine.atStart())\n\t\t\t\t\tmachine.setInput(inputText.getText());\n\t\t\t\t\n\t\t\t\ttry { \n\t\t\t\t\tmachine.step(); // take a step\n\t\t\t\t\t\n\t\t\t\t\t// if there is input\n\t\t\t\t\tif (inputText.getText().length() > 0) {\n\t\t\t\t\t\tinputText.setEditable(false); // disable input edit\n\t\t\t\t\t\tbtnRun.setEnabled(false); // disable run\n\t\t\t\t\t\tbtnStepBack.setEnabled(true); // enable step back\n\n\t\t\t\t\t\t// report character just read\n\t\t\t\t\t\tlblCurrentInput.setText(\"Just read: \" + \n\t\t\t\t\t\t machine.getCurrentInput());\n\t\t\t\t\t}\n\n\t\t\t\t\t// if end of input, disable step forward\n\t\t\t\t\tif (! (machine.getStatus().equals(Automaton.READY) ||\n\t\t\t\t\t\t\tmachine.getStatus().equals(Automaton.RUN)))\n\t\t\t\t\t\tbtnStepForward.setEnabled(false);\n\t\t\t\t\t\n\t\t\t\t} catch (NoStartStateDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t} catch (NoTransitionDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t}\n\t\t\t\tupdate(); // update states, labels, text\n\t\t\t}\n\t\t});\n\t\tgbc_sidebar.gridx++;\n\t\tsidebar.add(btnStepForward, gbc_sidebar);\n\t\tcomponents.add(btnStepForward);\n\t\t\n\t\t// input label\n\t\tlblInput = new JLabel(\"Input:\");\n\t\tgbc_sidebar.insets = new Insets(5, 5, 0, 5); // T, L, B, R\n\t\tgbc_sidebar.anchor = GridBagConstraints.SOUTH;\n\t\tgbc_sidebar.gridx = 0;\n\t\tgbc_sidebar.gridy++;\n\t\tgbc_sidebar.gridwidth = 2; // fill entire row\n\t\tsidebar.add(lblInput, gbc_sidebar);\n\t\tcomponents.add(lblInput);\n\t\t\n\t\t// input text field (scrollable)\n\t\tinputText = new JTextArea();\n\t\tJScrollPane areaScrollPane = new JScrollPane(inputText);\n\t\tgbc_sidebar.insets = new Insets(0, 5, 5, 5); // T, L, B, R\n\t\tgbc_sidebar.gridy++;\n\t\tgbc_sidebar.weighty = 1.0;\n\t\tgbc_sidebar.fill = GridBagConstraints.BOTH;\n\t\tsidebar.add(areaScrollPane, gbc_sidebar);\n\t\tcomponents.add(inputText);\n\t\t\n\t\t// current input label\n\t\tlblCurrentInput = new JLabel(\" \");\n\t\tgbc_sidebar.insets = new Insets(5, 5, 5, 5);\n\t\tgbc_sidebar.gridy++;\n\t\tgbc_sidebar.weighty = 0;\n\t\tgbc_sidebar.fill = GridBagConstraints.NONE;\n\t\tsidebar.add(lblCurrentInput, gbc_sidebar);\n\t\tcomponents.add(lblCurrentInput);\n\t\t\n\t\t// status label\n\t\tlblStatus = new JLabel(\"Status: \" + machineStatus); // default: ready\n\t\tgbc_sidebar.gridy++;\n\t\tsidebar.add(lblStatus, gbc_sidebar);\n\t\tcomponents.add(lblStatus);\n\t\t\n\t\t// automaton type label\n\t\tlblType = new JLabel(\"Type: \" + machineType); // default: DFA\n\t\tgbc_sidebar.gridy++;\n\t\tsidebar.add(lblType, gbc_sidebar);\n\t\tcomponents.add(lblType);\n\t}", "private HorizontalPanel createCommands() {\n\t\tfinal HorizontalPanel bar = new HorizontalPanel();\n\t\tbar.addStyleName(AbstractField.CSS.cbtAbstractCommand());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Save button\n\t\t//-----------------------------------------------\n\t\tfinal CommandButton saveButton = new CommandButton(this, AbstractField.CONSTANTS.allSave(), actorUpdate, tab++);\n\t\tsaveButton.addStyleName(AbstractField.CSS.cbtCommandButtonTwo());\n\t\tsaveButton.addStyleName(AbstractField.CSS.cbtGradientBlue());\n\t\tsaveButton.setTitle(AbstractField.CONSTANTS.helpSave());\n\t\tbar.add(saveButton);\n\n\t\t//-----------------------------------------------\n\t\t// Delete button\n\t\t//-----------------------------------------------\n\t\tfinal CommandButton deleteButton = new CommandButton(this, AccessControl.DELETE_PERMISSION, AbstractField.CONSTANTS.allDelete(), actorDelete, tab++);\n\t\tdeleteButton.addStyleName(AbstractField.CSS.cbtCommandButtonTwo());\n\t\tdeleteButton.addStyleName(AbstractField.CSS.cbtGradientRed());\n\t\tdeleteButton.setTitle(AbstractField.CONSTANTS.helpDelete());\n\t\tbar.add(deleteButton);\n\n\t\t//-----------------------------------------------\n\t\t// Transition array that defines the finite state machine\n\t\t//-----------------------------------------------\n\t\tfsm = new ArrayList<Transition>();\n\t\tfsm.add(new Transition(Party.CREATED, saveButton, Party.CREATED));\n\t\tfsm.add(new Transition(Party.CREATED, deleteButton, Party.FINAL));\n\n\t\treturn bar;\n\t}", "public void createStatusBar(JPanel bar) {\n bar.setPreferredSize(new Dimension(getWidth(), 25));\n bar.setBackground(Color.LIGHT_GRAY);\n\n // add into container\n bar.add(paintModule.sizeLabel);\n bar.add(paintModule.coordinate);\n\n }", "public void initNavigationBar() {\n navigationBar = new JPanel();\n navigationBar.setBackground(new Color(199, 0, 0));\n navigationBar.setLayout(new FlowLayout());\n navigationBar.setPreferredSize(new Dimension(buttonHeight + 10, buttonHeight + 10));\n navigationBar.setBorder(BorderFactory.createBevelBorder(0));\n\n initMarketButton();\n initProdCardButton();\n initReserveButton();\n initPlayerMenu();\n\n this.navigationBar.add(marketButton);\n this.navigationBar.add(prodCardButton);\n this.navigationBar.add(reserveButton);\n this.navigationBar.add(menuPanel);\n\n }", "public StatusBar() {\r\n setLayout(new BorderLayout());\r\n setPreferredSize(new Dimension(100, 20));\r\n panel = new WebPanel();\r\n BoxLayout boxLayout = new BoxLayout(panel, BoxLayout.LINE_AXIS);\r\n panel.setLayout(boxLayout);\r\n panel.add(Box.createHorizontalGlue());\r\n add(panel, BorderLayout.CENTER);\r\n setVisible(false);\r\n }", "private FlowPane setMainMenu() {\n FlowPane mainMenu = new FlowPane();\n mainMenu.setAlignment(Pos.CENTER);\n mainMenuButtons = new Button[3];\n String[] buttonText = {\"Flashcards\", \"Quizes\", \"Scores\"};\n for (int i = 0; i < mainMenuButtons.length; i++) {\n mainMenuButtons[i] = createButton(buttonText[i], TEXT_SIZE, 10);\n FlowPane.setMargin(mainMenuButtons[i], new Insets(10, 10, 30, 10));\n mainMenu.getChildren().add(mainMenuButtons[i]);\n }\n return mainMenu;\n }", "private void updateLeftPanel(DatasetInformation datasetInfos) {\r\n\r\n this.datasetInfo = datasetInfos;\r\n if (leftPanelView != null) {\r\n leftPanelView.deparent();\r\n }\r\n leftPanelView = new LeftPanelView(Selection_Manager, DivaClientService, datasetInfos, leftPanelWidth, leftPanelHeight);\r\n leftPanelView.setStyleName(\"whitelayout\");\r\n RootPanel.get(\"leftpanel\").clear(true);\r\n RootPanel.get(\"leftpanel\").add(leftPanelView);\r\n midPanelLayoutCanv.setStyleName(\"diva_mid_panel_border\");\r\n }", "public VBox addVBoxLeft() {\r\n\t\t\r\n\t\tText text = new Text(\"Log: \");\r\n\t\ttext.setFont(new Font(\"Agency FB\", 20));\t\t\t\t//set font and size of text\r\n\t\t\r\n\t\tlog = new TextArea();\r\n\t\tlog.setEditable(false);\t\t\t\t\t\t\t\t\t//Log not editable\r\n\t \r\n\t\tVBox vBoxLeft = new VBox(text,log);\t\t\t\t\t\t//Putting text and log into the VBox\r\n\t vBoxLeft.setPadding(new Insets(15, 15, 15, 15));\t\t//Padding around the vBox\r\n\t vBoxLeft.setPrefSize(200, 600);\t\t\t\t\t\t\t//Preferred size\r\n\t vBoxLeft.setSpacing(1);\t\t\t\t\t\t\t\t\t//Adding space between stuff\r\n\t vBoxLeft.setStyle(\"-fx-background-color: #f0f8ff;\");\t//Set background color\r\n\t \r\n\t return vBoxLeft;\r\n\t}", "public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }", "private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n frame.setLayout(new BorderLayout());\n frame.getContentPane().add(utilityBar, BorderLayout.WEST);\n frame.getContentPane().add(menuBar,BorderLayout.NORTH);\n frame.getContentPane().add(drawingArea);\n frame.setLocationRelativeTo( null );\n frame.setVisible(true);\n frame.pack();\n\n }", "public JPanel createDeclarationButtonBar() {\n\tJPanel buttonBar = new JPanel();\n\tBoxLayout boxlay=new BoxLayout(buttonBar,BoxLayout.Y_AXIS); //i think this does setLayout\n\tbuttonBar.setLayout(boxlay);\n\tbuttonBar.setBorder(new BevelBorder(BevelBorder.RAISED));\n\n\t//alignment = left\n\tFlowLayout flowlay1=new FlowLayout(FlowLayout.LEFT); //left justified\n\tFlowLayout flowlay2=new FlowLayout(FlowLayout.LEFT); //left justified\n\tJPanel buttonTopBar = new JPanel(flowlay1); //left justified\n\tJPanel buttonLowerBar = new JPanel(flowlay2);\n\n\t//JButton addVarTopButton=new JButton(\"Add Top Var\"); \n\tJButton addInputPortButton=new JButton(\"Add InputPort\"); \n\tJButton addOutputPortButton=new JButton(\"Add OutputPort\"); \n\tJButton addSubModuleButton=new JButton(\"Add SubModule\"); \n\tJButton addVarBottomButton=new JButton(\"Add Other Variable\"); \n\n\t//buttonTopBar.add(addVarTopButton);\n\tbuttonTopBar.add(addInputPortButton);\n\tbuttonTopBar.add(addOutputPortButton);\n\tbuttonTopBar.add(addSubModuleButton);\n\tbuttonTopBar.add(addVarBottomButton);\n\n\t//addVarTopButton.addActionListener(this);\n\taddInputPortButton.addActionListener(this);\n\taddOutputPortButton.addActionListener(this);\n\taddSubModuleButton.addActionListener(this);\n\taddVarBottomButton.addActionListener(this);\n\n //lower bar\n\n\tJButton changeButton=new JButton(\"Change\"); \n\tchangeButton.addActionListener(this);\n\tbuttonLowerBar.add(changeButton);\n\n\tJButton changeNameButton=new JButton(\"Change Name\"); \n\tchangeNameButton.addActionListener(this);\n\tbuttonLowerBar.add(changeNameButton);\n\n\tJButton copyButton=new JButton(\"Copy\"); \n\tcopyButton.addActionListener(this);\n\tbuttonLowerBar.add(copyButton);\n\n\tJButton deleteButton=new JButton(\"Delete\"); \n\tdeleteButton.addActionListener(this);\n\tbuttonLowerBar.add(deleteButton);\n\n\tJButton upButton=new JButton(\"Up\"); \n\tupButton.addActionListener(this);\n\tbuttonLowerBar.add(upButton);\n\n\tJButton downButton=new JButton(\"Down\"); \n\tdownButton.addActionListener(this);\n\tbuttonLowerBar.add(downButton);\n\n\tJButton topButton=new JButton(\"Top\"); \n\ttopButton.addActionListener(this);\n\tbuttonLowerBar.add(topButton);\n\n\tJButton bottomButton=new JButton(\"Bottom\"); \n\tbottomButton.addActionListener(this);\n\tbuttonLowerBar.add(bottomButton);\n\n buttonBar.add(buttonTopBar);\n buttonBar.add(buttonLowerBar);\n\treturn(buttonBar);\n }", "private void controllersUI() {\n\t\tc.setLayout(null);\n\t\tc.setBackground(whiteColor);\n\t\t\n\t\tlbPullTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbPullTitle.setOpaque(true);\n\t\tlbPullTitle.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 18));\n\t\tlbPullTitle.setBounds(0, 0, 320, 52);\n\t\t\n\t\ttxtPulls.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 12));\n\t\ttxtPulls.setBounds(0, 52, 320, 420);\n\t\t\n\t\ttxtMsg.setBounds(10, 480, 230, 35);\n\t\tbtnMsg.setBounds(250, 476, 60, 40);\n\t\t\n\t\tc.add(txtPulls);\n\t\tc.add(lbPullTitle);\n\t\tc.add(btnMsg);\n\t\tc.add(txtMsg);\n\t\t\n\t\tbtnMsg.addActionListener(this);\n\t}", "private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }", "void setupBars() {\n\n // ID, Horiz, Left\n bars.add(new LedBar(0, false, true));\n bars.add(new LedBar(1, true, true));\n bars.add(new LedBar(2, false, false));\n bars.add(new LedBar(3, false, true));\n bars.add(new LedBar(4, true, true));\n bars.add(new LedBar(5, true, false));\n bars.add(new LedBar(6, true, false));\n bars.add(new LedBar(7, true, false));\n bars.add(new LedBar(8, true, false));\n bars.add(new LedBar(9, true, true));\n bars.add(new LedBar(10, false, true));\n bars.add(new LedBar(11, false, false));\n bars.add(new LedBar(12, true, true));\n bars.add(new LedBar(13, false, false));\n bars.add(new LedBar(14, false, true));\n\n // hnext, hprev, vbro\n bars.get(0).setLinks(null, null, bars.get(4));\n bars.get(1).setLinks(bars.get(4), bars.get(8), bars.get(3));\n bars.get(2).setLinks(null, null, bars.get(5));\n bars.get(3).setLinks(null, null, bars.get(1));\n bars.get(4).setLinks(bars.get(9), bars.get(1), bars.get(0));\n bars.get(5).setLinks(bars.get(6), bars.get(12), bars.get(2));\n bars.get(6).setLinks(bars.get(7), bars.get(5), bars.get(11));\n bars.get(7).setLinks(bars.get(8), bars.get(6), bars.get(13));\n bars.get(8).setLinks(bars.get(1), bars.get(7), null); //Only one that hasn't got a vertical 'brother'\n bars.get(9).setLinks(bars.get(12), bars.get(4), bars.get(14));\n bars.get(10).setLinks(null, null, bars.get(12));\n bars.get(11).setLinks(null, null, bars.get(6));\n bars.get(12).setLinks(bars.get(5), bars.get(9), bars.get(10));\n bars.get(13).setLinks(null, null, bars.get(7));\n bars.get(14).setLinks(null, null, bars.get(9));\n\n verticals.add(0);\n verticals.add(2);\n verticals.add(3);\n verticals.add(10);\n verticals.add(11);\n verticals.add(13);\n verticals.add(14);\n }", "private HBox addTopBox() {\n\n // Create a menuTab that is holding all menu nodes to return\n HBox menuTab = new HBox();\n menuTab.setStyle(\"-fx-background-color: DAE6F3;\");\n menuTab.setAlignment(Pos.CENTER);\n menuTab.setPadding(new Insets(15, 12, 15, 12));\n menuTab.setSpacing(10);\n\n // Game status label and Speed controller\n HBox speedTab = new HBox();\n speedTab.setPrefWidth(200);\n speedTab.setSpacing(10);\n speedTab.setAlignment(Pos.CENTER_LEFT);\n Label speedLbl= new Label(\"Speed:\");\n speedLbl.setPrefWidth(80);\n speedLbl.setAlignment(Pos.CENTER);\n\n Slider speedCtrl = new Slider();\n speedCtrl.setPrefWidth(80);\n speedCtrl.setMin(0); speedCtrl.setMax(2);\n speedCtrl.setValue(1);\n speedCtrl.setTooltip(new Tooltip(\"Game Speed\"));\n speedCtrl.setOnMouseDragged(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent mouseEvent) {\n timeline.setRate(speedCtrl.getValue());\n gaming.setRate(Math.max(speedCtrl.getValue(), 0.01D));\n }\n });\n speedTab.getChildren().addAll(speedLbl, speedCtrl);\n //TODO get status?\n timeline.statusProperty().addListener(new ChangeListener<Animation.Status>() {\n @Override\n public void changed(ObservableValue<? extends Animation.Status> observableValue, Animation.Status status, Animation.Status t1) {\n speedLbl.setText(t1.toString());\n }\n });\n\n // Assemble buttons into menuTab\n ButtonBar bb = new ButtonBar();\n Button play = new Button(\"Play\");\n Button pause = new Button(\"Pause\");\n Button reset = new Button(\"Reset\");\n bb.getButtons().addAll(play, pause, reset);\n\n bb.getButtons().forEach(b -> {\n ((Button) b).setPrefWidth(80);\n ((Button) b).setBackground(new Background(bgf));\n ((Button) b).setBorder(new Border(bos));\n });\n\n // Set ActionEvent for 3 buttons\n play.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n if (timeline.getStatus().toString().equals(\"STOPPED\")) {\n gameMap = new CreatureControl(plantQuantity, trexQuantity);\n root.setCenter(gameMap);\n frame = new KeyFrame(Duration.millis(10), new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent e) {\n if (!gameMap.run()) {\n bgmHelper = true;\n playBGM();\n }\n }\n });\n if (!timeline.getKeyFrames().isEmpty()) timeline.getKeyFrames().remove(0); // Help to stable the reset\n timeline.getKeyFrames().add(frame);\n timeline.setRate(1.0D);\n gaming.setRate(1.0D);\n speedCtrl.setValue(1.0D);\n playBGM();\n gameStart = true;\n }\n timeline.play();\n }\n });\n\n pause.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n if (gameStart) timeline.pause();\n }\n });\n\n reset.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n // Reset to title frame in what ever status\n if (gameStart) {\n timeline.stop();\n timeline.setRate(1.0D);\n gaming.setRate(1.0D);\n speedCtrl.setValue(1.0D);\n playBGM();\n gameStart = false;\n bgmHelper = false;\n gameMap = new CreatureControl();\n root.setCenter(gameMap);\n }\n }\n });\n\n // Assemble all nodes into menuTab.\n menuTab.getChildren().addAll(bb, speedTab);\n menuTab.setBorder(new Border(bos));\n return menuTab;\n }", "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}", "void leftView()\n {\n leftViewUtil(root, 1);\n }", "private void createLabels() {\n\n // Add status labels\n infoItem = new ToolItem(toolbar, SWT.SEPARATOR);\n infoComposite = new Composite(toolbar, SWT.NONE);\n infoItem.setControl(infoComposite);\n infoComposite.setLayout(null);\n\n labelAttribute = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelAttribute.setText(Resources.getMessage(\"MainToolBar.33\")); //$NON-NLS-1$\n labelAttribute.pack(); \n labelTransformations = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelTransformations.setText(Resources.getMessage(\"MainToolBar.33\")); //$NON-NLS-1$\n labelTransformations.pack();\n labelSelected = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelSelected.setText(Resources.getMessage(\"MainToolBar.31\")); //$NON-NLS-1$\n labelSelected.pack();\n labelApplied = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelApplied.setText(Resources.getMessage(\"MainToolBar.32\")); //$NON-NLS-1$\n labelApplied.pack();\n \n // Copy info to clip board on right-click\n Menu menu = new Menu(toolbar);\n MenuItem itemCopy = new MenuItem(menu, SWT.NONE);\n itemCopy.setText(Resources.getMessage(\"MainToolBar.42\")); //$NON-NLS-1$\n itemCopy.addSelectionListener(new SelectionAdapter(){\n public void widgetSelected(SelectionEvent arg0) {\n if (tooltip != null) {\n Clipboard clipboard = new Clipboard(toolbar.getDisplay());\n TextTransfer textTransfer = TextTransfer.getInstance();\n clipboard.setContents(new String[]{tooltip}, \n new Transfer[]{textTransfer});\n clipboard.dispose();\n }\n }\n });\n labelSelected.setMenu(menu);\n labelApplied.setMenu(menu);\n labelTransformations.setMenu(menu);\n \n // Add listener for layout\n toolbar.addControlListener(new ControlAdapter() {\n @Override\n public void controlResized(final ControlEvent arg0) {\n layout();\n }\n });\n }", "@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}", "public MainMenu() {\n initComponents();\n formDashboardHeaderLabelId.setVisible(false);\n formDashboardHeaderLabelNik.setVisible(false);\n }", "private Composite createTopBar(Composite parent, int span) {\n\t\tComposite c = new Composite(parent, SWT.NO_BACKGROUND);\n\n\t\tGridData cData = new GridData();\n\t\tcData.horizontalSpan = span;\n\t\tcData.horizontalAlignment = GridData.FILL;\n\t\tc.setLayoutData(cData);\n\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 3;\n\t\tc.setLayout(layout);\n\n\n\t\tLabel weightLabel = new Label(c, SWT.LEFT);\n\t\tGridData weightData = new GridData();\n\t\tweightData.grabExcessHorizontalSpace = true;\n\t\tweightLabel.setLayoutData(weightData);\n\t\tweightLabel.setText(Resources.getMessage(\"RiskWizard.19\"));\n\t\tFontDescriptor boldDescriptor = FontDescriptor.createFrom(weightLabel.getFont()).setStyle(SWT.BOLD);\n\t\tFont boldFont = boldDescriptor.createFont(weightLabel.getDisplay());\n\t\tweightLabel.setFont(boldFont);\n\t\tfileLabel = weightLabel;\n\t\t\n\t\tfinal Combo visualizationDropDown = new Combo(c, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER);\n\t\tString monitorTitle = Resources.getMessage(\"RiskWizard.12\");\n\t\tString stacksTitle = Resources.getMessage(\"RiskWizard.13\");\n\t\tvisualizationDropDown.add(monitorTitle);\n\t\tvisualizationDropDown.add(stacksTitle);\n\t\tvisualizationDropDown.setText(monitorTitle);\n\t\tvisualizationDropDown.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString selected = visualizationDropDown.getText(); \n\t\t\t\tif(selected.equals(stacksTitle)) {\n\t\t\t\t\t//System.out.println(\"Select Stacks\");\n\t\t\t\t\tshowStacksVisualization();\n\t\t\t\t} else if(selected.equals(monitorTitle)) {\n\t\t\t\t\t//System.out.println(\"Select Monitor\");\n\t\t\t\t\tshowMonitorVisualization();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tLabel separator = new Label(c, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tGridData sepData = new GridData();\n\t\tsepData.horizontalSpan = layout.numColumns;\n\t\tsepData.grabExcessHorizontalSpace = true;\n\t\tsepData.horizontalAlignment = GridData.FILL;\n\t\tseparator.setLayoutData(sepData);\n\n\t\ttopBar = c;\n\t\treturn c;\n\t}", "void leftView() \n\t\t{ \n\t\t\tleftViewUtil(root, 1); \n\t\t}", "public Menu(Controller controller, String label) {\n\t\tsuper(new BorderLayout());\n\t\tmenuToolBar = new JToolBar();\n\t\tadd(menuToolBar, BorderLayout.PAGE_START);\n\t\tthis.controller = controller;\n\t\tJLabel jLabel = new JLabel(label);\n\t\tjLabel.setOpaque(true);\n\t\tadd(jLabel);\n\t\taddSeparator();\n\t\taddSeparator();\n\t}", "public static void addComponents(){\n navBar.add(heading);\n navBar.add(logoutBtn);\n navBar.setLayout(new BorderLayout());\n panel.add(navBar);\n panel.add(industrys);\n panel.setLayout(new BorderLayout());\n }", "public JPanel menuPanel() {\n\t\tJPanel mpanel = new JPanel(null);\n\t\tmpanel.setBounds(0, 100, 700, 300);\n\t\tmpanel.setBackground(Color.PINK);\n\t\tFont lblfont = new Font(\"SansSerif\", Font.BOLD, 30);\n\t\t\n\t\tworkerBtn = new JButton(workerpic);\n\t\tvisitorBtn = new JButton(visitorpic);\n\t\tworkerBtn.addActionListener(this);\n\t\tvisitorBtn.addActionListener(this);\n\t\tvisitorBtn.setBounds(100, 50, 150, 200);\n\t\tworkerBtn.setBounds(450, 50, 150, 200);\n\t\t\n\t\tlblworker.setBounds(450, 0, 150, 50);\n\t\tlblvisitor.setBounds(100, 0, 150, 50);\n\t\tlblworker.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblvisitor.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblworker.setFont(lblfont);\n\t\tlblvisitor.setFont(lblfont);\n\t\tmpanel.add(lblworker);\n\t\tmpanel.add(lblvisitor);\n\t\tmpanel.add(visitorBtn);\n\t\tmpanel.add(workerBtn);\n\t\treturn mpanel;\n\t}", "public AppMain(String title) {\n setTitle(title);\n leftPanel = new LeftPanel();\n jTabbedPane = new JTabbedPane();\n menuBar = new JMenuBar();\n addMenuItems();\n horizontalPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, jTabbedPane);\n verticalPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, menuBar, horizontalPane);\n horizontalPane.setResizeWeight(0.2);\n verticalPane.setResizeWeight(0.03);\n add(verticalPane);\n setSize(1280, 720);\n setVisible(true);\n setResizable(false);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n verticalPane.resetToPreferredSizes();\n horizontalPane.resetToPreferredSizes();\n horizontalPane.setEnabled(false);\n verticalPane.setEnabled(false);\n addPanelActionListeners();\n createWorkSpace();\n }", "@FXML\n public void addBar() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingBar(0, 0));\n }", "public static void MainMenuComponents(){\n\t\tInterface.menu = new JPanel(new GridBagLayout()) {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic void paintComponent(Graphics g) {\n\n\t\t\t\tg.drawImage(Interface.img, 0, 0, null);\n\t\t\t}\n\t\t};\n\t\tInterface.single.setPreferredSize(Interface.dim);\n\t\tInterface.single.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.single.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.single.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.single.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.multi.setPreferredSize(Interface.dim);\n\t\tInterface.multi.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.multi.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.multi.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.multi.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.options.setPreferredSize(Interface.dim);\n\t\tInterface.options.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.options.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.options.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.options.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.exit.setPreferredSize(Interface.dim);\n\t\tInterface.exit.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.exit.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.exit.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.exit.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.game.setFocusable(true);\n\t\tInterface.menu.setFocusable(true);\n\t\t\n\t\t\n\t\tInterface.backtosingle.setPreferredSize(Interface.dim);\n\t\tInterface.backtosingle.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtosingle.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtosingle.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtosingle.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.backtomulti.setPreferredSize(Interface.dim);\n\t\tInterface.backtomulti.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtomulti.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtomulti.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtomulti.setForeground(Color.white);\n\t}", "public Toolbar() {\n\t\tsuper();\n\t\tthis.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\tboxColor = new Color(230, 230, 184);\n\t\tbuttonColor = new Color(255, 255, 102);\n\t\t// graphBottomColor = new Color(108, 123, 139);\n\t\t// graphTopColor = new Color(159, 182, 205);\n\t\t// titleRectColor = new Color(184, 230, 92);\n\n\t\teventTypeLabel = new JLabel(\"Event Type:\");\n\t\teventTypeDropDown = new Choice();\n\n\t\tareaLabel = new JLabel(\"Area:\");\n\t\tareaDropDown = new Choice();\n\n\t\tnumberOfPmuLabel = new JLabel(\"Number of PMU:\");\n\t\tnumberOfPmuDropDown = new Choice();\n\n\t\tnoiseLabel = new JLabel(\"Varience of Noise:\");\n\t\tlowNoiseTextBox = new JTextField(5);\n\t\thighNoiseTextBox = new JTextField(5);\n\n\t\t// adding data to drop down\n\t\teventTypeDropDown.add(\"-----\");\n\t\teventTypeDropDown.add(\"Fault\");\n\t\teventTypeDropDown.add(\"Generation Loss\");\n\t\teventTypeDropDown.add(\"Load Switch Off\");\n\t\teventTypeDropDown.add(\"Load Switch On\");\n\t\teventTypeDropDown.add(\"Reactive Power Excluded\");\n\t\teventTypeDropDown.add(\"Reactive Power Introduced\");\n\t\teventTypeDropDown.add(\"Synchronous Motor Switching Off\");\n\t\teventTypeDropDown.add(\"Series Capacitor Switching Off\");\n\t\teventTypeDropDown.add(\"Series Capacitor Switching On\");\n\n\t\t// adding data to drop down\n\t\tareaDropDown.add(\"ALBERTA -- 54\");\n\t\tareaDropDown.add(\"ARIZONA -- 14\");\n\t\tareaDropDown.add(\"B.C. HYDRO -- 50\");\n\t\tareaDropDown.add(\"EL PASO -- 11\");\n\t\tareaDropDown.add(\"IDAHO -- 60\");\n\t\tareaDropDown.add(\"IMPERIALCA -- 21\");\n\t\tareaDropDown.add(\"LADWP -- 26\");\n\t\t// areaDropDown.add(\"MEXICO-CFE -- 20\");\n\t\tareaDropDown.add(\"MONTANA -- 62\");\n\t\tareaDropDown.add(\"NEVADA -- 18\");\n\t\tareaDropDown.add(\"NEW MEXICO -- 10\");\n\t\tareaDropDown.add(\"NORTHWEST -- 40\");\n\t\tareaDropDown.add(\"PACE -- 65\");\n\t\tareaDropDown.add(\"PG AND E -- 30\");\n\t\tareaDropDown.add(\"PSCOLORADO -- 70\");\n\t\tareaDropDown.add(\"SANDIEGO -- 22\");\n\t\tareaDropDown.add(\"SIERRA -- 64\");\n\t\tareaDropDown.add(\"SOCALIF -- 24\");\n\t\tareaDropDown.add(\"FORTISBC -- 52\");\n\t\tareaDropDown.add(\"WAPA R.M. -- 73\");\n\t\t// areaDropDown.add(\"WAPA U.M. -- 63\");\n\n\t\t// adding data to drop down\n\t\tnumberOfPmuDropDown.add(\"10\");\n\t\tnumberOfPmuDropDown.add(\"9\");\n\t\tnumberOfPmuDropDown.add(\"8\");\n\t\tnumberOfPmuDropDown.add(\"7\");\n\t\tnumberOfPmuDropDown.add(\"6\");\n\t\tnumberOfPmuDropDown.add(\"5\");\n\t\tnumberOfPmuDropDown.add(\"4\");\n\t\tnumberOfPmuDropDown.add(\"3\");\n\t\tnumberOfPmuDropDown.add(\"2\");\n\t\tnumberOfPmuDropDown.add(\"1\");\n\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setFocusPainted(false);\n\t\tstopButton = new JButton(\"Stop\");\n\t\tstopButton.setFocusPainted(false);\n\t\tcreateEventButton = new JButton(\"Disturbance\");\n\t\tcreateEventButton.setFocusPainted(false);\n\t\tcreateEventButton.setEnabled(false);\n\t\tstopButton.setEnabled(false);\n\n\t\teventTypeDropDown.setBackground(boxColor);\n\t\tareaDropDown.setBackground(boxColor);\n\t\tnumberOfPmuDropDown.setBackground(boxColor);\n\n\t\tstartButton.setBackground(Color.green);\n\t\tstopButton.setBackground(Color.red);\n\t\tcreateEventButton.setBackground(buttonColor);\n\n\t\tstartButton.setForeground(Color.black);\n\t\tstopButton.setForeground(Color.black);\n\n\t\t// adding components to the panel\n\t\tthis.add(eventTypeLabel);\n\t\tthis.add(eventTypeDropDown);\n\n\t\tthis.add(areaLabel);\n\t\tthis.add(areaDropDown);\n\n\t\tthis.add(numberOfPmuLabel);\n\t\tthis.add(numberOfPmuDropDown);\n\n\t\tthis.add(noiseLabel);\n\t\tthis.add(lowNoiseTextBox);\n\t\tthis.add(highNoiseTextBox);\n\n\t\tthis.add(startButton);\n\t\tthis.add(stopButton);\n\t\tthis.add(createEventButton);\n\n\t\t// listeners get initialized here so that when the toolbar is\n\t\t// constructed there in only one instance of the listeners\n\t\tstartButton.addActionListener(new ToolbarListener(\n\t\t\t\tToolbarListener.START_BUTTON, tools));\n\t\tstopButton.addActionListener(new ToolbarListener(\n\t\t\t\tToolbarListener.STOP_BUTTON, tools));\n\t\tcreateEventButton.addActionListener(new ToolbarListener(\n\t\t\t\tToolbarListener.CREATE_EVENT_BUTTON, tools));\n\n\t}", "protected JButton createLeftOneTouchButton() {\n/* 116 */ SynthArrowButton synthArrowButton = new SynthArrowButton(1);\n/* 117 */ int i = lookupOneTouchSize();\n/* */ \n/* 119 */ synthArrowButton.setName(\"SplitPaneDivider.leftOneTouchButton\");\n/* 120 */ synthArrowButton.setMinimumSize(new Dimension(i, i));\n/* 121 */ synthArrowButton.setCursor(Cursor.getPredefinedCursor(0));\n/* 122 */ synthArrowButton.setFocusPainted(false);\n/* 123 */ synthArrowButton.setBorderPainted(false);\n/* 124 */ synthArrowButton.setRequestFocusEnabled(false);\n/* 125 */ synthArrowButton.setDirection(mapDirection(true));\n/* 126 */ return synthArrowButton;\n/* */ }", "private void setupUI() {\n\t\tpanel1 = new JPanel();\n\t\tpanel1.setLayout(new BorderLayout(0, 0));\n\t\tfinal JPanel panel2 = new JPanel();\n\t\tpanel2.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2));\n\t\tpanel2.setBackground(Color.BLACK);\n\t\tpanel2.setPreferredSize(new Dimension(800, 34));\n\t\tpanel1.add(panel2, BorderLayout.SOUTH);\n\t\tstopButton = new JButton();\n\t\tstopButton.setText(\"STOP\");\n\t\tstopButton.setPreferredSize(new Dimension(82, 30));\n\t\tpanel2.add(stopButton);\n\t\tclsButton = new JButton();\n\t\tclsButton.setPreferredSize(new Dimension(82, 30));\n\t\tclsButton.setText(\"CLS\");\n\t\tpanel2.add(clsButton);\n\t\trunButton = new JButton();\n\t\trunButton.setPreferredSize(new Dimension(82, 30));\n\t\trunButton.setText(\"RUN\");\n\t\tpanel2.add(runButton);\n\t\tcaretLabel = new JLabel();\n\t\tcaretLabel.setPreferredSize(new Dimension(82, 30));\n\t\tcaretLabel.setForeground(Color.pink);\n\t\tpanel2.add(caretLabel);\n\t\tmainTextArea = new ShellTextComponent(this);\n\t\tmainTextArea.setCaretColor(new Color(Colors.COLORS[14]));\n\t\tfinal JScrollPane scrollPane1 = new JScrollPane(mainTextArea);\n\n\t\tpanel1.add(scrollPane1, BorderLayout.CENTER);\n\t\tpanel1.setPreferredSize(new Dimension(800, 600));\n\t}", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "public void createMenu() {\n\t\tmenuBar.add(createGameMenuColumn());\n\t\tmenuBar.add(createTestsMenuColumn());\n\t\tmenuBar.add(createCheatsMenuColumn());\n\n\t\tparentMainView.setJMenuBar(menuBar);\n\t}", "public ClusteringPnlLeft() {\n initComponents();\n setSize(MainGUI.getInstance().getWidth(), MainGUI.getInstance().getHeight());\n setVisible(true);\n checkBoxes = new ArrayList<>();\n pnlAttributes.setLayout(new FlowLayout((int) LEFT_ALIGNMENT));\n \n int numOfAttributes = Data.getInstance().getInstances().numAttributes();\n for (int i = 0; i < numOfAttributes; i++) {\n String name = Data.getInstance().getInstances().attribute(i).name();\n int blank = 30 - name.length();\n for (int j = 0; j < blank; j++) {\n name = name + \" \";\n }\n checkBoxes.add(new JCheckBox(name));\n pnlAttributes.add(checkBoxes.get(i));\n }\n\n }", "private void $$$setupUI$$$() {\n statusPanel = new JPanel();\n statusPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status Label\");\n statusPanel.add(statusLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JSeparator separator1 = new JSeparator();\n statusPanel.add(separator1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "private void createMenuBar() {\n\t\tmenuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(\"Arquivo\");\n\t\tnewMenuItem = new JMenuItem(\"Novo\");\n\n\t\topenMenuItem = new JMenuItem(\"Abrir arquivo\");\n\t\topenMenuItem.addActionListener(new OpenFileHandler());\n\n\t\tsaveMenuItem = new JMenuItem(\"Salvar arquivo\");\n\t\texportMenuItem = new JMenuItem(\"Exportar\");\n\t\texitMenuItem = new JMenuItem(\"Sair\");\n\n\t\t// fileMenu.add(newMenuItem);\n\t\tfileMenu.add(openMenuItem);\n\t\t// fileMenu.add(saveMenuItem);\n\t\t// fileMenu.add(exportMenuItem);\n\t\t// fileMenu.addSeparator();\n\t\t// fileMenu.add(exitMenuItem);\n\n\t\thelpMenu = new JMenu(\"Ajuda\");\n\t\thelpMenuItem = new JMenuItem(\"Ajuda\");\n\t\taboutMenuItem = new JMenuItem(\"Sobre\");\n\n\t\thelpMenu.add(helpMenuItem);\n\t\thelpMenu.add(aboutMenuItem);\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(helpMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "private void initGUI() {\n\t\teditor = new JTextArea();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\tthis.getContentPane().add(new JScrollPane(editor), BorderLayout.CENTER);\n\n\t\tscPane = new JScrollPane(editor);\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tpanel.add(scPane, BorderLayout.CENTER);\n\n\t\tadd(pane);\n\n\t\tJPanel statusBar = new JPanel();\n\t\tJLabel welcomedate;\n\t\twelcomedate = new JLabel();\n\n\t\tstatusBar.setBorder(new BevelBorder(BevelBorder.LOWERED));\n\t\tadd(statusBar, BorderLayout.SOUTH);\n\t\tstatusBar.setPreferredSize(new Dimension(getWidth(), 16));\n\t\tstatusBar.setLayout(new GridLayout(1, 4));\n\n\t\tstatusLabel = new JLabel();\n\t\tlineLabel = new JLabel();\n\t\tcolumnLabel = new JLabel();\n\t\tselectedLabel = new JLabel();\n\n\t\tstatusLabel.setHorizontalAlignment(SwingConstants.LEFT);\n\n\t\tstatusBar.add(statusLabel);\n\n\t\tstatusBar.add(lineLabel);\n\t\tstatusBar.add(columnLabel);\n\t\tstatusBar.add(selectedLabel);\n\n\t\tstatusBar.add(welcomedate, BorderLayout.EAST);\n\n\t\tjavax.swing.Timer time = new javax.swing.Timer(1000, new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjava.util.Date now = new java.util.Date();\n\t\t\t\tString ss = SimpleDateFormat.getDateTimeInstance().format(now);\n\t\t\t\twelcomedate.setText(ss);\n\t\t\t}\n\t\t});\n\t\ttime.start();\n\n\t\tadd(statusBar, BorderLayout.SOUTH);\n\n\t\tsetVisible(true);\n\n\t\tcreateMenus();\n\t\tcreateToolbars();\n\n\t\tcreateLanguageMenu();\n\n\t}", "public IntegracionMenu() {\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 1123, 633);\r\n\t\t\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tmenuBar.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tsetJMenuBar(menuBar);\r\n\t\t\r\n\t\tJMenu mnInicio = new JMenu(\"Inicio\");\r\n\t\tmnInicio.setForeground(Color.BLACK);\r\n\t\tmnInicio.setFont(new Font(\"Segoe UI\", Font.PLAIN, 15));\r\n\t\tmenuBar.add(mnInicio);\r\n\t\t\r\n\t\tJMenu mnArchivo = new JMenu(\"Archivo\");\r\n\t\tmnArchivo.setForeground(Color.BLACK);\r\n\t\tmnArchivo.setFont(new Font(\"Segoe UI\", Font.PLAIN, 15));\r\n\t\tmenuBar.add(mnArchivo);\r\n\t\t\r\n\t\tJMenu mnAyuda = new JMenu(\"Ayuda\");\r\n\t\tmnAyuda.setForeground(Color.BLACK);\r\n\t\tmnAyuda.setFont(new Font(\"Segoe UI\", Font.PLAIN, 15));\r\n\t\tmenuBar.add(mnAyuda);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tcontentPane.add(panel, BorderLayout.WEST);\r\n\t\tGridBagLayout gbl_panel = new GridBagLayout();\r\n\t\tgbl_panel.columnWidths = new int[]{209, 0};\r\n\t\tgbl_panel.rowHeights = new int[]{150, 45, 45, 45, 45, 45, 0, 0, 0, 0};\r\n\t\tgbl_panel.columnWeights = new double[]{1.0, Double.MIN_VALUE};\r\n\t\tgbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel.setLayout(gbl_panel);\r\n\t\t\r\n\t\tJButton button = new JButton(\"Panel Principal\");\r\n\t\tbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"panel inicio\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setLayout(null);\r\n\t\tGridBagConstraints gbc_panel_1 = new GridBagConstraints();\r\n\t\tgbc_panel_1.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_panel_1.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_1.gridx = 0;\r\n\t\tgbc_panel_1.gridy = 0;\r\n\t\tpanel.add(panel_1, gbc_panel_1);\r\n\t\t\r\n\t\tlblID = new JLabel(\"\");\r\n\t\tlblID.setBounds(74, 59, 107, 14);\r\n\t\tpanel_1.add(lblID);\r\n\t\t\r\n\t\t\r\n\t\tlblNombre= new JLabel(\"\");\r\n\t\tlblNombre.setBounds(74, 96, 125, 14);\r\n\t\tpanel_1.add(lblNombre);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"ID:\");\r\n\t\tlblNewLabel.setBounds(10, 59, 46, 14);\r\n\t\tpanel_1.add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNombre_1 = new JLabel(\"Nombre:\");\r\n\t\tlblNombre_1.setBounds(10, 96, 54, 14);\r\n\t\tpanel_1.add(lblNombre_1);\r\n\t\t\r\n\t\tJLabel lblDatosDelLogin = new JLabel(\"Datos del login\");\r\n\t\tlblDatosDelLogin.setBounds(74, 11, 125, 14);\r\n\t\tpanel_1.add(lblDatosDelLogin);\r\n\t\tbutton.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbutton.setPreferredSize(new Dimension(209, 45));\r\n\t\tbutton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbutton.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbutton.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_button = new GridBagConstraints();\r\n\t\tgbc_button.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_button.anchor = GridBagConstraints.NORTH;\r\n\t\tgbc_button.gridx = 0;\r\n\t\tgbc_button.gridy = 1;\r\n\t\tpanel.add(button, gbc_button);\r\n\t\t\r\n\t\tJButton btnGestionUsuarios = new JButton(\"Gestión De Usuarios\");\r\n\t\tbtnGestionUsuarios.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"Gestion de usuarios\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnGestionUsuarios.setPreferredSize(new Dimension(209, 45));\r\n\t\tbtnGestionUsuarios.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnGestionUsuarios.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnGestionUsuarios.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnGestionUsuarios.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_btnGestionUsuarios = new GridBagConstraints();\r\n\t\tgbc_btnGestionUsuarios.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnGestionUsuarios.gridx = 0;\r\n\t\tgbc_btnGestionUsuarios.gridy = 2;\r\n\t\tpanel.add(btnGestionUsuarios, gbc_btnGestionUsuarios);\r\n\t\t\r\n\t\tJButton btnCreacinDeUsuarios = new JButton(\"Creación de Usuarios\");\r\n\t\tbtnCreacinDeUsuarios.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"panel creacion users\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreacinDeUsuarios.setPreferredSize(new Dimension(209, 45));\r\n\t\tbtnCreacinDeUsuarios.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnCreacinDeUsuarios.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnCreacinDeUsuarios.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnCreacinDeUsuarios.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_btnCreacinDeUsuarios = new GridBagConstraints();\r\n\t\tgbc_btnCreacinDeUsuarios.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnCreacinDeUsuarios.gridx = 0;\r\n\t\tgbc_btnCreacinDeUsuarios.gridy = 3;\r\n\t\tpanel.add(btnCreacinDeUsuarios, gbc_btnCreacinDeUsuarios);\r\n\t\t\r\n\t\tJButton btnModificarProductos = new JButton(\"Modificar Productos\");\r\n\t\tbtnModificarProductos.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tbtnModificarProductos.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnModificarProductos.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnModificarProductos.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnModificarProductos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"modificar producto\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnModificarProductos.setPreferredSize(new Dimension(209, 45));\r\n\t\tGridBagConstraints gbc_btnModificarProductos = new GridBagConstraints();\r\n\t\tgbc_btnModificarProductos.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnModificarProductos.gridx = 0;\r\n\t\tgbc_btnModificarProductos.gridy = 4;\r\n\t\tpanel.add(btnModificarProductos, gbc_btnModificarProductos);\r\n\t\t\r\n\t\tJButton btnListadoDeCompradores = new JButton(\"Listado de compradores\");\r\n\t\tbtnListadoDeCompradores.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout,\"panel Compradores\"\t); //$NON-NLS-1$\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnListadoDeCompradores.setPreferredSize(new Dimension(209, 45));\r\n\t\tbtnListadoDeCompradores.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnListadoDeCompradores.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnListadoDeCompradores.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnListadoDeCompradores.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_btnListadoDeCompradores = new GridBagConstraints();\r\n\t\tgbc_btnListadoDeCompradores.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnListadoDeCompradores.gridx = 0;\r\n\t\tgbc_btnListadoDeCompradores.gridy = 5;\r\n\t\tpanel.add(btnListadoDeCompradores, gbc_btnListadoDeCompradores);\r\n\t\t\r\n\t\tpanelCardLayout= new JPanel();\r\n\t\tpanelCardLayout.setPreferredSize(new Dimension(104, 18));\r\n\t\tcontentPane.add(panelCardLayout, BorderLayout.CENTER);\r\n\t\tpanelCardLayout.setLayout(new CardLayout(0, 0));\r\n\t\t\r\n\t\tJPanel panelInicio = new PanelPrincipal();\r\n\t \r\n\t\tpanelCardLayout.add(panelInicio, \"panel inicio\");\r\n\t\t\r\n\t\tJPanel panelCreacionDeUsers = new PanelUsuarios(null);\r\n\t\tpanelCardLayout.add(panelCreacionDeUsers, \"panel creacion users\");\r\n\t\t\r\n\t\tJPanel panelModificarProductos = new ModificarProducto();\r\n\t\tpanelCardLayout.add(panelModificarProductos, \"modificar producto\");\r\n\t\t\r\n\t\tJPanel panelListadoCompradores = new ListadoCompradores();\r\n\t\tpanelCardLayout.add(panelListadoCompradores, \"panel Compradores\"); //$NON-NLS-1$\r\n\t\t\t\r\n\t\tJPanel panelGestionUsuarios = new GestionDeUsuarios();\r\n\t\tpanelCardLayout.add(panelGestionUsuarios, \"Gestion de usuarios\");\r\n\t\t\r\n\t\t\r\n\t}", "public void init() {\n setLayout(new GridLayout(n-1, n));\n setFont(new Font(\"SansSerif\", Font.BOLD, 24));\n \n // Baris 1\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"Bksp\",Color.red));\n add(makeButton(\"CE\",Color.red));\n add(makeButton(\"X\",Color.red));\n \n // Baris 2\n add(makeButton(\"MC\",Color.red));\n add(new Button(\"7\"));\n add(new Button(\"8\"));\n add(new Button(\"9\"));\n add(new Button(\"/\"));\n add(new Button(\"sqrt\"));\n \n // Baris 3\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"4\"));\n add(new Button(\"5\"));\n add(new Button(\"6\"));\n add(new Button(\"x\"));\n add(new Button(\"%\"));\n \n // Baris 4\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"1\"));\n add(new Button(\"2\"));\n add(new Button(\"3\"));\n add(new Button(\"-\"));\n add(new Button(\"1/x\"));\n\n // Baris 5\n add(makeButton(\"M+\",Color.red));\n add(new Button(\"0\"));\n add(new Button(\"+/-\"));\n add(new Button(\".\"));\n add(new Button(\"+\"));\n add(new Button(\"=\"));\n }", "public void initPlayerMenu() {\n Font f = new Font(\"Helvetica\", Font.BOLD, 16);\n\n menuPanel = new JPanel();\n menuPanel.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuPanel.setLayout(null);\n\n menuBar = new JMenuBar();\n menuBar.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuBar.setBounds(0, 0, buttonWidth, buttonHeight);\n menuBar.setLayout(null);\n\n playerMenu = new JMenu();\n playerMenu.setText(\"Players\");\n playerMenu.setFont(f);\n playerMenu.setBounds(0, 0, buttonWidth, buttonHeight);\n playerMenu.setBackground(new Color(0xeaf1f7));\n playerMenu.setHorizontalTextPosition(SwingConstants.CENTER);\n playerMenu.setOpaque(true);\n playerMenu.setBorder(BorderFactory.createBevelBorder(0));\n\n menuBar.add(playerMenu);\n menuPanel.add(menuBar);\n }", "public void initialization(){\r\n\t\tfinal int w = current.getBounds().width;\r\n\t\tfinal int h = current.getBounds().height;\r\n\t\tcomposite.setBounds(0, 0, w, h);\r\n\t\t\r\n\t\t/**\r\n\t\t * left side navigate\r\n\t\t */\r\n\t\tComposite composite_left = new Composite(composite, SWT.NONE);\r\n//\t\tfinal Color base = new Color(composite.getDisplay(), 255,240,245);\r\n\t\tfinal Color base = new Color(composite.getDisplay(), 0xed, 0xf4, 0xfa);//??\r\n\t\tcomposite_left.setBackground(base);\r\n//\t\tcomposite_left.setBounds(0, 0, (int)(w/5), h);\r\n\t\tcomposite_left.setBounds(0, 0, 200, h);\r\n\t\tcomposite_left.setLayout(new FillLayout());\r\n\t\tComposite comp1 = null;\r\n\t\tComposite comp2 = null;\r\n\r\n\t\t//expand bar\r\n\t\texpandBar = new ExpandBar(composite_left, SWT.V_SCROLL); \t\t\r\n\t\t\r\n\t\titem1 = new ExpandItem(expandBar, SWT.NONE);\r\n\t\titem2 = new ExpandItem(expandBar, SWT.NONE);\r\n\t\t\r\n\t\texpandBar.addExpandListener(new ExpandAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void itemExpanded(ExpandEvent e) {\r\n\t\t\t\tif(e.item == item1){\r\n\t\t\t\t\titem2.setExpanded(false);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem1.setExpanded(false);\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 { \r\n\t \t //shipment expandbar\r\n\t comp1 = new Composite(expandBar, SWT.NONE); \r\n\t GridLayout gd = new GridLayout(1, false);\r\n//\t gd.marginWidth=(int)(w/5/10);\r\n\t gd.marginWidth=10;\r\n\t comp1.setLayout(gd); \r\n\t //used for spacing the controls\r\n//\t Label lbl_space2 = new Label(comp1, SWT.NONE);\r\n//\t lbl_space2.setText(\"\");\r\n//\t lbl_space2.setVisible(false);\r\n\t \r\n\t Label lbl_brand = new Label(comp1, SWT.NONE);\r\n\t lbl_brand.setText(\"品牌\");\r\n\t \r\n\t combo_brand_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_brand_shipment.setVisibleItemCount(5);\r\n\t combo_brand_shipment.setText(AnalyzerConstants.ALL_BRAND);\r\n\t GridData gd_combo_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_brand.widthHint = 151;\r\n\t combo_brand_shipment.setLayoutData(gd_combo_brand);\r\n\t \r\n\t \r\n\t combo_sub_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t combo_sub_shipment.setVisibleItemCount(5);\r\n\t GridData gd_combo_sub_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_sub_brand.widthHint = 151;\r\n\t combo_sub_shipment.setLayoutData(gd_combo_sub_brand);\r\n\t combo_sub_shipment.setEnabled(false);\r\n\t combo_sub_shipment.setVisible(false);\r\n\t \r\n\t combo_brand_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t \t\t\t@Override\r\n\t \t\t\tpublic void handleEvent(Event event) {\r\n\t \t\t\t\tList<String> list = Utils.getBrands();\r\n\t \t\t\t\tcombo_brand_shipment.setItems(list.toArray(new String[list.size()]));\r\n\t \t\t\t\tcombo_brand_shipment.add(AnalyzerConstants.ALL_BRAND);\r\n\t \t\t\t}\r\n\t });\r\n\t combo_brand_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_brand_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_brand_shipment.setText(AnalyzerConstants.ALL_BRAND);\r\n\t\t \t\t\t\t\tcombo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t\t\t\tcombo_sub_shipment.setVisible(false);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_sub_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_sub_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_sub_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\t \t\t\t@Override\r\n\t \t\t\tpublic void handleEvent(Event event) {\r\n\t \t\t\t\tString brand = combo_brand_shipment.getText();\r\n\t \t\t\t\tList<String> list = Utils.getSub_Brands(brand);\t \t\t\t\t\t\t\r\n\t \t\t\t\tcombo_sub_shipment.setItems(list.toArray(new String[list.size()]));\r\n\t \t\t\t\tcombo_sub_shipment.add(AnalyzerConstants.ALL_SUB);\r\n\t \t\t\t}\r\n\t });\r\n\t combo_brand_shipment.addSelectionListener(new SelectionAdapter() {\r\n\t\t \t@Override\r\n\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n//\t\t \t\tcombo_subbrand.clearSelection();\r\n\t\t \t\tif(!combo_brand_shipment.getText().equals(AnalyzerConstants.ALL_BRAND)){\r\n\t\t \t\t\tcombo_sub_shipment.deselectAll();\r\n\t\t \t\t\tcombo_sub_shipment.setEnabled(true);\r\n\t\t \t\t\tcombo_sub_shipment.setVisible(true);\r\n\t\t \t\t\tcombo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t}else{\r\n\t\t \t\t\tcombo_sub_shipment.setVisible(false);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t });\r\n\t \r\n\t Label lbl_space = new Label(comp1, SWT.NONE);\r\n\t lbl_space.setText(\"\");\r\n\t lbl_space.setVisible(false);\r\n\t \r\n\t Label lbl_area = new Label(comp1, SWT.NONE);\r\n\t lbl_area.setText(\"片区/客户\");\r\n\t \r\n\t combo_area_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_area_shipment.setVisibleItemCount(5);\r\n\t combo_area_shipment.setText(AnalyzerConstants.ALL_AREA);\r\n\t GridData gd_combo_area = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_area.widthHint = 151;\r\n\t combo_area_shipment.setLayoutData(gd_combo_area);\r\n\t \r\n\t combo_cus_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t combo_cus_shipment.setVisible(false);\r\n\t combo_cus_shipment.setVisibleItemCount(5);\r\n\t GridData gd_combo_customer = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_customer.widthHint = 151;\r\n\t combo_cus_shipment.setLayoutData(gd_combo_customer);\r\n\t combo_cus_shipment.setEnabled(false);\r\n\t \r\n\t combo_area_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tcombo_area_shipment.setItems(DataCachePool.getCustomerAreas());\t\r\n\t\t \t\t\t\tcombo_area_shipment.add(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t}\r\n\t\t });\t \r\n\t combo_area_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_area_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_area_shipment.setText(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t\t\tcombo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t\tcombo_cus_shipment.setVisible(false);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_cus_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tString area = combo_area_shipment.getText();\r\n//\t\t\t\t\t\tSystem.out.println(\"area: \"+area);\r\n\t\t\t\t\t\tString[] names = DataCachePool.getCustomerNames(area);\r\n\t\t\t\t\t\tif(names.length != 0){//no such areas\r\n\t\t\t\t\t\t\tcombo_cus_shipment.setItems(names);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcombo_sub_shipment.add(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t\t \r\n\t combo_area_shipment.addSelectionListener(new SelectionAdapter() {\r\n\t\t \t@Override\r\n\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t \t\tif(!combo_area_shipment.getText().equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t \t\tcombo_cus_shipment.deselectAll();\r\n\t\t \t\tcombo_cus_shipment.setEnabled(true);\r\n\t\t \t\tcombo_cus_shipment.setVisible(true);\r\n\t\t \t\tcombo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t}else{\r\n\t\t \t\t\tcombo_cus_shipment.setVisible(false);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t });\r\n\t \r\n//\t item1 = new ExpandItem(expandBar, SWT.NONE); \r\n\t item1.setText(\"出货量分析\"); \r\n\t item1.setExpanded(true);\r\n\t item1.setHeight((int)(h/3));// 设置Item的高度 \r\n\t comp1.setBackground(new Color(composite.getDisplay(), 240,255,255));\r\n\t item1.setControl(comp1);// setControl方法控制comp1的显现 \t \t \r\n\t } \r\n\t { \r\n\t \t //the profit expandbar\r\n\t comp2 = new Composite(expandBar, SWT.NONE); \r\n\t GridLayout gd = new GridLayout(1, false);\r\n//\t gd.marginWidth=(int)(w/5/10);\r\n\t gd.marginWidth=10;\r\n\t comp2.setLayout(gd); \r\n\r\n//\t Label lbl_space2 = new Label(comp2, SWT.NONE);\r\n//\t lbl_space2.setText(\"\");\r\n//\t lbl_space2.setVisible(false);\r\n\t \r\n\t Label lbl_brand = new Label(comp2, SWT.NONE);\r\n\t lbl_brand.setText(\"品牌\");\r\n\t \r\n\t combo_brand_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t GridData gd_combo_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_brand.widthHint = 151;\r\n\t combo_brand_profit.setText(AnalyzerConstants.ALL_BRAND);\r\n\t combo_brand_profit.setLayoutData(gd_combo_brand);\r\n\t \r\n\t combo_sub_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t combo_sub_profit.setVisible(false);\r\n\t GridData gd_combo_sub_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_sub_brand.widthHint = 151;\r\n\t combo_sub_profit.setLayoutData(gd_combo_sub_brand);\r\n\t \r\n\t combo_brand_profit.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tList<String> list = Utils.getBrands();\r\n\t\t \t\t\t\tcombo_brand_profit.setItems(list.toArray(new String[list.size()]));\r\n\t\t \t\t\t\tcombo_brand_profit.add(AnalyzerConstants.ALL_BRAND);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_brand_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t\t \t\t\t@Override\r\n\t\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t\t \t\t\t\tif(combo_brand_profit.getText().equals(\"\")){\r\n\t\t\t \t\t\t\t\tcombo_brand_profit.setText(AnalyzerConstants.ALL_BRAND);\r\n\t\t\t \t\t\t\t\tcombo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t\t \t\t\t\t\tcombo_sub_profit.setVisible(false);\r\n\t\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t\t \t\t\t}\r\n\t\t\t });\r\n\t combo_sub_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t\t \t\t\t@Override\r\n\t\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t\t \t\t\t\tif(combo_sub_profit.getText().equals(\"\")){\r\n\t\t\t \t\t\t\t\tcombo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t\t \t\t\t}\r\n\t\t\t });\r\n\t combo_sub_profit.addListener(SWT.MouseDown, new Listener() {\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tString brand = combo_brand_profit.getText();\r\n\t\t \t\t\t\tList<String> list = Utils.getSub_Brands(brand);\t \t\t\t\t\t\t\r\n\t\t \t\t\t\tcombo_sub_profit.setItems(list.toArray(new String[list.size()]));\r\n\t\t \t\t\t\tcombo_sub_profit.add(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_brand_profit.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t \t@Override\r\n\t\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n//\t\t\t \t\tcombo_subbrand.clearSelection();\r\n\t\t\t \t\tif(!combo_brand_profit.getText().equals(AnalyzerConstants.ALL_BRAND)){\r\n\t\t\t \t\t\tcombo_sub_profit.deselectAll();\r\n\t\t\t \t\t\tcombo_sub_profit.setEnabled(true);\r\n\t\t\t \t\t\tcombo_sub_profit.setVisible(true);\r\n\t\t\t \t\t\tcombo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t\t \t\t}else{\r\n\t\t\t \t\t\tcombo_sub_profit.setVisible(false);\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 Label lbl_space = new Label(comp2, SWT.NONE);\r\n\t lbl_space.setText(\"\");\r\n\t lbl_space.setVisible(false);\r\n\t \r\n\t Label lbl_area = new Label(comp2, SWT.NONE);\r\n\t lbl_area.setText(\"片区/客户\");\r\n\t \r\n\t combo_area_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t GridData gd_combo_area = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_area.widthHint = 151;\r\n\t combo_area_profit.setText(AnalyzerConstants.ALL_AREA);\r\n\t combo_area_profit.setLayoutData(gd_combo_area);\r\n\t \r\n\t combo_cus_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t combo_cus_profit.setVisible(false);\r\n\t GridData gd_combo_customer = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_customer.widthHint = 151;\r\n\t combo_cus_profit.setLayoutData(gd_combo_customer);\r\n\t \r\n\t combo_area_profit.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tcombo_area_profit.setItems(DataCachePool.getCustomerAreas());\t\r\n\t\t \t\t\t\tcombo_area_profit.add(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t}\r\n\t\t });\t \r\n\t combo_area_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_area_profit.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_area_profit.setText(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t\t\tcombo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t\tcombo_cus_profit.setVisible(false);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_cus_profit.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_profit.addListener(SWT.MouseDown, new Listener() {\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tString area = combo_area_profit.getText();\r\n//\t\t\t\t\t\tSystem.out.println(\"area: \"+area);\r\n\t\t\t\t\t\tString[] names = DataCachePool.getCustomerNames(area);\r\n\t\t\t\t\t\tif(names.length != 0){//no such areas\r\n\t\t\t\t\t\t\tcombo_cus_profit.setItems(names);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcombo_cus_profit.add(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t\t \r\n\t combo_area_profit.addSelectionListener(new SelectionAdapter() {\r\n\t\t \t@Override\r\n\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t \t\tif(!combo_area_profit.getText().equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t \t\t\tcombo_cus_profit.deselectAll();\r\n\t\t \t\t\tcombo_cus_profit.setEnabled(true);\r\n\t\t \t\t\tcombo_cus_profit.setVisible(true);\r\n\t\t \t\t\tcombo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t}else{\r\n\t\t \t\t\tcombo_cus_profit.setVisible(false);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t });\r\n \t \r\n//\t item2 = new ExpandItem(expandBar, SWT.NONE); \r\n\t \r\n\t item2.setText(\"利润分析\"); \t \r\n\t item2.setHeight((int)(h/3));// 设置Item的高度 \r\n\t comp2.setBackground(new Color(composite.getDisplay(), 240,255,255));\r\n\t item2.setControl(comp2);// setControl方法控制comp1的显现 \r\n\t } \r\n\t expandBar.setBackground(new Color(composite.getDisplay(), 204,255,204));\r\n\t composite_left.layout();\r\n \r\n\t \r\n\t\t//=============================================================================================\r\n\r\n\t /**\r\n\t * right part to show the analyzed result\t\r\n\t */\r\n\t //right part base compoiste\r\n\t\tComposite composite_right = new Composite(composite, SWT.NONE);\r\n\t\tcomposite_right.setBackground(new Color(composite.getDisplay(), 255, 250, 250));\r\n//\t\tcomposite_right.setBounds((int)(w/5), 0, (int)(4*w/5), h);\r\n\t\tcomposite_right.setBounds(200, 0, 760, h);\r\n\t\t\r\n\t\t//text area to show the tips\r\n\t\tstyledText = new StyledText(composite_right, SWT.BORDER|SWT.WRAP);\r\n\t\tstyledText.setEditable(false);\r\n\t\tstyledText.setBounds((int)(4*w/5/50), (int)(4*w/5/50), (int)(6*w/5/4), (int)(h/10));\r\n\t\tstyledText.setText(\"\");//\"五得利最近一个月出货量\\n\"+\"总计:15000包\"\r\n//\t\tStyleRange styleRange = new StyleRange();\r\n//\t\tstyleRange.start = 0;\r\n//\t\tstyleRange.length = \"五得利最近一个月出货量\".length();\r\n//\t\tstyleRange.fontStyle = SWT.BOLD;\r\n//\t\tstyledText.setStyleRange(styleRange);\r\n\t\t\r\n\t\t/**\r\n\t\t * the group buttons, showing the for kind of classification\r\n\t\t */\r\n\t\tComposite composite_group = new Composite(composite_right, SWT.NONE);\r\n\t\tcomposite_group.setBounds((int)(2*4*w/5/3), (int)(2*4*w/5/50/3), (int)(4*w/5/3-h/30), (int)(h/18));\r\n\t\tGridLayout layout = new GridLayout(4, true); \r\n\t\t//put the four button\r\n layout.numColumns = 4; \r\n layout.horizontalSpacing = 0;\r\n layout.verticalSpacing = 0;\r\n layout.marginHeight = 0;\r\n layout.marginWidth = 0;\r\n composite_group.setLayout(layout);\r\n \r\n GridData gd_text = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n\t\tgd_text.heightHint = (int)(h/18);\r\n Button btn_month = new Button(composite_group, SWT.NONE); \r\n btn_month.setText(\"一个月\");\r\n btn_month.setLayoutData(gd_text);\r\n\r\n\t\t\r\n GridData gd_text2 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gd_text2.heightHint = (int)(h/18);\r\n Button btn_season = new Button(composite_group, SWT.NONE);\r\n btn_season.setText(\"一个季度\");\r\n btn_season.setLayoutData(gd_text2);\r\n \r\n GridData gd_text3 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gd_text3.heightHint = (int)(h/18);\r\n Button btn_year = new Button(composite_group, SWT.NONE);\r\n btn_year.setText(\"一年\");\r\n btn_year.setLayoutData(gd_text3);\r\n\r\n \r\n GridData gd_text4 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gd_text4.heightHint = (int)(h/18);\r\n Button btn_all = new Button(composite_group, SWT.NONE);\r\n btn_all.setText(\"全部记录\");\r\n btn_all.setLayoutData(gd_text4); \r\n composite_group.layout();\r\n\r\n /**\r\n * the scroll composite to show the analyzed table result and graph\r\n */\r\n final Composite composite_main = new Composite(composite_right, SWT.NONE);\r\n// composite_main.setBounds(0, (int)(h/8+h/100), (int)(4*w/5), (int)(7*h/8-h/100));\r\n composite_main.setBounds(0, (int)(h/8+h/100), 740, (int)(7*h/8-h/100));\r\n \r\n composite_main.setBackground(new Color(composite.getDisplay(), 255,250,250));\r\n composite_main.setLayout(new FillLayout());\r\n composite_scroll = new ScrolledComposite(composite_main, SWT.NONE|SWT.V_SCROLL);//\r\n//\t\tcomposite_scroll.setVisible(true);\r\n\t\tcomposite_scroll.setExpandHorizontal(true); \r\n\t\tcomposite_scroll.setExpandVertical(true); \r\n\t\tcomposite_scroll.addListener(SWT.Activate, new Listener(){ \r\n\t\t\tpublic void handleEvent(Event e){\r\n\t\t\t\t//need to forceFocus\r\n\t\t\t\tcomposite_scroll.forceFocus();\r\n\t\t\t\t}\r\n\t\t}); \r\n\t\tcomposite_content = new Composite(composite_scroll, SWT.NONE);\r\n\t\tcomposite_scroll.setContent(composite_content);\r\n\t\tcomposite_content.setBackground(new Color(composite.getDisplay(), 255,240,245));\r\n\t\tlayout_content = new GridLayout(1, false); \r\n\t\tlayout_content.numColumns = 1; \r\n\t\tlayout_content.horizontalSpacing = 0;\r\n\t\tlayout_content.verticalSpacing = 0;\r\n\t\tlayout_content.marginHeight = 0;//not recommended\r\n\t\tlayout_content.marginWidth = 10;\r\n composite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n /**\r\n * add the button listener for the classification\r\n */\r\n btn_month.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\t\r\n \t\tinitialTitle(TYPE.MONTH);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.MONTH);\r\n \t}\r\n });\r\n \r\n btn_season.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\tinitialTitle(TYPE.SEASON);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.SEASON);\r\n \t}\r\n });\r\n btn_year.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\tinitialTitle(TYPE.YEAR);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.YEAR);\r\n \t}\r\n });\r\n \r\n btn_all.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\tinitialTitle(TYPE.ALL);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.ALL);\r\n \t}\r\n });\r\n composite_main.layout();\r\n composite_content.layout();\r\n// composite_scroll.layout();\r\n \r\n\t\ttry {\r\n\t\t\tDataCachePool.cacheProductInfo();\r\n\t\t\t DataCachePool.cacheCustomerInfo();\r\n\t\t} catch (Exception e1) {\r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"连接数据库异常\");\r\n\t\t\tmbox.open();\r\n\t\t}\r\n \r\n\r\n\t}", "private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}", "private void addGUIComponents() {\n\t\t\n\t\t/*length panel*/\n\t\tJPanel lengthPanel = new JPanel();\n\t\tlengthPanel.setBackground(new Color(109,109,109));\n\t\tGridLayout layout = new GridLayout(1,2);\n\t\tlayout.setHgap(20);\n\t\tlengthPanel.setLayout(layout);\n\n\t\tJPanel lengthLeftPan = new JPanel();\n\t\tlengthLeftPan.setBackground(new Color(109,109,109));\n\t\tlengthLeftPan.setLayout(new GridLayout(9,2));\n\t\tlengthLeftPan.add(_X_A0_lb);\n\t\tlengthLeftPan.add(_X_A0);\n\t\tlengthLeftPan.add(_Y_A0_lb);\n\t\tlengthLeftPan.add(_Y_A0);\n\t\tlengthLeftPan.add(_X_d_lb);\n\t\tlengthLeftPan.add(_X_d);\n\t\tlengthLeftPan.add(_Y_d_lb);\n\t\tlengthLeftPan.add(_Y_d);\n\t\tlengthLeftPan.add(_X_s_lb);\n\t\tlengthLeftPan.add(_X_s);\n\t\tlengthLeftPan.add(_Y_s_lb);\n\t\tlengthLeftPan.add(_Y_s);\n\t\tlengthLeftPan.add(_ro_min_lb);\n\t\tlengthLeftPan.add(_ro_min);\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\n\t\tJPanel lengthRightPan = new JPanel(new GridLayout(10,2));\n\t\tlengthRightPan.setBackground(new Color(109,109,109));\n\t\tlengthRightPan.add(_L3_lb);\n\t\tlengthRightPan.add(_L3);\n\t\tlengthRightPan.add(_L31_lb);\n\t\tlengthRightPan.add(_L31);\n\t\tlengthRightPan.add(_L3p_lb);\n\t\tlengthRightPan.add(_L3p);\n\t\tlengthRightPan.add(_L4_lb);\n\t\tlengthRightPan.add(_L4);\n\t\tlengthRightPan.add(_L5_lb);\n\t\tlengthRightPan.add(_L5);\n\t\tlengthRightPan.add(_L1_lb);\n\t\tlengthRightPan.add(_L1);\n\t\tlengthRightPan.add(_rR_lb);\n\t\tlengthRightPan.add(_rR);\n\t\tlengthRightPan.add(_rG_lb);\n\t\tlengthRightPan.add(_rG);\n\t\tlengthRightPan.add(_ep_lb);\n\t\tlengthRightPan.add(_ep);\n\t\tlengthRightPan.add(_y_lb);\n\t\tlengthRightPan.add(_y);\n\t\t\n\t\tlengthPanel.add(lengthLeftPan);\n\t\tlengthPanel.add(lengthRightPan);\n\t\t\n\t\t/*angle panel*/\n\t\tJPanel anglePanel = new JPanel(new GridLayout(5,2));\n\t\tanglePanel.setBackground(new Color(109,109,109));\n\t\tanglePanel.add(_delta_lb);\n\t\tanglePanel.add(_delta);\n\t\tanglePanel.add(_gama_lb);\n\t\tanglePanel.add(_gama);\n\t\tanglePanel.add(_miu_an_min_lb);\n\t\tanglePanel.add(_miu_an_min);\n\t\tanglePanel.add(_miu_ab_min_lb);\n\t\tanglePanel.add(_miu_ab_min);\n\t\tanglePanel.add(_n_lb);\n\t\tanglePanel.add(_n);\n\t\t\n\t\t\n\t\t/*Title label for the length panel*/\n\t\tJLabel lengthPanelTitle = new JLabel(LanguageFactory.getInstance().getExpresion(LENGTH_TITLE_NAME));\n\t\t/*Title label for the angle panel*/\n\t\tJLabel anglePanelTitle = new JLabel(LanguageFactory.getInstance().getExpresion(ANGLE_TITLE_NAME));\n\t\t\n\t\t/*Wave radius textbox label*/\n\t\tJLabel waveRadius = new JLabel(LanguageFactory.getInstance().getExpresion(WAVE_RADIUS_LABEL_NAME));\n\t\t/*Seiben (???) radius textbox label*/\n\t\tJLabel seibenRadius = new JLabel(LanguageFactory.getInstance().getExpresion(SEIBEN_RADIUS_LABEL_NAME));\n\t\t\n\t\t\n\t\tJPanel radiusPan = new JPanel(new GridLayout(2,2));\n\t\tradiusPan.setBackground(new Color(109,109,109));\n\t\tradiusPan.add(waveRadius);\n\t\tradiusPan.add(_waveRad);\n\t\tradiusPan.add(seibenRadius);\n\t\tradiusPan.add(_siebenRad);\n\t\t\n\t\t\n\t\tJPanel leftPan = new JPanel(new GridBagLayout());\n\t\tleftPan.setBorder(BorderFactory.createRaisedBevelBorder());\n\t\tleftPan.setBackground(new Color(109,109,109));\n\t\tleftPan.add(lengthPanelTitle, new GBC(0,0).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0,10,50,10));\n\t\tleftPan.add(lengthPanel, new GBC(0,1).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0, 10, 0, 10));\n\t\tleftPan.add(radiusPan, new GBC(0,2).setFill(GBC.NONE).setAnchor(GBC.NORTHWEST).setInsets(20, 10, 0, 10));\n\t\t\n\t\tJPanel rightPan = new JPanel(new GridBagLayout());\n\t\trightPan.setBorder(BorderFactory.createRaisedBevelBorder());\n\t\trightPan.setBackground(new Color(109,109,109));\n\t\trightPan.add(anglePanelTitle, new GBC(1,0).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0,10,50,10));\n\t\trightPan.add(anglePanel, new GBC(1,1).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0, 10, 0, 10));\n\t\t\n\t\t/*adding the two panels to the layout*/\n\t\tJPanel mainPan = new JPanel(new GridBagLayout());\n\t\tmainPan.add(leftPan, new GBC(0, 0).setFill(GBC.VERTICAL).setAnchor(GBC.NORTH).setInsets(0, 0, 0, 20).setWeight(100, 100));\n\t\tmainPan.add(rightPan, new GBC(1, 0).setFill(GBC.VERTICAL).setAnchor(GBC.NORTH).setInsets(0, 20, 0, 0).setWeight(100, 100));\n\t\tmainPan.add(_drawing_btn, new GBC(2, 0, 1, 2).setFill(GBC.NONE).setAnchor(GBC.NORTH));\n\t\t\n\t\tsetLayout(new BorderLayout());\n\t\tadd(mainPan, BorderLayout.CENTER);\n\t\tsetPreferredSize(new Dimension(800, 400));\n\t\tsetSize(getPreferredSize());\n\n\t}", "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}", "private Parent createContent(){\n Pane root = new Pane();\n root.setPrefSize(BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n\n Rectangle background = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n background.setFill(Color.rgb(152, 172, 172));\n root.getChildren().add(background);\n\n Rectangle bar = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT+1), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1)); // the Board area\n bar.setFill(Color.rgb(31, 31, 31));\n root.getChildren().add(bar);\n\n Rectangle holdArea = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT-1) + 96, 10, BRICK_SIZE*4+4, BRICK_SIZE*4+4);\n holdArea.setFill(Color.rgb(31, 31, 31));\n holdArea.setStroke(Color.WHITE);\n holdArea.setStrokeWidth(1.0);\n root.getChildren().add(holdArea);\n\n Text holdLabel = new Text();\n holdLabel.setText(\"Hold: (X)\");\n holdLabel.setLayoutX(BRICK_SIZE*(Board.BOUNDARY_RIGHT) + 96);\n holdLabel.setLayoutY(32);\n holdLabel.setFill(Color.WHITESMOKE);\n holdLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(holdLabel);\n\n Rectangle next = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT-1) + 96, 150, BRICK_SIZE*4+4, BRICK_SIZE*4+4);\n next.setFill(Color.rgb(91, 91, 91));\n next.setStroke(Color.WHITE);\n next.setStrokeWidth(1.0);\n root.getChildren().add(next);\n\n Text nextLabel = new Text();\n nextLabel.setText(\"Next:\");\n nextLabel.setLayoutX(BRICK_SIZE*(Board.BOUNDARY_RIGHT) + 96);\n nextLabel.setLayoutY(172);\n nextLabel.setFill(Color.WHITESMOKE);\n nextLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(nextLabel);\n\n Canvas canvas = new Canvas(BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n g = canvas.getGraphicsContext2D();\n root.getChildren().add(canvas);\n\n Label scoreLabel = new Label();\n scoreLabel.setText(\"Score\");\n scoreLabel.setLayoutX(360);\n scoreLabel.setLayoutY(332);\n scoreLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(scoreLabel);\n\n Label highScoreLabel = new Label();\n highScoreLabel.setText(\"High Score\");\n highScoreLabel.setLayoutX(360);\n highScoreLabel.setLayoutY(382);\n highScoreLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(highScoreLabel);\n\n Label levelLabel = new Label();\n levelLabel.setText(\"Level\");\n levelLabel.setLayoutX(360);\n levelLabel.setLayoutY(432);\n levelLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(levelLabel);\n\n Label linesLabel = new Label();\n linesLabel.setText(\"Lines Cleared\");\n linesLabel.setLayoutX(360);\n linesLabel.setLayoutY(482);\n linesLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(linesLabel);\n\n board = new Board();\n\n score.setText(\"\" + board.getScore());\n score.setLayoutX(360);\n score.setLayoutY(352);\n score.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(score);\n\n highScore.setText(\"\" + Math.max(FileHandler.readHighScore(), board.getScore()));\n highScore.setLayoutX(360);\n highScore.setLayoutY(402);\n highScore.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(highScore);\n\n level.setText(\"\" + board.getLevel());\n level.setLayoutX(360);\n level.setLayoutY(452);\n level.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(level);\n\n lines.setText(\"\" + board.getTotalLinesCleared());\n lines.setLayoutX(360);\n lines.setLayoutY(502);\n lines.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(lines);\n\n refreshDisplay();\n\n // The AnimationTimer is responsible for moving the currently controlled piece down.\n AnimationTimer animationTimer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if(time < 0.2){\n time = 0.0;\n }\n time += timeFractionBasedOnLevel();\n if(time >= 60.0){\n board.moveDown();\n refreshDisplay();\n time = 0.0;\n }\n }\n };\n animationTimer.start();\n\n return root;\n }", "private void setupToolbars(){\n\t\ttopBar = new TopBar(0, 0, setup.getFrameWidth()+12, Constants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\tbottomBar = new BottomBar(0, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT+(Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_HEIGHT, \n\t\t\t\tsetup.getFrameWidth()+12, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\trightBar = new RightBar((Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_WIDTH, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_WIDTH, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_HEIGHT, \n\t\t\t\tConstants.COLOR_MAP_LAND, setup);\n\t}", "public Window init() {\n // Construye una ventana (del navegador)\n // ----------------------------------------\n\n Window window = new Window();\n window.setTitle(\"Hola Mundo\");\n\n // ----------------------------------------\n // Construye un panel raiz y se lo asigna\n // a la ventana\n // ----------------------------------------\n\n ContentPane contentPane = new ContentPane();\n window.setContent(contentPane);\n\n // ----------------------------------------\n // Construye la GUI y la añade al panel\n // raiz recien construido\n // ----------------------------------------\n\n SplitPane split1 = new SplitPane();\n split1.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n split1.setSeparatorPosition(new Extent(30, Extent.PX));\n split1.setSeparatorColor(Color.BLACK);\n split1.setResizable(true);\n split1.setSeparatorHeight(new Extent(5, Extent.PX));\n contentPane.add(split1);\n\n MenuBarPane mbp = DemoMenuFactory.createDemoMenuBarPane();\n split1.add(mbp);\n\n SplitPane split2 = new SplitPane();\n split2.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n split2.setSeparatorPosition(new Extent(30, Extent.PX));\n split2.setSeparatorColor(Color.BLACK);\n split2.setResizable(true);\n split2.setSeparatorHeight(new Extent(5, Extent.PX));\n split1.add(split2);\n\n Row row = new Row();\n //row.add(DemoMenuFactory.createDemoMenuBarPane()); // Can't be done\n row.add(DemoMenuFactory.createDemoDropDownMenu());\n split2.add(row);\n\n HtmlLayout htmlLayout;\n\n try {\n htmlLayout = new HtmlLayout( //\n getClass().getResourceAsStream(\"template.html\"), \"UTF-8\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n HtmlLayoutData hld;\n\n hld = new HtmlLayoutData(\"label1\");\n Label lblLabel1 = new Label(\"Menu 1\");\n lblLabel1.setLayoutData(hld);\n htmlLayout.add(lblLabel1);\n\n hld = new HtmlLayoutData(\"menu1\");\n //MenuBarPane ddm1 = DemoMenuFactory.createDemoMenuBarPane(); // Can't be done\n DropDownMenu ddm1 = DemoMenuFactory.createDemoDropDownMenu();\n ddm1.setLayoutData(hld);\n htmlLayout.add(ddm1);\n\n hld = new HtmlLayoutData(\"label2\");\n Label lblLabel2 = new Label(\"Menu 2\");\n lblLabel2.setLayoutData(hld);\n htmlLayout.add(lblLabel2);\n\n hld = new HtmlLayoutData(\"menu2\");\n DropDownMenu ddm2 = DemoMenuFactory.createDemoDropDownMenu();\n ddm2.setLayoutData(hld);\n htmlLayout.add(ddm2);\n\n split2.add(htmlLayout);\n\n WindowPane windowPane = new WindowPane();\n windowPane.setClosable(false);\n contentPane.add(windowPane);\n\n SplitPane split3 = new SplitPane();\n split3.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n split3.setSeparatorPosition(new Extent(30, Extent.PX));\n split3.setSeparatorColor(Color.BLACK);\n split3.setResizable(true);\n split3.setSeparatorHeight(new Extent(5, Extent.PX));\n windowPane.add(split3);\n\n split3.add(DemoMenuFactory.createDemoMenuBarPane());\n\n return window;\n }", "private void startMenuBar() no topo\n {\n //Inicializa a barra de menus\n JMenuBar menuBar = new JMenuBar();\n JMenu menuFile = new JMenu(\"File\");\n JMenu menuProgram = new JMenu(\"Program\");\n JMenuItem fileOpen = new JMenuItem(\"Open\");\n fileOpen.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n setFileName();\n }\n });\n menuFile.add(fileOpen);\n \n JMenuItem programClose = new JMenuItem(\"Close\");\n programClose.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n System.exit(0);\n }\n });\n menuProgram.add(programClose);\n \n menuBar.add(menuFile);\n menuBar.add(menuProgram);\n mainFrame.add(menuBar, BorderLayout.PAGE_START);\n }", "private void setActionBar() {\n headView.setText(\"消息中心\");\n headView.setGobackVisible();\n headView.setRightGone();\n // headView.setRightResource();\n }", "void initGUI(int width, int height) {\r\n setSize(width, height); // set the frame size, width: 800, height: 600\r\n setBackground(Color.white); // set the background color to white\r\n Container cp = getContentPane(); // set the container\r\n cp.setBackground(getBackground()); // set the background of the container\r\n cp.setLayout(new FlowLayout(FlowLayout.LEFT)); // set the layout\r\n\r\n createMenus(cp);\r\n\r\n addMouseListener(this); // add a mouse listener\r\n addMouseMotionListener(this); // add a mouse motion listener\r\n setVisible(true); // set the attribute visible true\r\n }", "@Override\n\tpublic void createControl(Composite parent) {\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 1;\n\t\tlayout.marginHeight = 0;\n\t\tlayout.marginTop = 0;\n\t\tlayout.marginBottom = 0;\n\t\tlayout.verticalSpacing = 0;\n\t\tlayout.makeColumnsEqualWidth = true;\n\n\t\trootComposite = new Composite(parent, SWT.NO_BACKGROUND);\n\t\trootComposite.setLayout(layout);\n\t\tGridData rootData = new GridData();\n\t\trootData.grabExcessHorizontalSpace = true;\n\t\trootData.horizontalAlignment = GridData.FILL;\n\t\trootData.grabExcessVerticalSpace = true;\n\t\trootData.verticalAlignment = GridData.FILL;\n\t\trootComposite.setLayoutData(rootData);\n\n\t\tcreateTopBar(rootComposite, layout.numColumns);\n\t\t\n\t\tthis.showMonitorVisualization();\n\n\t\tsetControl(rootComposite);\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private HBox createMenu(BorderPane root) {\n HBox menu = new HBox();\n\n menu.setPadding(new Insets(30, 30, 30, 30));\n menu.setSpacing(30);\n menu.setBackground(new Background(new BackgroundFill(MENU_COLOR, CornerRadii.EMPTY, Insets.EMPTY)));\n menu.getChildren().addAll(createNewArrayButton(root), createArrSizeSliderWrapper(root),\n createNumOfThreadsSpinnerWrapper(), createExecuteMergeSortButton(root));\n\n return menu;\n }", "@Override\n public void layoutControls() {\n labelArea.setPrefHeight(100);\n labelArea.setMinHeight(70);\n labelArea.setVgrow(nameLabel, Priority.ALWAYS);\n labelArea.setVgrow(powerLabel, Priority.ALWAYS);\n labelArea.setVgrow(titleLabel, Priority.ALWAYS);\n labelArea.setVgrow(startOfOperationFirstLabel, Priority.ALWAYS);\n\n labelArea.getChildren().addAll(titleLabel, nameLabel, powerLabel, startOfOperationFirstLabel);\n HBox.setHgrow(spacer, Priority.ALWAYS);\n\n\n getChildren().addAll(labelArea, spacer, waterControl);\n\n }", "public MainFrame(){\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (ClassNotFoundException | IllegalAccessException | UnsupportedLookAndFeelException | InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnbRules = 1;\n \tnbTabs = 0;\n \tbasePanel = new JPanel();\n \tbasePanel.setLayout(new FlowLayout(FlowLayout.CENTER));\n \ttabs = new JTabbedPane(SwingConstants.TOP);\n\n \tJToolBar toolBar = new JToolBar();\n newGen = new JButton(\"Nouvelle génération\");\n newGen.addActionListener(new Listener(\"Tab\",this));\n toolBar.add(newGen);\n example = new JButton(\"Exemples\");\n example.addActionListener(new Listener(\"Example\", this));\n toolBar.add(example);\n help = new JButton(\"Aide\");\n help.addActionListener(new Listener(\"Help\",this));\n toolBar.add(help);\n\n this.setTitle(\"L-system interface\");\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tDimension windowDimension = new Dimension(Constants.INITIAL_WIDTH, Constants.INITIAL_HEIGHT);\n this.setSize(windowDimension);\n this.setLocationRelativeTo(null);\n this.add(tabs);\n this.add(toolBar, BorderLayout.NORTH);\n this.setPreferredSize(windowDimension);\n newComponent((byte)1);\n\t\trenameTabs();\n\t\tthis.setResizable(false);\n }", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "@Override\r\n\tpublic void BuildArmLeft() {\n\t\tg.drawLine(60, 50, 40, 100);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n bG1 = new ekspedisi.PanelComponent.BG();\n navBar1 = new ekspedisi.PanelComponent.NavBar();\n mainPanel1 = new ekspedisi.panel.MainPanel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout bG1Layout = new javax.swing.GroupLayout(bG1);\n bG1.setLayout(bG1Layout);\n bG1Layout.setHorizontalGroup(\n bG1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(bG1Layout.createSequentialGroup()\n .addComponent(navBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(mainPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n bG1Layout.setVerticalGroup(\n bG1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(bG1Layout.createSequentialGroup()\n .addGap(88, 88, 88)\n .addComponent(navBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bG1Layout.createSequentialGroup()\n .addContainerGap(98, Short.MAX_VALUE)\n .addComponent(mainPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(42, 42, 42))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(bG1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(bG1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n }", "public ToolBarLayout()\n {\n this(LEFT, 5, 5);\n }", "public ShowView() {\n\t\tsuper(null);\n\t\tcreateActions();\n\t\taddToolBar(SWT.FLAT | SWT.WRAP);\n\t\taddMenuBar();\n\t\taddStatusLine();\n\t}", "private static ToolBar header(Stage stage) {\n\t\t// Main menu button on the right\n\t\tButton mainMenu = new Button(\"Main menu\");\n\t\tmainMenu.setOnAction(actionEvent -> mainMenu(stage));\n\t\t\n\t\t// Username on the left\n\t\tLabel usernameLabel = new Label(UserInterfaceLogic.getUsernameLabel());\n\t\t\n\t\tToolBar toolBar = new ToolBar();\n\t\ttoolBar.getItems().addAll(usernameLabel, new Separator(), mainMenu);\n\t\t\n\t\treturn toolBar;\n\t}", "public void manageComponent() {\n menu = new JMenuBar();\n mainbox = new JScrollPane();\n toolbox = new JPanel();\n paintBox = new JPanel();\n optionbox = new JPanel();\n statusbar = new JPanel();\n paintModule = new PaintModule();\n\n // component setting\n createToolBox(toolbox);\n createMenu(menu);\n createOptionBox(optionbox);\n createStatusBar(statusbar);\n this.setLayout(new BorderLayout());\n\n // add component to container\n paintBox.add(paintModule);\n mainbox.setViewportView(paintBox);\n\n\n this.add(menu, BorderLayout.NORTH);\n this.add(mainbox, BorderLayout.CENTER);\n this.add(toolbox, BorderLayout.WEST);\n this.add(optionbox, BorderLayout.EAST);\n this.add(statusbar, BorderLayout.SOUTH);\n\n }", "@Override\n\tprotected void setMenu() {\n\t\t\n\t\tfinal ButtonGroup actionButtonGroup = new ButtonGroup();\n\t\tfor (String s : ((TreeSite) object).actions) {\n\t\t\tJRadioButton button = new JRadioButton(s);\n\t\t\tbutton.setActionCommand(s);\n\t\t\tactionButtonGroup.add(button);\n\t\t\tmenu.add(button);\n\t\t}\n\t\t\n\t\tJPanel headingPanel = new JPanel();\n\t\theadingPanel.setLayout(new BoxLayout(headingPanel, BoxLayout.LINE_AXIS));\n\t\theadingPanel.add(new JLabel(\"Heading: \"));\n\t\tfinal JTextField headingField = new JTextField();\n\t\theadingField.setText(Float.toString(INITIAL_FLOAT_VALUE));\n\t\theadingField.setColumns(10);\n\t\theadingPanel.add(headingField);\n\t\tmenu.add(headingPanel);\n\t\t\n\t\tJPanel lengthPanel = new JPanel();\n\t\tlengthPanel.setLayout(new BoxLayout(lengthPanel, BoxLayout.LINE_AXIS));\n\t\tlengthPanel.add(new JLabel(\"Length: \"));\n\t\tfinal JTextField lengthField = new JTextField();\n\t\tlengthField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tlengthField.setColumns(10);\n\t\tlengthPanel.add(lengthField);\n\t\tmenu.add(lengthPanel);\n\t\t\n\t\tJPanel counterPanel = new JPanel();\n\t\tcounterPanel.setLayout(new BoxLayout(counterPanel, BoxLayout.LINE_AXIS));\n\t\tcounterPanel.add(new JLabel(\"Counter: \"));\n\t\tfinal JTextField counterField = new JTextField();\n\t\tcounterField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tcounterField.setColumns(10);\n\t\tcounterPanel.add(counterField);\n\t\tmenu.add(counterPanel);\n\t\t\n\t\tJPanel targetPanel = new JPanel();\n\t\ttargetPanel.setLayout(new BoxLayout(targetPanel, BoxLayout.LINE_AXIS));\n\t\ttargetPanel.add(new JLabel(\"Target position: \"));\n\t\ttargetFieldX = new JTextField();\n\t\ttargetFieldX.setEditable(false);\n\t\ttargetFieldX.setText(\"\");\n\t\ttargetFieldX.setColumns(4);\n\t\ttargetFieldY = new JTextField();\n\t\ttargetFieldY.setEditable(false);\n\t\ttargetFieldY.setText(\"\");\n\t\ttargetFieldY.setColumns(4);\n\t\ttargetPanel.add(targetFieldX);\n\t\ttargetPanel.add(new JLabel(\", \"));\n\t\ttargetPanel.add(targetFieldY);\n\t\tmenu.add(targetPanel);\n\t\tmenu.add(new SetTargetPositionButton(editor).button);\n\t\t\n\t\tJButton removeTargetButton = new JButton(\"Remove Target\");\n\t\tremoveTargetButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttargetFieldX.setText(\"\");\n\t\t\t\ttargetFieldY.setText(\"\");\n\t\t\t\teditor.targetIcon.setVisible(false);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tmenu.add(removeTargetButton);\n\t\t\n\t\tfinal CyclicButtonGroup cyclicButtons = new CyclicButtonGroup();\n\t\t\n\t\tJRadioButton nonCyclicButton = new JRadioButton(\"Set to non-cyclic\");\n\t\tnonCyclicButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tcyclicButtons.beginningOfCycle.data.cycleStart = false;\n\t\t\t\t\tcyclicButtons.beginningOfCycle = null;\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tcyclicButtons.add(nonCyclicButton);\n\t\t\n\t\tfinal JButton addActionButton = new JButton(\"Add Action\");\n\t\t\n\t\tmenu.add(addActionButton);\n\t\tmenu.add(nonCyclicButton);\n\t\t\n\t\taddActionButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (actionButtonGroup.getSelection() == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please select an action type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tFloat headingValue = null;\n\t\t\t\tInteger lengthValue = null;\n\t\t\t\tInteger counterValue = null;\n\t\t\t\tInteger targetValueX = null;\n\t\t\t\tInteger targetValueY = null;\n\t\t\t\tboolean noTarget = false;\n\t\t\t\ttry {\n\t\t\t\t\ttargetValueX = Integer.parseInt(targetFieldX.getText());\n\t\t\t\t\ttargetValueY = Integer.parseInt(targetFieldY.getText());\n\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\tnoTarget = true;\n\t\t\t\t}\n\t\t\t\tif (headingField.getText() == null || !isValidHeading(headingField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a heading value greater than or equal to 0 and less than 360\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\theadingValue = Float.parseFloat(headingField.getText());\n\t\t\t\t}\n\t\t\t\tif (lengthField.getText() == null || !isValidLength(lengthField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer length value greater than 0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlengthValue = Integer.parseInt(lengthField.getText());\n\t\t\t\t}\n\t\t\t\tif (counterField.getText() == null || !isValidCounter(counterField.getText(), Integer.parseInt(lengthField.getText()))) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer counter value greater than 0 and less than the length value\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcounterValue = Integer.parseInt(counterField.getText());\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tActionMetadata data = new ActionMetadata(actionButtonGroup.getSelection().getActionCommand(),\n\t\t\t\t\t\theadingValue, lengthValue, counterValue, false, targetValueX, targetValueY);\n\t\t\t\t((TreeSite) object).actionQueue.add(data);\n\t\t\t\tcreateActionPanel(cyclicButtons, data);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor (ActionMetadata metadata : ((TreeSite) object).actionQueue) {\n\t\t\tcreateActionPanel(cyclicButtons, metadata);\n\t\t}\n\t\t\n\t}", "public SideBar(Theme theme, Dimension sideBarSize, Dimension unripePageSize) {\r\n\r\n this.theme = theme;\r\n\r\n handler = new Handler();\r\n\r\n unripePage = new UnripePage(theme, unripePageSize);\r\n\r\n methodTypes = new ArrayList<>();\r\n\r\n requests = new ArrayList<>();\r\n\r\n panels = new JPanel[2];\r\n scrollPane = new JScrollPane();\r\n buttons = new JButton[3];\r\n menuBars = new JMenuBar[3];\r\n menus = new JMenu[3];\r\n filter = new JTextField();\r\n\r\n for (int i = 0; i < 3; i++) {\r\n\r\n buttons[i] = new JButton();\r\n buttons[i].setLayout(new BorderLayout(0,0));\r\n buttons[i].setBackground(theme.getButtonTheme()[0][0]);\r\n buttons[i].setForeground(theme.getButtonTheme()[0][1]);\r\n buttons[i].setFocusable(false);\r\n buttons[i].addMouseListener(handler);\r\n\r\n menuBars[i] = new JMenuBar();\r\n menuBars[i].setLayout(new BorderLayout(0, 0));\r\n\r\n menus[i] = new JMenu();\r\n menus[i].setLayout(new BorderLayout(0, 0));\r\n\r\n if (i < 2) {\r\n\r\n panels[i] = new JPanel();\r\n panels[i].setLayout(null);\r\n panels[i].setSize(250, 50);\r\n panels[i].setBackground(theme.getBackGroundTheme()[0]);\r\n panels[i].addMouseListener(handler);\r\n\r\n }\r\n\r\n }\r\n\r\n unripePage.getNewRequest().addActionListener(handler);\r\n\r\n panels[0].add(menuBars[0]);\r\n panels[0].add(buttons[0]);\r\n panels[0].add(filter);\r\n panels[0].add(buttons[1]);\r\n panels[0].add(buttons[2]);\r\n panels[0].setPreferredSize(new Dimension(sideBarSize.width, 130));\r\n\r\n scrollPane.setViewportView(panels[1]);\r\n scrollPane.setUI(new WindowsScrollPaneUI());\r\n scrollPane.getHorizontalScrollBar().setUI(new WindowsScrollBarUI());\r\n scrollPane.getVerticalScrollBar().setUI(new WindowsScrollBarUI());\r\n\r\n buttons[0].setBounds(0, 55, 150, 30);\r\n buttons[0].setText(\"New Environment\");\r\n buttons[0].setIcon(new ImageIcon(theme.getAddressIcons()+\"icons8_sort_down_10px.png\"));\r\n buttons[0].setHorizontalTextPosition(SwingConstants.LEADING);\r\n buttons[0].add(menuBars[1] ,BorderLayout.WEST);\r\n\r\n buttons[1].setBounds(152, 55, 96, 30);\r\n buttons[1].setText(\"Cookies\");\r\n\r\n buttons[2].setBounds(207, 90, 35, 35);\r\n buttons[2].setIcon(new ImageIcon(theme.getAddressIcons()+\"icons8_sort_down_&&_plus_25px.png\"));\r\n buttons[2].add(menuBars[2] ,BorderLayout.WEST);\r\n\r\n menuBars[0].setBounds(0, 0, 250, 50);\r\n menuBars[0].setUI(new BasicMenuBarUI());\r\n menuBars[0].setBackground(theme.getInsomniaTheme()[0]);\r\n menuBars[0].setBorder(BorderFactory.createMatteBorder(1,0,1,0,theme.getInsomniaTheme()[3]));\r\n menuBars[0].add(menus[0]);\r\n\r\n menuBars[1].setPreferredSize(new Dimension(0, 0));\r\n menuBars[1].add(menus[1]);\r\n\r\n menuBars[2].setPreferredSize(new Dimension(0, 0));\r\n menuBars[2].add(menus[2]);\r\n\r\n menus[0].setForeground(theme.getInsomniaTheme()[1]);\r\n menus[0].setFont(new Font(\"Times New Roman\", Font.PLAIN, 20));\r\n menus[0].setText(\"Insomnia\");\r\n menus[0].setIcon(new ImageIcon(theme.getAddressIcons()+\"icons8_list_30px.png\"));\r\n menus[0].setHorizontalAlignment(SwingConstants.LEFT);\r\n menus[0].setHorizontalTextPosition(SwingConstants.TRAILING);\r\n menus[0].setIconTextGap(8);\r\n menus[0].addMouseListener(handler);\r\n menus[0].add(new JMenuItem(\"Workspace Settings\"));\r\n menus[0].add(new JMenuItem(\"Create Workspace\"));\r\n menus[0].add(new JMenuItem(\"Preferences\"));\r\n menus[0].add(new JMenuItem(\"Import/Export\"));\r\n menus[0].add(new JMenuItem(\"Log In\"));\r\n\r\n menus[1].setMenuLocation(-18, -7 + buttons[0].getHeight());\r\n menus[1].add(new JMenuItem(\"No Environment\"));\r\n menus[1].add(new JMenuItem(\"Manage Environments\"));\r\n\r\n menus[2].setMenuLocation(-18, -7 + buttons[2].getHeight());\r\n menus[2].add(new JMenuItem(\"New Request\"));\r\n menus[2].add(new JMenuItem(\"New Folder\"));\r\n menus[2].getItem(0).setIcon(new ImageIcon(theme.getAddressIcons()+\"icons8_joyent_15px.png\"));\r\n menus[2].getItem(0).setAccelerator(KeyStroke.getKeyStroke(\"ctrl N\"));\r\n menus[2].getItem(1).setIcon(new ImageIcon(theme.getAddressIcons()+\"icons8_doctors_folder_15px.png\"));\r\n\r\n for (int i = 0; i < 3; i++) {\r\n for (Component component : menus[i].getMenuComponents()) {\r\n ((JMenuItem) component).addActionListener(handler);\r\n }\r\n }\r\n\r\n filter.setBounds(2, 90, 200, 35);\r\n filter.setBackground(theme.getTextFieldTheme()[0][0]);\r\n filter.setForeground(theme.getTextFieldTheme()[0][1]);\r\n filter.addFocusListener(handler);\r\n filter.addMouseListener(handler);\r\n filter.addKeyListener(handler);\r\n\r\n setLayout(new BorderLayout(0, 0));\r\n addMouseListener(handler);\r\n setSize(250, 50);\r\n add(panels[0], BorderLayout.NORTH);\r\n add(scrollPane, BorderLayout.CENTER);\r\n\r\n }", "public void initTurnPanel() {\n this.turnPanel = new JPanel();\n int turnPanelWidth = 0;\n Font f = new Font(\"Helvetica\", Font.BOLD, 18);\n\n turnPanel.setBackground(new Color(0xeaf1f7));\n turnPanel.setLayout(new GridLayout(1, nicknames.size(), 0, 0));\n\n for (int i = 0; i < nicknames.size(); i++) {\n turnPanelWidth = turnPanelWidth + nicknames.get(i).getText().length();\n nicknames.get(i).setFont(f);\n nicknames.get(i).setSize(new Dimension(nicknames.get(i).getText().length() * letterOffset, buttonHeight));\n turnPanel.add(nicknames.get(i));\n }\n turnPanelWidth = turnPanelWidth*letterOffset;\n turnPanel.setPreferredSize(new Dimension(turnPanelWidth+50*nicknames.size(), buttonHeight));\n\n blankLabels = new JLabel[2];\n for (int i = 0; i < blankLabels.length; i++) {\n blankLabels[i] = new JLabel();\n blankLabels[i].setPreferredSize(new Dimension(80, buttonHeight));\n navigationBar.add(blankLabels[i]);\n }\n\n this.navigationBar.add(turnPanel);\n }", "private void layoutBar() {\n this.setVisible(false);\n final SpringLayout layout = (SpringLayout) this.getLayout();\n final int numComponents = this.getComponentCount() - 1;\n \n SpringLayout.Constraints constraints;\n \n layout.putConstraint(SpringLayout.WEST, getComponent(0),\n Spring.constant(0), SpringLayout.WEST, this);\n layout.putConstraint(SpringLayout.EAST, getComponent(0),\n Spring.constant(-SMALL_BORDER), SpringLayout.WEST, getComponent(1));\n constraints = layout.getConstraints(getComponent(0));\n constraints.setHeight(Spring.constant(20));\n \n for (int i = 1; i < numComponents; i++) {\n layout.putConstraint(SpringLayout.EAST, getComponent(i),\n Spring.constant(-SMALL_BORDER), SpringLayout.WEST,\n getComponent(i + 1));\n constraints = layout.getConstraints(getComponent(i));\n constraints.setHeight(Spring.constant(20));\n constraints.setWidth(constraints.getWidth());\n }\n \n layout.putConstraint(SpringLayout.EAST, getComponent(numComponents),\n Spring.constant(0), SpringLayout.EAST, this);\n constraints = layout.getConstraints(getComponent(numComponents));\n constraints.setHeight(Spring.constant(20));\n constraints.setWidth(constraints.getWidth());\n this.setVisible(true);\n }", "public void setelecmenu() {\n\n\t\tjpcmenu = new JPanel();\n\t\tjpcmenu.setLayout(null);\n\t\tjbc0 = new JButton(\"Current use today\"); jbc0.setBounds(140,30,200,30);\n\t\tjbc1 = new JButton(\"History view\"); jbc1.setBounds(140,90,200,30);\n\t\tjbc2 = new JButton(\"Tariff check\"); jbc2.setBounds(140,150,200,30);\n\t\tjbc3 = new JButton(\"Budget setting\"); jbc3.setBounds(140,210,200,30);\n\t\tjbcreturn = new JButton(\"Return\"); jbcreturn.setBounds(350,300,100,20);\n\t\tjbc0.addActionListener(this);\n\t\tjbc1.addActionListener(this);\n\t\tjbc2.addActionListener(this);\n\t\tjbc3.addActionListener(this);\n\t\tjbcreturn.addActionListener(this);\n\t\tjpcmenu.add(jbc0);\n\t\tjpcmenu.add(jbc1);\n\t\tjpcmenu.add(jbc2);\n\t\tjpcmenu.add(jbc3);\n\t\tjpcmenu.add(jbcreturn);\n\t\t\n\t\tcard1 = new CardLayout(); \n\t\tcpanel = new JPanel(card1);\n\t\tcpanel.add(jpcmenu,\"menu\");\n\t\t\n\t\tthis.add(cpanel);\n\t\tthis.setTitle(\"SEMAMS\");\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n\t\tthis.setSize(500, 400);\n\t\tthis.setResizable(true); \n\t\tthis.setVisible(true);\n\t}", "public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }", "public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuItem(\"Exit \");\n\t\tJMenuItem preferences = new JMenuItem(\"Preferences \");\n\t\tJMenuItem about = new JMenuItem(\"About \");\n\n\n\t\tfile.add(open);\n\t\tfile.add(save);\n\t\tfile.addSeparator();\n\t\tfile.add(exit);\n\t\ttools.add(preferences);\n\t\thelp.add(about);\n\n\t\tmenuBar.add(file);\n\t\tmenuBar.add(tools);\n\t\tmenuBar.add(help);\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "private FilterBar() {\n\t\t\n\t\tsuper(15);\n\t\tthis.setStyle(\"-fx-background-color: #FFFFFF;\");\n\t\tthis.setPadding(new Insets(25, 25, 25, 25));\n\t\t\n\t\taddNodes();\n\t\taddListeners();\n\t\t\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.setOpaque(true);\n panel1.setPreferredSize(new Dimension(980, 660));\n LeftPane = new JPanel();\n LeftPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(LeftPane, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n LeftPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(new Color(-4473925)), null));\n Stats = new JPanel();\n Stats.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n LeftPane.add(Stats, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n label1.setText(\"Player:\");\n Stats.add(label1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n Font label2Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label2.getFont());\n if (label2Font != null) label2.setFont(label2Font);\n label2.setText(\"Highscore:\");\n Stats.add(label2, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n highScore = new JTextField();\n highScore.setEditable(false);\n highScore.setHorizontalAlignment(0);\n Stats.add(highScore, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n playerName = new JTextField();\n playerName.setEditable(false);\n playerName.setHorizontalAlignment(0);\n playerName.setText(\"\");\n Stats.add(playerName, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label3 = new JLabel();\n Font label3Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label3.getFont());\n if (label3Font != null) label3.setFont(label3Font);\n label3.setText(\"Level:\");\n Stats.add(label3, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n levelId = new JTextField();\n levelId.setEditable(false);\n levelId.setHorizontalAlignment(0);\n Stats.add(levelId, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label4 = new JLabel();\n Font label4Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label4.getFont());\n if (label4Font != null) label4.setFont(label4Font);\n label4.setText(\"Time:\");\n Stats.add(label4, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n timeLeft = new JTextField();\n timeLeft.setEditable(false);\n timeLeft.setEnabled(true);\n timeLeft.setFocusable(true);\n timeLeft.setHorizontalAlignment(0);\n timeLeft.setOpaque(true);\n Stats.add(timeLeft, new com.intellij.uiDesigner.core.GridConstraints(4, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label5 = new JLabel();\n Font label5Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label5.getFont());\n if (label5Font != null) label5.setFont(label5Font);\n label5.setHorizontalAlignment(10);\n label5.setText(\"Score:\");\n Stats.add(label5, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n scoreField = new JTextField();\n scoreField.setEditable(false);\n scoreField.setHorizontalAlignment(0);\n Stats.add(scoreField, new com.intellij.uiDesigner.core.GridConstraints(3, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label6 = new JLabel();\n Font label6Font = this.$$$getFont$$$(\"Stencil\", -1, 18, label6.getFont());\n if (label6Font != null) label6.setFont(label6Font);\n label6.setText(\"Molecule:\");\n LeftPane.add(label6, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n moleculeName = new JTextField();\n moleculeName.setEditable(false);\n moleculeName.setFocusable(true);\n Font moleculeNameFont = this.$$$getFont$$$(\"Stencil\", -1, 18, moleculeName.getFont());\n if (moleculeNameFont != null) moleculeName.setFont(moleculeNameFont);\n moleculeName.setHorizontalAlignment(0);\n moleculeName.setOpaque(true);\n moleculeName.setRequestFocusEnabled(true);\n moleculeName.setText(\"\");\n moleculeName.setVisible(true);\n moleculeName.putClientProperty(\"caretWidth\", new Integer(0));\n LeftPane.add(moleculeName, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n molPane = new JPanel();\n molPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n LeftPane.add(molPane, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n molPane.add(moleculePanel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(160, 96), null, null, 0, false));\n RightPane = new JPanel();\n RightPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(RightPane, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n RightPane.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n RightPane.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n gamePane = new JPanel();\n gamePane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n RightPane.add(gamePane, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(640, 600), null, new Dimension(800, 640), 0, false));\n gamePane.add(gamePanel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(640, 609), null, new Dimension(980, 680), 0, false));\n }", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "private void createToolbars() {\n\t\tJToolBar toolBar = new JToolBar(\"Tools\");\n\t\ttoolBar.setFloatable(true);\n\n\t\ttoolBar.add(new JButton(new ActionNewDocument(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionOpen(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSave(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSaveAs(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionCut(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionCopy(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionPaste(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionStatistics(flp, this)));\n\n\t\tthis.getContentPane().add(toolBar, BorderLayout.PAGE_START);\n\t}", "public SwingStatusBar() {\n super();\n \n setBorder(BorderFactory.createEmptyBorder(0, SMALL_BORDER, SMALL_BORDER,\n SMALL_BORDER));\n \n messageLabel = new JLabel(DEFAULT_MESSAGE);\n iconLabel = new JLabel(DEFAULT_ICON);\n \n messageLabel.setBorder(BorderFactory.createEtchedBorder());\n iconLabel.setBorder(BorderFactory.createEtchedBorder());\n \n messageLabel.addMouseListener(this);\n iconLabel.addMouseListener(this);\n ErrorManager.getErrorManager().addErrorListener(this);\n clearError();\n \n setLayout(new SpringLayout());\n \n add(messageLabel);\n add(iconLabel);\n \n setPreferredSize(new Dimension(Short.MAX_VALUE, 25));\n setMaximumSize(new Dimension(Short.MAX_VALUE, 25));\n \n layoutBar();\n }", "public void addMenuItems()\n\t{\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setLayout(null);\n\t\tstartButton.setBounds(350, 225, 100, 50);\n\t\t\n\t\toptionsButton = new JButton(\"Options\");\n\t\toptionsButton.setLayout(null);\n\t\toptionsButton.setBounds(350, 275, 100, 50);\n\t\t\n\t\texitButton = new JButton(\"Exit\");\n\t\texitButton.setLayout(null);\n\t\texitButton.setBounds(350, 375, 100, 50);\n\t\texitButton.setActionCommand(\"exit\");\n\t\texitButton.addActionListener((ActionListener) this);\n\t\t\n\t\tmainMenuPanel.add(startButton);\n\t\tmainMenuPanel.add(optionsButton);\n\t\tmainMenuPanel.add(startButton);\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "private void setupGUI(){\r\n\t\t\r\n\t\tfinal GUIFactory guifactory = GUIFactory.instance();\r\n\t\tfinal MTApplication app = (MTApplication)item.getView().getRenderer();\r\n\t\tfinal float leftiness = app.getWidth()*5/6;\r\n\t\tfinal float xPos = leftiness + 5;\r\n\t\t\r\n\t\t\r\n\t\toverlay = new MTOverlayContainer( app);\r\n\t\titem.getView().getRoot().addChild( overlay);\r\n\t\t\r\n\t\t// _THE_ PANEL \r\n\t\t\r\n\t\tpnlPanel = guifactory.createPanel( leftiness, 0, app.getWidth()-leftiness, app.getHeight(),\"pnlPanel\", overlay);\t\t\t\r\n\t\t\r\n\t\t// INTERACTION PANEL\r\n\t\t\r\n\t\tpnlInteraction = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlInteraction\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlInteraction.setNoFill( true);\r\n\t\t\r\n\t\t// EDIT PANEL\r\n\t\t\r\n\t\tpnlEdit = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlEdit\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlEdit.setVisible( false);\r\n\t\tpnlEdit.setNoFill( true);\r\n\t\t\r\n\t\t\r\n\t\t// ITEM NAME TEXTAREA\r\n\t\t\r\n\t\tString itemName = item.getName();\r\n\t\tif(itemName == null || itemName.equals( \"\"))\r\n\t\t\titemName = item.getID();\r\n\t\ttxtItemName = guifactory.createTextArea(itemName, \"txtItemName\", pnlPanel);\r\n\t\ttxtItemName.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getY() + 10\t\r\n\t\t\t\t));\r\n\r\n\r\n\t\t// PANEL PICTURE\r\n\r\n\t\tVector3D pnlInteractionPos = pnlInteraction.getPosition( TransformSpace.GLOBAL);\r\n\t\tpnlPicture = guifactory.createPanel( pnlInteractionPos.getX()+50, pnlInteractionPos.getY()+50, 100, 100, \"pnlPicture\", pnlInteraction);\r\n\t\tpnlPicture.setAnchor( PositionAnchor.CENTER);\r\n\t\tpnlPicture.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\tpnlInteractionPos.getX() + pnlInteraction.getWidthXY( TransformSpace.GLOBAL)/2,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 50 + pnlPicture.getHeightXY( TransformSpace.GLOBAL)/2\r\n\t\t\t\t));\r\n\t\tpnlPicture.setTexture( GUITextures.instance().getByDevice( DeviceType.getDeviceType( device)));\r\n\t\t\r\n\t\t\r\n\t\t// POWER USAGE TEXTAREA\r\n\t\t\r\n\t\tString powerUsage = \"n/a\";\r\n\t\tif( device.getPowerUsage() != null && device.getPowerUsage().getValue() != null){\r\n\t\t\tpowerUsage = device.getPowerUsage().getValue().toString();\r\n\t\t}\r\n\t\t\r\n\t\ttxtPowerUsage = guifactory.createTextArea( \"Power usage: \" + powerUsage + \" Watts\", \"txtPowerUsage\", pnlInteraction);\r\n\t\ttxtPowerUsage.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 140\t\t\r\n\t\t\t\t\t\t));\r\n\t\ttxtPowerUsage.setVisible( false);\r\n\t\t\r\n\t\t\r\n\t\t// ON/OFF BUTTON\r\n\t\t\r\n\t\tbtnOnOff = guifactory.createButton( \"Turn device On/Off\", \"btnOnOff\", pnlInteraction);\r\n\t\tbtnOnOff.setPosition( txtPowerUsage.getPosition( TransformSpace.GLOBAL));\r\n\t\tbtnOnOff.addGestureListener( TapProcessor.class, new BtnOnOffListener());\r\n\t\t\r\n\t\t\r\n\t\t// SUBDEVICE BUTTON PANEL\r\n\t\t\r\n\t\tpnlSubDeviceButtons = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getX(),\r\n\t\t\t\tbtnOnOff.getVectorNextToComponent( 10, false).getY(),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tdevice.getSubDevice().size() * (btnOnOff.getHeight()+10),\r\n\t\t\t\t\"pnlSubDeviceButtons\",\r\n\t\t\t\tpnlInteraction);\r\n\t\t\r\n\t\t// SUB DEVICE BUTTONS\r\n\t\t\r\n\t\tsubDeviceButtons = new LinkedList<MTButton>();\r\n\t\tfor( int i = 0; i < device.getSubDevice().size(); i++){\r\n\t\t\t\r\n\t\t\tPhysicalDevice subDevice = device.getSubDevice().get( i);\r\n\t\t\t\r\n\t\t\t// get button's caption\r\n\t\t\tString caption = subDevice.getName();\r\n\t\t\tif(caption == null || caption.equals( \"\"))\r\n\t\t\t\tcaption = subDevice.getId();\r\n\t\t\t\r\n\t\t\tMTButton btnSubDevice = guifactory.createButton( caption, \"btnSubDevice_\" + subDevice.getId(), pnlSubDeviceButtons);\r\n\t\t\tbtnSubDevice.setPosition(\r\n\t\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\t\r\n\t\t\t\t\t\tpnlSubDeviceButtons.getPosition( TransformSpace.GLOBAL).getY() + i*(btnSubDevice.getHeight() + 10)\r\n\t\t\t\t\t));\r\n\t\t\t\r\n\t\t\tsubDeviceButtons.add( btnSubDevice);\r\n\t\t\tbtnSubDevice.addGestureListener( TapProcessor.class, new BtnSubDeviceListener( subDevice));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// EDIT BUTTON\r\n\t\t\r\n\t\tbtnEdit = guifactory.createButton( \"Edit\", \"btnEdit\", pnlInteraction);\r\n\t\tbtnEdit.setPosition( new Vector3D( xPos, app.getHeight() - 2*btnEdit.getHeight() - 30));\r\n\t\tbtnEdit.addGestureListener( TapProcessor.class, new BtnEditListener());\r\n\t\t\r\n\t\t\r\n\t\t// BUTTON HIDE\r\n\t\t\r\n\t\tbtnHide = guifactory.createButton( \"Hide menu\", \"btnHide\", pnlPanel);\r\n\t\tbtnHide.setPosition( new Vector3D( xPos, app.getHeight() - btnHide.getHeight() - 20));\r\n\t\tbtnHide.addGestureListener( TapProcessor.class, new BtnHideListener());\r\n\t\t\r\n\t\t\r\n\t\t///// EDIT-ELEMENTS /////\r\n\r\n\t\tchkMovePlanar = guifactory.createCheckButton( \"Move planar\", \"chkMovePlanar\", pnlEdit);\r\n\t\tchkMovePlanar.setPosition(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\ttxtItemName.getPosition( TransformSpace.GLOBAL).getY() + txtItemName.getHeightXY( TransformSpace.GLOBAL)+ 20\t\r\n\t\t\t\t));\r\n\t\tchkMovePlanar.addGestureListener( TapProcessor.class, new ChkMovePlanarListener());\r\n\r\n\t\t\r\n\t\tchkMoveY = guifactory.createCheckButton( \"Move up/down\", \"chkMoveY\", pnlEdit);\r\n\t\tchkMoveY.setPosition( chkMovePlanar.getVectorNextToComponent( 10, false));\r\n\t\tchkMoveY.addGestureListener( TapProcessor.class, new ChkMoveYListener());\r\n\r\n\t\t\r\n\t\tchkRotate = guifactory.createCheckButton( \"Rotate\", \"chkRotate\", pnlEdit);\r\n\t\tchkRotate.setPosition( chkMoveY.getVectorNextToComponent( 10, false));\r\n\t\tchkRotate.addGestureListener( TapProcessor.class, new ChkRotateListener());\r\n\r\n\t\t\r\n\t\tchkScale = guifactory.createCheckButton( \"Scale\", \"chkScale\", pnlEdit);\r\n\t\tchkScale.setPosition( chkRotate.getVectorNextToComponent( 10, false));\r\n\t\tchkScale.addGestureListener( TapProcessor.class, new ChkScaleListener());\r\n\r\n\t\t\r\n\t\tbtnChangeVisualisation = guifactory.createButton( \"Change Style\", \"btnChangeVisualisation\", pnlEdit);\r\n\t\tbtnChangeVisualisation.setPosition( chkScale.getVectorNextToComponent( 10, false));\r\n\t\tbtnChangeVisualisation.addGestureListener( TapProcessor.class, new BtnChangeVisualisationListener());\r\n\t\t\r\n\t\t\r\n\t\tbtnSave = guifactory.createButton( \"Save\", \"btnSave\", pnlEdit);\r\n\t\tbtnSave.setPosition( btnEdit.getPosition());\r\n\t\tbtnSave.addGestureListener( TapProcessor.class, new BtnSaveListener());\r\n\t}", "private Component getStatusBar() {\n\t\tJPanel statusBar = new JPanel();\n\t\tstatusBar.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));\n\t\tstatusLabel = new JLabel(\"Status: \");\n\t\tstatusLabel.setFont(new Font(\"SansSerif\", Font.ITALIC, 11));\n\t\tstatusBar.setLayout(new FlowLayout(FlowLayout.LEFT));\n\t\tstatusBar.add(statusLabel);\n\t\tstatusBar.setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 4));\n\t\treturn statusBar;\n\t}", "private JMenuBar createMenuBar()\r\n {\r\n UIManager.put(\"Menu.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.LIGHT_GRAY);\r\n JMenuBar menuBar = new JMenuBar();\r\n JMenu menu = new JMenu(\"Fil\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menu.getBackground());\r\n menuItemSave = new JMenuItem(\"Lagre\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menuItemSave.getBackground());\r\n menuItemSave.setForeground(Color.LIGHT_GRAY);\r\n menuItemSave.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemSave.setAccelerator(KeyStroke.getKeyStroke('S', Event.CTRL_MASK));\r\n menuItemSave.addActionListener(listener);\r\n menu.add(menuItemSave);\r\n menuItemPrint = new JMenuItem(\"Skriv ut\");\r\n menuItemPrint.setForeground(Color.LIGHT_GRAY);\r\n menuItemPrint.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemPrint.setAccelerator(KeyStroke.getKeyStroke('P', Event.CTRL_MASK));\r\n menuItemPrint.addActionListener(listener);\r\n menu.add(menuItemPrint);\r\n menu.addSeparator();\r\n menuItemLogout = new JMenuItem(\"Logg av\");\r\n menuItemLogout.setForeground(Color.LIGHT_GRAY);\r\n menuItemLogout.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemLogout.addActionListener(listener);\r\n menuItemLogout.setAccelerator(KeyStroke.getKeyStroke('L', Event.CTRL_MASK));\r\n menu.add(menuItemLogout);\r\n UIManager.put(\"MenuItem.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.BLACK);\r\n menuItemClose = new JMenuItem(\"Avslutt\");\r\n menuItemClose.setAccelerator(KeyStroke.getKeyStroke('A', Event.CTRL_MASK));\r\n menuItemClose.addActionListener(listener);\r\n menuBar.add(menu);\r\n menu.add(menuItemClose);\r\n JMenu menu2 = new JMenu(\"Om\");\r\n menuItemAbout = new JMenuItem(\"Om\");\r\n menuItemAbout.setAccelerator(KeyStroke.getKeyStroke('O', Event.CTRL_MASK));\r\n menuItemAbout.addActionListener(listener);\r\n menuItemAbout.setBorder(BorderFactory.createEmptyBorder());\r\n menu2.add(menuItemAbout);\r\n menuBar.add(menu2);\r\n \r\n return menuBar;\r\n }", "public ItemsControl() {\t\t\t\t\n\t\tlistListener = new SourceListChangeListener();\n\n\t\tBoxLayout boxLayout = new BoxLayout(this, BoxLayout.Y_AXIS);\n\t\tsetLayout(boxLayout);\t\t\t\t\n\t\tif (Beans.isDesignTime()) {\t\t\t\n\t\t\tJLabel designTimeCaptionLbl = new JLabel(\"<ItemsControl>\");\t\t\t\t\t\t\n\t\t\tthis.add(designTimeCaptionLbl);\n\t\t}\n\t}", "private void setupLeftHandSidePanel(GridPane contentGrid) {\n GridPane leftHandSidePanel = createGridPane(10, 10, new Insets(10));\n leftHandSidePanel.setId(\"navigationView\");\n addNodeToGrid(leftHandSidePanel, contentGrid, 0, 0, Insets.EMPTY);\n\n this.navigationView = new NavigationView(leftHandSidePanel);\n }", "private void setupToolBar() {\n\t\tJPanel buttons = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoolBar = new JToolBar(\"Buttons\");\n\t\ttoolBar.setFloatable(false);\n\t\ttoolBar.setOrientation(SwingConstants.VERTICAL);\n\t\tbuttons.add(toolBar, c);\n\t\tadd(buttons, BorderLayout.EAST);\n\t}", "private void buildPanel()\n {\n setLayout(new BorderLayout());\n JLabel instr = new JLabel(TOP_HELP);\n instr.setToolTipText(POPUP_HELP);\n add(instr, BorderLayout.NORTH);\n\n final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);\n splitPane.setContinuousLayout(true);\n splitPane.setResizeWeight(.9);\n splitPane.setOneTouchExpandable(true);\n\n mMazeView.setMinimumSize(new Dimension(400, 200));\n splitPane.setLeftComponent(mMazeView);\n mMazeView.setModel(null);\n\n this.mOpenMazes = new MazeList(this.mMazeView);\n this.mOpenMazes.setMinimumSize(new Dimension(160, 0));\n JPanel rightPanel = new JPanel();\n rightPanel.setLayout(new BorderLayout());\n rightPanel.add(this.mOpenMazes, BorderLayout.CENTER);\n\n final JPanel rightPanelButtons = new JPanel(new BorderLayout());\n rightPanelButtons.add(makeNewMazeButton(), BorderLayout.NORTH);\n rightPanelButtons.add(makeRandomMazeButton(), BorderLayout.SOUTH);\n\n rightPanel.add(rightPanelButtons, BorderLayout.SOUTH);\n splitPane.setRightComponent(rightPanel);\n\n add(splitPane, BorderLayout.CENTER);\n splitPane.setDividerLocation(.8);\n\n addComponentListener(new ComponentAdapter()\n {\n boolean notShown = true;\n\n @Override\n public void componentShown(ComponentEvent e)\n {\n if (notShown)\n {\n splitPane.setDividerLocation(.8);\n notShown = false;\n }\n }\n });\n\n JToolBar tBar = new JToolBar();\n tBar.setOrientation(JToolBar.VERTICAL);\n tBar.setFloatable(false);\n ButtonGroup bg = new ButtonGroup();\n\n ImageIcon scaled = new ImageIcon(mPointIcon.getImage().getScaledInstance(40, 40, 0));\n JToggleButton tb = new JToggleButton(scaled);\n tb.setToolTipText(\"No Template\");\n tb.addActionListener(new TemplateActionListener(null));\n bg.add(tb);\n bg.setSelected(tb.getModel(), true);\n tBar.add(tb);\n\n for (MazeTemplate mt : mTemplates)\n {\n Image iconImage = mt.getTemplateIcon().getImage();\n scaled = new ImageIcon(iconImage.getScaledInstance(40, 40, 0));\n tb = new JToggleButton(scaled);\n tb.addActionListener(new TemplateActionListener(mt));\n tb.setToolTipText(mt.getTemplateDescription());\n bg.add(tb);\n tBar.add(tb);\n }\n\n add(tBar, BorderLayout.WEST);\n\n //Add an action for the 'r' key to change the template to the next orientation.\n this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke('r'),\n NEXT_ORIENTATION_ACTION_KEY);\n this.getActionMap().put(NEXT_ORIENTATION_ACTION_KEY, new AbstractAction()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n if (mCurrentTemplate != null)\n {\n mCurrentTemplate.nextOrientation();\n mMazeView.repaint();\n }\n }\n });\n\n mMouseAdapter = new TemplateMouseAdapter();\n\n mMazeView.addMouseListener(mMouseAdapter);\n mMazeView.addMouseMotionListener(mMouseAdapter);\n mMazeView.addMouseWheelListener(mMouseAdapter);\n }", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }" ]
[ "0.6458948", "0.63143176", "0.62702227", "0.6249227", "0.62301564", "0.61870176", "0.61617583", "0.6153295", "0.61370534", "0.61272544", "0.6101876", "0.6079215", "0.60783535", "0.60745907", "0.606482", "0.6064573", "0.60635257", "0.60627764", "0.6058516", "0.604839", "0.6035319", "0.603036", "0.6029976", "0.60248935", "0.6015092", "0.6014511", "0.59989476", "0.5993412", "0.59834707", "0.5982457", "0.5974959", "0.59683853", "0.5956044", "0.5952709", "0.59474057", "0.59443104", "0.5918112", "0.59149396", "0.5910176", "0.58911955", "0.5889455", "0.5883578", "0.58726496", "0.58634996", "0.585714", "0.58554", "0.5840914", "0.58385855", "0.58378625", "0.58335537", "0.583222", "0.582363", "0.58210695", "0.5815792", "0.5812333", "0.58080345", "0.5803259", "0.58031416", "0.5803001", "0.5802519", "0.58022386", "0.5799222", "0.57991767", "0.57991767", "0.57970977", "0.57964987", "0.57956564", "0.5792611", "0.5786907", "0.57863677", "0.5786169", "0.578608", "0.57838666", "0.5779107", "0.57760966", "0.57738686", "0.57695794", "0.57675844", "0.57638806", "0.57534903", "0.5747115", "0.57464397", "0.5745187", "0.5744226", "0.574191", "0.5738039", "0.57303846", "0.5727209", "0.5721041", "0.57142735", "0.5712712", "0.5708199", "0.5707446", "0.57055634", "0.570246", "0.57018673", "0.5696177", "0.56916994", "0.5690166", "0.567912" ]
0.75784236
0
state change listeners for JSlider
@Override public void stateChanged(ChangeEvent e) { //changes speed of animation if (e.getSource() == speed) { timer.stop(); timer.setDelay(speed.getValue()); stop.setSelected(true); } //changes # of boxes if (e.getSource() == gridSize) { timer.stop(); stop.setSelected(true); int [][] newGrid = new int [gridSize.getValue()][gridSize.getValue()]; gridValues = newGrid; SetState(-1); generateValues(source); counter = 0; steps.setText("Steps: " + counter); repaint(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stateChanged(ChangeEvent e) {\n\n\t\tJSlider src = (JSlider) e.getSource();\n\n\t\tif (src == gainFactorSlider) {\n\t\t\tif (!src.getValueIsAdjusting()) {\n\t\t\t\tint val = (int) src.getValue();\n\t\t\t\tgainFactor = val * 0.25;\n\n\t\t\t}\n\t\t} else if (src == biasFactorSlider) {\n\t\t\tif (!src.getValueIsAdjusting()) {\n\t\t\t\tbiasFactor = (int) src.getValue();\n\n\t\t\t}\n\t\t}\n\n\t}", "@Override\r\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tJSlider source = (JSlider)e.getSource();\r\n\t\tif (!source.getValueIsAdjusting()) {\r\n\t\t\tSystem.out.println(source.getValue());\r\n\t\t\tSliderState.setSliderValue(source.getValue());\r\n\t\t}\r\n\t}", "private void sliderChanged(ChangeEvent e) {\n\t\tif (isTest()) { // TEST TEST TEST TEST !!!!!!!!!!!!!\n\t\t\treturn;\n\t\t}\n\t\n\t\tJSlider source = (JSlider) e.getSource();\n\t\tsliderValue = (int) source.getValue();\n\t\t// System.out.println(windowBase.getName() + \": sliderChanged: \" +\n\t\t// sliderValue);\n\t\tint size = index.data.getPictureSize();\n\t\tif (size == 0) {\n\t\t\tremoveAllPictureViews(); \n\t\t\treturn;\n\t\t}\n\t\t\n\t\t \n\t\tPM_Picture pic = null;\n\t\t\n\t\tif (client.getComponentCount() > 0) {\n\t\t\tObject o = client.getComponent(0);\n\t\t\tif (o instanceof PM_PictureView) {\n\t\t\t\tpic = ((PM_PictureView)o).getPicture();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"..... sliderChanged\");\n\t\tpaintViewport(pic);\n\t\t// paintViewport(null);\n\t}", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tJSlider source = (JSlider) e.getSource();\n\t\tif(!source.getValueIsAdjusting()) {// getValueIsAdjusting 함수는 어떤 이벤트 인스턴스에서 연속적으로 이벤트가 일어 났을 때, \n\t\t\t//해당 이벤트 인스턴스들을 일종의 데이터 체인으로 보고 체인의 마지막 인스턴스 외에서 호출하는 경우 true를 반환하는 함수이다.\n\t\t\t\n\t\t\t\n\t\tint value = (int) slider.getValue();\n\t\timgBtn.setSize(value*10, value*10);// 슬라이더의 상태가 변경되면 호출됨\n\t\t}\n\t}", "public void stateChanged(ChangeEvent event)\n {\n JSlider source = (JSlider) event.getSource();\n if (!source.getValueIsAdjusting())\n {\n SensorInfo.getInstance().setSliderSpeed(source.getValue());\n Controller.getInstance().setMotors();\n }\n }", "public void stateChanged(ChangeEvent e) {\n JSlider source = (JSlider)e.getSource();\n //volume\n if(parameter=='v'){\n System.out.println(\"Panel: \"+numSampler+\" volume: \"+source.getValue());\n }\n //volume\n else if(parameter=='p'){\n System.out.println(\"Panel: \"+numSampler+\" pitch: \"+source.getValue());\n }\n else if(parameter=='f'){\n System.out.println(\"Panel: \"+numSampler+\" filter cutoff: \"+source.getValue());\n }\n }", "@Override\n\t\t\tpublic void stateChanged(final ChangeEvent evt) {\n\t\t\t\tfinal JSlider mySlider3 = (JSlider) evt.getSource();\n\t\t\t\t//if (source.getValueIsAdjusting()) {\n\t\t\t\tif (mySlider3.getValueIsAdjusting()) {\n\t\t\t\t\t// int freq = (int)source.getValue();\n\t\t\t\t\tfloat freq = (float) mySlider3.getValue();\n\t\t\t\t\tfreq = (freq / FREQ_MAX) * (freq / FREQ_MAX);\n\t\t\t\t\tfreq = freq * FREQ_MAX;\n\t\t\t\t\tfreq = freq + FREQ_MIN;\n\t\t\t\t\tdoPrintValue3(freq);\n\t\t\t\t\t// when the action occurs the doSendSlider method is invoked\n\t\t\t\t\t// with arguments for freq and node\n\t\t\t\t\tdoSendSlider(freq, 1002);\n\t\t\t\t}\n\t\t\t}", "public void stateChanged(ChangeEvent e) {\n\t\tJSlider source = (JSlider) e.getSource();\n\t\tif (!source.getValueIsAdjusting()) {\n\t\t\tdgopval = Math.pow(10, -source.getValue() / 10.0);\n\t\t\tpvalLabel.setText(\"X = \" + source.getValue() / 10.0\n\t\t\t\t\t+ \"; p-value threshold is \"\n\t\t\t\t\t+ DREMGui_KeyInputs.doubleToSz(dgopval));\n\t\t\taddGOLabels(rootptr);\n\t\t}\n\t}", "public void stateChanged(ChangeEvent evt) {\n lowBox. setText(String. valueOf(lowSlider. getValue()));\n updateThreshold(lowSlider. getValue(), highSlider. getValue()); \n }", "public abstract void updateSlider();", "private void iSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_iSliderStateChanged\n float tmp_value = ((float)this.iSlider.getValue())/10;\n this.paramILabel.setText(\"\" + tmp_value);\n }", "@Override\n public void stateChanged(ChangeEvent _e) {\n if (_e.getSource() instanceof JSlider){\n mView.setFrequencyTxt(((JSlider) _e.getSource()).getValue());\n mComponent.getCMUpdateThread().setInterval(((JSlider) _e.getSource()).getValue());\n if (mComponent.isPlaying())\n \tmComponent.getSimulationPlayer().setInterval(((JSlider) _e.getSource()).getValue());\n }\n }", "private void ssSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_ssSliderStateChanged\n float tmp_value = ((float)this.ssSlider.getValue())/10;\n this.paramssLabel.setText(\"\" + tmp_value);\n }", "public void stateChanged(ChangeEvent e)\n {\n JSlider source = (JSlider)e.getSource();\n if (!source.getValueIsAdjusting())\n speed = source.getValue();\n if (0 < speed && speed < 2)\n speed = 2;\n }", "@Override\r\n\tprotected JSliderState getState() {\r\n\t\treturn (JSliderState) super.getState();\r\n\t}", "public void stateChanged(ChangeEvent e) {\n\n (model.getInterpol()).setBezierIterationen(((JSlider) e.getSource()).getValue());\n }", "public void stateChanged(ChangeEvent evt){player.seek(slider.getValue());}", "public void stateChanged(ChangeEvent evt) {\n highBox. setText(String. valueOf(highSlider. getValue()));\n updateThreshold(lowSlider. getValue(), highSlider. getValue());\n }", "private void pSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_pSliderStateChanged\n float tmp_value = ((float)this.pSlider.getValue())/10;\n this.paramPLabel.setText(\"\" + tmp_value);\n }", "private void dSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_dSliderStateChanged\n float tmp_value = ((float)this.dSlider.getValue())/10;\n this.paramDLabel.setText(\"\" + tmp_value);\n }", "public void stateChanged(ChangeEvent e)\n {\n simulation.setSpeed(speedSlider.getValue());\n }", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tJSlider difficultySlider = (JSlider) e.getSource();\n\t\n\t\tint newDifficulty = difficultySlider.getValue();\n\t\tmodel.getLevelTemplate().setProbConst(newDifficulty);\n\t}", "public void stateChanged(ChangeEvent e) {\r\n Object source = e.getSource();\r\n\r\n if (source instanceof JSlider) {\r\n JSlider slider = (JSlider) source;\r\n if (text != null) {\r\n text.setText(\"<html><font color=#FFFFFF>Volume: \"+slider.getValue()+\"</font></html>\");\r\n text.setLocation(getWidth()/2-text.getWidth()/2, text.getY());\r\n revalidate();\r\n repaint();\r\n }\r\n }\r\n }", "@Override\n public void stateChanged(ChangeEvent e)\n {\n if (e.getSource()==delaySlider)\n {\n// System.out.println(delaySlider.getValue());\n rightPanel.setDelayMS(delaySlider.getValue());\n }\n }", "protected void valueChanged() {\r\n \t\tint newValue = slider.getSelection();\r\n \t\tint oldValue = this.intValue;\r\n \t\tintValue = newValue;\r\n \t\tjava.beans.PropertyChangeEvent event = new java.beans.PropertyChangeEvent(\r\n \t\t\t\tthis, IPropertyEditor.VALUE, oldValue, newValue);\r\n \t\tvalueChangeListener.valueChange(event);\r\n \t}", "public void stateChanged(ChangeEvent event) {\n\t\t\t\t\t\t\t\t\tlabelFilons.setText(((JSlider)event.getSource()).getValue() + \" filons :\");\n\t\t\t\t\t\t\t\t}", "public void stateChanged(ChangeEvent evt) {\n if (evt.getSource() == bgColorSlider) {\n int bgVal = bgColorSlider.getValue();\n displayLabel.setBackground( new Color(bgVal,bgVal,bgVal) );\n // NOTE: The background color is a shade of gray,\n // determined by the setting on the slider.\n }\n else {\n float hue = fgColorSlider.getValue()/100.0f;\n displayLabel.setForeground( Color.getHSBColor(hue, 1.0f, 1.0f) );\n // Note: The foreground color ranges through all the colors\n // of the spectrum.\n }\n }", "public void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelHauteur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}", "public void stateChanged(ChangeEvent e)\n {\n slideLabel.setText(\"The speed is \" + speedSlider.getValue());\n }", "public void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelLargeur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}", "private void setSliders() {\n\n\t\tSliderListener birthThresholdSlider = new SliderListener() {\n\t\t\tpublic void execute() {\n\t\t\t\tif (isAdjusting) {\n\t\t\t\t\tsetBirthThreshold(value);\n\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tSliderListener grassGrowthRateSlider = new SliderListener() {\n\t\t\tpublic void execute() {\n\t\t\t\tif (isAdjusting) {\n\t\t\t\t\tsetGrowthRateGrass(value);\n\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Apparently, setFirstVal() doesn't work\n\t\tbirthThresholdSlider.setFirstVal(getBirthThreshold());\n\t\tgrassGrowthRateSlider.setFirstVal(getGrowthRateGrass());\n\n\t\tmodelManipulator.addSlider(\"Birth Threshold\", 0, MAX_BIRTH_THRESHOLD, 10, birthThresholdSlider);\n\t\tmodelManipulator.addSlider(\"Grass Growth Rate\", 0, MAX_GROWTH_RATE_GRASS, 25, grassGrowthRateSlider);\n\t}", "public void onSliderChanged() {\r\n\r\n // So we can get the date of where our slider is pointing\r\n int sliderValue = (int) dateSlider.getValue();\r\n System.out.println(sliderValue);\r\n\r\n // When the slider is moved, only the correct button will appear\r\n if(sliderValue == 0) {\r\n eventButton1.setVisible(true);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 6) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(true);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 12) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(true);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 18) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(true);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 25) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(true);\r\n }\r\n }", "@FXML\n\tpublic void onInstrumentSliderChanged(MouseEvent e) {\n\t\t//Grab the affected slider\n\t\tSlider sliderChanged = (Slider) e.getSource();\n\n\t\t//The envelope's array index corresponding to the slider type\n\t\tint sliderIndex = -1;\n\n\t\t//Switch conditional for the slider's fxID\n\t\t//Sets the slider index value\n\t\tswitch(sliderChanged.getId()) {\n\t\t\tcase \"attackSlider\":\n\t\t\t\tsliderIndex = Instrument.ATTACK_VALUE;\n\t\t\t\tbreak;\n\t\t\tcase \"decaySlider\":\n\t\t\t\tsliderIndex = Instrument.DECAY_VALUE;\n\t\t\t\tbreak;\n\t\t\tcase \"sustainSlider\":\n\t\t\t\tsliderIndex = Instrument.SUSTAIN_VALUE;\n\t\t\t\tbreak;\n\t\t\tcase \"releaseSlider\":\n\t\t\t\tsliderIndex = Instrument.RELEASE_VALUE;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//Grab old/new slider values\n\t\tdouble oldValue = synth.getSelectedInstrument().getEnvelopeData()[sliderIndex],\n\t\t\t\tnewValue = sliderChanged.getValue();\n\n\t\t//Add the action if the values differ and the slider index is valid\n\t\tif(oldValue != newValue && sliderIndex != -1) {\n\t\t\ttry {\n\t\t\t\t//Add the action\n\t\t\t\tactionLog.AddAction(\n\t\t\t\t\t\toldValue,\n\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\tsliderChanged,\n\t\t\t\t\t\tsliderChanged.getClass().getMethod(\"setValue\", double.class),\n\t\t\t\t\t\tthis.getClass().getMethod(\"updateEnvelope\", double.class));\n\t\t\t} catch (NoSuchMethodException | SecurityException e1) {\n\t\t\t\tSystem.out.println(\"An unexpected error has occured.\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tupdateEnvelope(0);\n\t\t}\n\t}", "@Override\n public void onSlideChanged() {\n }", "public void stateChanged(ChangeEvent e) {\n\t\tif(e.getSource().equals(minPriceSpinner)){\n\t\t\tif((Integer)minPriceSpinner.getValue() > (Integer)maxPriceSpinner.getValue()){\n\t\t\t\tmaxPriceSpinner.setValue((Integer)minPriceSpinner.getValue() + 1);\n\t\t\t}\n\t\t}\n\t\telse if(e.getSource().equals(maxPriceSpinner)){\n\t\t\tif((Integer)minPriceSpinner.getValue() > (Integer)maxPriceSpinner.getValue()){\n\t\t\t\tminPriceSpinner.setValue((Integer)maxPriceSpinner.getValue() - 1);\n\t\t\t}\n\t\t}\n\t}", "SliderListener(Sampler[] samplers,Container pane,int numSampler,char parameter){\n this.samplers = samplers;\n this.pane = pane;\n this.numSampler = numSampler;\n this.parameter = parameter; \n }", "private void ffSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_ffSliderStateChanged\n float tmp_value = ((float)this.ffSlider.getValue())/10;\n this.paramffLabel.setText(\"\" + tmp_value);\n }", "@Override\n public void onSliderClick(BaseSliderView slider) {\n }", "@Override\n public void stateChanged(ChangeEvent e) {\n if (getSliderThreadsPerScan().getValue() == 0) {\n getSliderThreadsPerScan().setValue(1);\n }\n setLabelThreadsPerScanValue(getSliderThreadsPerScan().getValue());\n }", "private void sliderChanged(int sliderID, int progress) {\n\t\tswitch (sliderID) {\n\t\tcase R.id.slider_agent:\n\t\t\tupdateAgentChangeFromSlider(progress);\n\t\t\tbreak;\n\t\tcase R.id.slider_media:\n\t\t\tupdateMediaChangeFromSlider(progress);\n\t\t\tbreak;\n\t\tcase R.id.slider_unrest:\n\t\t\tupdateUnrestChangeFromSlider(progress);\n\t\t\tbreak;\n\t\t}\n\t\n\t\t// update detail fragment UI\n\t\t((DetailFragment) getFragmentManager().findFragmentById(R.id.fragment_container_right)).updateUI();\n\t}", "public void setSlider(Slider slider) {\n\t\tthis.slider = slider;\n\t}", "@Override\r\n\t\t\tpublic void stateChanged(ChangeEvent e)\r\n\t\t\t\t{\r\n\t\t\t\tint spinMinValue = (int)spinMin.getValue();\r\n\t\t\t\tint spinMaxValue = (int)spinMax.getValue();\r\n\r\n\t\t\t\tif (spinMaxValue <= spinMinValue) { // verify if the max spin goes under the min limit and adjust the value if necessary\r\n\t\t\t\t\tif (--spinMinValue < min)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tspinMax.setValue(spinMaxValue = (spinMinValue=min)+1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tspinMin.setValue(spinMinValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (spinMaxValue > spinMinValue) // verify intervals are correct\r\n\t\t\t\t\t{\r\n\t\t\t\t\tdiceBuilder.setInterval(spinMinValue, spinMaxValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void stateChanged(ChangeEvent e)\r\n\t\t\t\t{\r\n\t\t\t\tint spinMinValue = (int)spinMin.getValue();\r\n\t\t\t\tint spinMaxValue = (int)spinMax.getValue();\r\n\r\n\t\t\t\tif (spinMinValue >= spinMaxValue) { // verify if the min spin goes upper the max limit and adjust the value if necessary\r\n\t\t\t\t\tif (++spinMaxValue > max)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tspinMin.setValue(spinMinValue = (spinMaxValue=max)-1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tspinMax.setValue(spinMaxValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (spinMaxValue > spinMinValue) // verify intervals are correct\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiceBuilder.setInterval(spinMinValue, spinMaxValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\n public void onSliderClick(SliderView sliderView) {\n }", "public void sliderChanged(int sliderIndex, String sliderName, double value) {\n\n FractalAlgorithm algorithm = simulator_.getAlgorithm();\n\n if (sliderName.equals(ITER_SLIDER)) {\n algorithm.setMaxIterations((int)value);\n }\n else if (sliderName.equals(TIMESTEP_SLIDER)) {\n simulator_.setTimeStep(value);\n }\n }", "private void sensSliderMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sensSliderMouseReleased\n this.sens = this.sensSlider.getValue();\n this.controller.setSens(this.sens);\n this.sensPercentLabel.setText(\"\"+this.sens+\"%\");\n }", "@Override\r\n public void stateChanged(ChangeEvent e) {\n gameWindow.getTickDelayLabel().setText(\"Delay: \" + gameWindow.getSlider().getValue()*10 + \" ms\");\r\n }", "@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint amount = betslider.getValue();\n\t\t\t\tbetAmount.setText(\"$\"+amount);\n\t\t\t}", "private void speedStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_speedStateChanged\n\n int speedvalue = speed.getValue();//gets the value of the speed slider from the control panel\n roboLogic.speed(speedvalue); // calls the speed method of the RobotLogic class\n\n\n }", "@FXML\n\tpublic void onVolumeSliderChanged(MouseEvent e){\n\t\t//Grab the affected slider\n\t\tSlider sliderChanged = (Slider) e.getSource();\n\n\t\t//Grab old/new slider values\n\t\tdouble oldValue = synth.getVolume(),\n\t\t\t\tnewValue = sliderChanged.getValue();\n\n\t\t//Add the action if the values differ\n\t\tif(oldValue != newValue) {\n\t\t\ttry {\n\t\t\t\t//Add the action\n\t\t\t\tactionLog.AddAction(\n\t\t\t\t\t\toldValue,\n\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\tsliderChanged,\n\t\t\t\t\t\tsliderChanged.getClass().getMethod(\"setValue\", double.class),\n\t\t\t\t\t\tthis.getClass().getMethod(\"changeVolume\", double.class));\n\t\t\t} catch (NoSuchMethodException | SecurityException e1) {\n\t\t\t\tSystem.out.println(\"An unexpected error has occured.\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tchangeVolume(newValue);\n\t\t}\n\t}", "private void syncSliderInput()\n {\n pickerSlider.valueProperty().removeListener(this::onColourSliderChange);\n pickerSlider.setStyle(\"-fx-background-color: linear-gradient(to top, #000000, \" + colourToRgb(toolColour) + \", #FFFFFF);\");\n pickerSlider.setValue(0.0);\n pickerSlider.valueProperty().addListener(this::onColourSliderChange);\n }", "void updateSliderPosition(int currentTick);", "@Override\n public void updateUI() {\n setUI(new RangeSliderUI(this));\n // Update UI for slider labels. This must be called after updating the\n // UI of the slider. Refer to JSlider.updateUI().\n updateLabelUIs();\n }", "public interface KnobValuesChangedListener {\r\n\t\tvoid onValuesChanged(boolean knobStartChanged, boolean knobEndChanged, int knobStart, int knobEnd);\r\n\t\tvoid onMoveValuePoint(int pX, int pY, int knobStartPX, int knobEndPX, boolean isMoving);\r\n void onSliderClicked();\r\n\t}", "public JComponent getSlidersPanel(){ return slidersPanel; }", "@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 slider_slices = new javax.swing.JSlider();\n jLabel2 = new javax.swing.JLabel();\n slider_width = new javax.swing.JSlider();\n jLabel3 = new javax.swing.JLabel();\n slider_height = new javax.swing.JSlider();\n jLabel4 = new javax.swing.JLabel();\n slider_depth = new javax.swing.JSlider();\n check_showBounds = new javax.swing.JCheckBox();\n slider_opacity = new javax.swing.JSlider();\n jLabel5 = new javax.swing.JLabel();\n check_showLightbuffer = new javax.swing.JCheckBox();\n check_multisample = new javax.swing.JCheckBox();\n\n jLabel1.setText(\"Slices\");\n\n slider_slices.setMaximum(700);\n slider_slices.setMinimum(1);\n slider_slices.setValue(5);\n slider_slices.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n slider_slicesStateChanged(evt);\n }\n });\n\n jLabel2.setText(\"Width\");\n\n slider_width.setMaximum(200);\n slider_width.setMinimum(20);\n slider_width.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n slider_widthStateChanged(evt);\n }\n });\n\n jLabel3.setText(\"Height\");\n\n slider_height.setMaximum(200);\n slider_height.setMinimum(20);\n slider_height.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n slider_heightStateChanged(evt);\n }\n });\n\n jLabel4.setText(\"Depth\");\n\n slider_depth.setMaximum(200);\n slider_depth.setMinimum(20);\n slider_depth.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n slider_depthStateChanged(evt);\n }\n });\n\n check_showBounds.setSelected(true);\n check_showBounds.setText(\"Show Bounds\");\n check_showBounds.setToolTipText(\"Draw box around all volume data\");\n check_showBounds.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n check_showBoundsActionPerformed(evt);\n }\n });\n\n slider_opacity.setMajorTickSpacing(1);\n slider_opacity.setMaximum(700);\n slider_opacity.setValue(5);\n slider_opacity.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n slider_opacityStateChanged(evt);\n }\n });\n\n jLabel5.setText(\"Opacity\");\n\n check_showLightbuffer.setSelected(true);\n check_showLightbuffer.setText(\"Show Lightbuffer\");\n check_showLightbuffer.setToolTipText(\"Display lighting calculations onscreen\");\n check_showLightbuffer.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n check_showLightbufferActionPerformed(evt);\n }\n });\n\n check_multisample.setText(\"Multisample\");\n check_multisample.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n check_multisampleActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel2))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(slider_depth, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(slider_width, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)\n .addComponent(slider_height, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(check_showBounds)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(check_showLightbuffer)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(check_multisample))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(slider_opacity, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)\n .addComponent(slider_slices, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(slider_width, 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.LEADING)\n .addComponent(jLabel3)\n .addComponent(slider_height, 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.LEADING)\n .addComponent(jLabel4)\n .addComponent(slider_depth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(check_showBounds)\n .addComponent(check_showLightbuffer)\n .addComponent(check_multisample))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(slider_slices, 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.LEADING)\n .addComponent(jLabel5)\n .addComponent(slider_opacity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }", "public void propertyChange(PropertyChangeEvent evt) {\n if(evt.getPropertyName().equals(\"position\")){\n// System.out.println(\"slider property change new val=\"+evt.getNewValue());\n sliderDontProcess=true;\n // note this cool semaphore/flag trick to avoid processing the\n // event generated when we programmatically set the slider position here\n playerSlider.setValue(Math.round(player.getFractionalPosition()*100));\n }else if(evt.getPropertyName().equals(\"readerStarted\")){\n log.info(\"MotionViewer.propertyChange: AEReader started, fixing device control menu\");\n // cypress reader started, can set device control for cypress usbio reader thread\n// fixDeviceControlMenuItems();\n }\n }", "private void control()\r\n\t\t{\n\t\tspinMin.addChangeListener(createMinListener());\r\n\t\tspinMax.addChangeListener(createMaxListener());\r\n\t\t}", "public void stateChanged( ChangeEvent event )\n {\n \n }", "@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\trepaint();\n\n\t\t\t\tif (e.getStateChange() == 1) {\n\t\t\t\t\traceChoosen = (String) e.getItem();\n\n\t\t\t\t\tif (raceChoosen.equals(\"Elf\")) {\n\t\t\t\t\t\tvitesseSlider.setMinimum(8);\n\t\t\t\t\t\tvitesseSlider.setMaximum(10);\n\t\t\t\t\t\tvitesseSlider.setValue(9);\n\t\t\t\t\t\tforceSlider.setMinimum(1);\n\t\t\t\t\t\tforceSlider.setMaximum(3);\n\t\t\t\t\t\tforceSlider.setValue(2);\n\t\t\t\t\t} else if (raceChoosen.equals(\"Ogre\")) {\n\t\t\t\t\t\tvitesseSlider.setMinimum(1);\n\t\t\t\t\t\tvitesseSlider.setMaximum(7);\n\t\t\t\t\t\tvitesseSlider.setValue(4);\n\t\t\t\t\t\tforceSlider.setMinimum(4);\n\t\t\t\t\t\tforceSlider.setMaximum(10);\n\t\t\t\t\t\tforceSlider.setValue(7);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvitesseSlider.setMinimum(4);\n\t\t\t\t\t\tvitesseSlider.setMaximum(10);\n\t\t\t\t\t\tvitesseSlider.setValue(7);\n\t\t\t\t\t\tforceSlider.setMinimum(1);\n\t\t\t\t\t\tforceSlider.setMaximum(7);\n\t\t\t\t\t\tforceSlider.setValue(4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "void onToggleSpeedSlider(Canvas canvas);", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tlijst = imagemodel.getLijst();\n\t\trepaint();\n\t}", "@Override\r\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tif(e.getSource() == this.progress){\r\n\t\t\tint value = this.progress.getValue();\r\n\t\t\tif(value == 0 && this.left_button >0){\r\n\t\t\t\tthis.time.stop();\r\n\t\t\t\tthis.is_over = true;\r\n\t\t\t\t//锟斤拷示锟斤拷戏锟斤拷锟斤拷\r\n\t\t\t\tObject[] options = {\"yes\",\" no \"}; \r\n\t\t\t\tint response=JOptionPane.showOptionDialog(this, \"Play again?\", \"Game over!\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\t\t\t\tif(0 == response){\r\n\t\t\t\t\tthis.init();\t\t\t\t//锟斤拷锟斤拷锟斤拷戏\r\n\t\t\t\t}else if(1 == response){\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t\tthis.init();\t\t\t\t\t//锟斤拷锟斤拷锟斤拷戏\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void stateChanged(SensorPort arg0, int arg1, int arg2) {\n\t\t\n\t}", "@Override\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\n\t}", "private void setAllSliders() {\n setSliderValue(speedSlider, speedTF, 24);\n }", "@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tepochSelected = ((Number)epochSelector.getValue()).intValue();\n\t\tupdateParticles();\n\t\tthis.repaint();\n\t}", "public void stateChanged (ChangeEvent e)\n {\n }", "public RangeSlider() {\n initSlider();\n }", "private void renderSlider(double min, double max, double value, EventHandler eventHandler) {\n unmountSlider();\n buildSlider(min, max, value);\n slider.addEventHandler(MouseEvent.MOUSE_RELEASED, eventHandler);\n mountSlider();\n }", "@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint perPersonTipPercentage=((JSlider) e.getSource()).getValue();\n\t\t\t\tfloat perPersonNewTip=(((float)perPersonTipPercentage)/100)*(Float.valueOf(TipCalcView.getInstance().totalTip.getText()).floatValue());\n\t\t\n\t\t\t\tDecimalFormat decimalFormat=new DecimalFormat(\"#.##\");\n\t\t\t\tTipTailorView.getInstance().labels[no].setText(String.valueOf(decimalFormat.format(perPersonNewTip)));\n\t\t\t\tTipCalcView.getInstance().perPersonTip.setText(\"Not Applicable\");\n\t\t\t\tTipCalcView.getInstance().perPersonTip.setEditable(false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void addEventHandlerToRangeSlider(RangeSlider rs, String parameter)\n\t{\n\t\trs.addEventHandler(MouseEvent.MOUSE_RELEASED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) \n {\n \t// Special adjustments after drag is finished.\n \tif (parameter == \"kappa\") {\n \t\trs.setLowValue(Math.round(rs.getLowValue()));\n \t\trs.setHighValue(Math.round(rs.getHighValue()));\n \t}\n \t\n \t// Update control values after slider values were changed.\n \tupdateControlValues(rs, parameter);\n \t\n \t// Re-generate parameter values.\n \tgenerateParameterValues();\n };\n });\n\t\t\n\t\t// Add listener to determine position during mouse drag.\n\t\trs.addEventHandler(MouseEvent.MOUSE_DRAGGED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) \n {\n \t// Update control values after slider values where changed.\n \tupdateControlValues(rs, parameter);\n };\n });\n\t}", "private SpeedSliderListener()\n {\n }", "public void setOnKnobValuesChangedListener (KnobValuesChangedListener l) {\r\n\t\tknobValuesChangedListener = l;\r\n\t}", "public interface OnStateChangedListener {\n\n /**\n *\n * @param state 1:下拉中;2:此处松开刷新:\n * @param scaleOfLayout 下拉出的高度与header的比\n */\n void onStateChanged(int state, float scaleOfLayout);\n\n}", "public interface OnStateChangeListener {\n void onStateChange(boolean active);\n }", "void instanceChanged();", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t}", "public void bind(final Slider slider) {\n\t\t// view for the color\n\t\tthis.addView(new ColorView() {\n\t\t\tSlider that = slider;\n\n\t\t\t@Override\n\t\t\tpublic void update(ColorController controller, Object caller) {\n\t\t\t\tif (!that.equals(caller)) {\n\t\t\t\t\tthat.setValue(controller.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t// Listener for slider changes\n\t\tslider.valueProperty().addListener(new ChangeListener<Number>() {\n\t\t\tSlider that = slider;\n public void changed(ObservableValue<? extends Number> ov,\n Number old_val, Number new_val) {\n \t\n \tDouble value = that.getValue();\n \tInteger ivalue = value.intValue();\n \tColorController.this.setValue(ivalue, that);\n }\n });\n\t\t\n\t\t\n\t\t// Update the slider to the integer value\n\t\tslider.setValue(getValue());\n\t}", "@Override\r\n public void stateChanged(ChangeEvent e) {\n }", "void currentStateChanged();", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tPicture unfiltered = copy(_original_pic);\n\n\t\tint blurFactor = _blur_slider.getValue();\n\t\tdouble brightenFactor = _brightness_slider.getValue();\n\t\tdouble saturateFactor = _saturation_slider.getValue();\n\n\t\tPicture blurredOutput = blur(unfiltered, blurFactor);\n\t\tPicture saturatedOutput = saturate(blurredOutput, saturateFactor);\n\t\tPicture brightenedOutput = brighten(saturatedOutput, brightenFactor);\n\t\tObservablePicture output = brightenedOutput.createObservable();\n\t\t_picture_view.setPicture(output);\n\t}", "private void initSlider() {\n setOrientation(HORIZONTAL);\n }", "private void updateAgentChangeFromSlider(int progress) {\n\t\tplayer.setAgentNumberChange(progress / 10);\n\n\t}", "private void initRangeSliders()\n\t{\n\t\trangeSliders.put(\"alpha\", new RangeSlider());\n\t\trangeSliders.put(\"eta\", new RangeSlider());\n\t\trangeSliders.put(\"kappa\", new RangeSlider());\n\t\t\n\t\tfor (Map.Entry<String, RangeSlider> entry : rangeSliders.entrySet()) {\n\t\t\tRangeSlider rs = entry.getValue();\n\n\t\t\trs.setMaxWidth(337);\n\t\t\trs.setPrefWidth(337);\n\t\t\trs.setMax(15);\n\t\t\trs.setMajorTickUnit(5);\n\t\t\trs.setMinorTickCount(4);\n\t\t\trs.setShowTickLabels(true);\n\t\t\trs.setShowTickMarks(true);\n\t\t\trs.setLowValue(0);\n\t\t\trs.setHighValue(25);\n\t\t\t\n\t\t\t// Get some distance between range sliders and bar charts.\n\t\t\trs.setPadding(new Insets(10, 0, 0, 1));\n\t\t\t\n\t\t\taddEventHandlerToRangeSlider(rs, entry.getKey());\n\t\t}\n\t\t\n\t\t// Set variable-specific minima and maxima.\n\t\trangeSliders.get(\"kappa\").setMin(2);\n\t\trangeSliders.get(\"kappa\").setMax(50);\n\t\trangeSliders.get(\"kappa\").setHighValue(50);\n\t\t\n\t\t// Add to respective parents.\n\t\tvBoxes.get(\"alpha\").getChildren().add(rangeSliders.get(\"alpha\"));\n\t\tvBoxes.get(\"eta\").getChildren().add(rangeSliders.get(\"eta\"));\n\t\tvBoxes.get(\"kappa\").getChildren().add(rangeSliders.get(\"kappa\"));\n\t}", "void onChanged(RulerWheel wheel, int oldValue, int newValue);", "public void stateChanged(ChangeEvent e) {\n }", "@Override\n \tpublic void roiChanged(ROIEvent evt) {\n \t\t\n \t}", "@Override\n\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\tswitch (evt.getPropertyName()) {\n\n\t\t\t\t\t// propertyName progress tells us progress value\n\t\t\t\t\tcase \"progress\":\n\t\t\t\t\t\twindow.setScalingProgressBar((Integer) evt.getNewValue());\n\t\t\t\t\t}\n\n\t\t\t\t}", "private void jSpinner1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinner1StateChanged\n // TODO add your handling code here:\n }", "@Override\n protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3)\n {\n if (this.visible)\n {\n if (this.dragging)\n {\n this.sliderValue = (par2 - (this.xPosition + 4)) / (float)(this.width - 8);\n updateSlider();\n }\n\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n\n Vector2f sliderPos = new Vector2f(\n this.xPosition + (int) (this.sliderValue * (float) (this.width - 8)),\n this.yPosition\n );\n\n Vector2f sliderSize = new Vector2f(8, this.height);\n\n // Draw slider\n Gui.drawRect((int) sliderPos.getX(), (int) sliderPos.getY(), (int) sliderPos.getX() + (int) sliderSize.x, (int) sliderPos.getY() + (int) sliderSize.getY(), Color.BLACK.getRGB());\n\n // Draw slider inner\n Gui.drawRect((int) sliderPos.getX() + 2, (int) sliderPos.getY() + 2, (int) sliderPos.getX() + (int) sliderSize.x - 2, (int) sliderPos.getY() + (int) sliderSize.getY() - 2, Color.WHITE.getRGB());\n }\n }", "public void stateChanged(ChangeEvent e) {\n\t\t\t\tplane.setSpeed(jsThrottle.getValue());\n\t\t\t}", "public void refresh(){\n\t\tint i=0;\n\t\tEntity editedEntity=getEditedEntity();\n\t\tfor(FloatTrait t:swat.dk.getTraits(tt)){\n\t\t\t((Swat.Slider)((JComponent)slidersPanel.getComponent(i)).getComponent(1)).mSetValue(toSlider(getValue(editedEntity,t)));\n\t\t\ti++;\n\t\t}\n\t}", "public void setChangeListener();", "public interface StateListener\nextends EventListener {\n\n void stateChanged(StateEvent event);\n}", "@Override // androidx.databinding.ViewDataBinding\n public boolean onFieldChange(int i, Object obj, int i2) {\n if (i != 0) {\n return false;\n }\n return onChangeSliderAction((SettingsSliderActionType) obj, i2);\n }", "public abstract void stateChanged(STATE state);", "Controls () {\n \n barX = 40;\n barWidth = 15;\n \n minY = 40;\n maxY = minY + height/3 - sliderHeight/2;\n \n minZoomValue = height - height;\n maxZoomValue = height; // 300 percent\n valuePerY = (maxZoomValue - minZoomValue) / (maxY - minY);\n \n sliderWidth = 25;\n sliderHeight = 10;\n sliderX = (barX + (barWidth/2)) - (sliderWidth/2); \n sliderValue = minZoomValue; \n sliderY = minY; \n }" ]
[ "0.74224126", "0.738917", "0.7358922", "0.7357282", "0.73538756", "0.72629625", "0.7259946", "0.7256799", "0.71868503", "0.71574605", "0.7105884", "0.7102194", "0.70654964", "0.70364696", "0.70011425", "0.6999564", "0.69806194", "0.696842", "0.69219965", "0.6836189", "0.681482", "0.6787402", "0.67833894", "0.6758959", "0.673416", "0.6717626", "0.6693385", "0.66349614", "0.66214466", "0.6615978", "0.6563008", "0.64759815", "0.64738756", "0.6462686", "0.6397955", "0.6381583", "0.6329792", "0.62985516", "0.6293819", "0.626872", "0.6201064", "0.61959016", "0.61936533", "0.6152481", "0.614525", "0.61450136", "0.613822", "0.61292493", "0.6118456", "0.6104698", "0.60990036", "0.606749", "0.6046883", "0.6033296", "0.6031475", "0.60264206", "0.6007107", "0.6001352", "0.59867", "0.5977778", "0.59490806", "0.5941362", "0.5916724", "0.5902699", "0.5900589", "0.58918995", "0.5891134", "0.5881004", "0.58607394", "0.58595556", "0.5854744", "0.5852156", "0.5852153", "0.5830249", "0.58202654", "0.5765576", "0.5756337", "0.57562083", "0.5744188", "0.5743748", "0.57286906", "0.5723891", "0.57199514", "0.5719684", "0.57175434", "0.5696853", "0.5686545", "0.56814855", "0.56795925", "0.5635855", "0.5631897", "0.56191325", "0.5618898", "0.5615712", "0.56144667", "0.5608877", "0.5599055", "0.5598342", "0.55835384", "0.55809295" ]
0.60534406
52
/ method that generates the grid of values, either randomly or derived from the previous board following the rules of the game
public static int [][] generateValues (int sources) { Random rand = new Random(); int [][] tempGridValues = new int[gridSize.getValue()][gridSize.getValue()]; //holds new values temporarily //random 2D array of either ones and zeros if (sources == -1) { for (int i = 0; i < gridSize.getValue(); i++ ) { for (int j = 0; j < gridSize.getValue(); j++) { gridValues[i][j] = rand.nextInt(2); } } return gridValues; } //assigns new grid values based on game rules else { for (int i = 0; i < gridSize.getValue(); i++ ) { for (int j = 0; j < gridSize.getValue(); j++) { int alivePoints = checkAlive(i, j); if (gridValues[i][j] == 0 && alivePoints == 3) { tempGridValues[i][j] = 1; } else if (gridValues[i][j] == 1 && (alivePoints < 2 ||alivePoints > 3)) { tempGridValues[i][j] = 0; } else { tempGridValues[i][j] = gridValues[i][j]; } } } gridValues = tempGridValues; return gridValues; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "private void generateBoard(){\n\t}", "public void initGrid()\n {\n\tfor (int y=0; y<cases.length; y++)\n \t{\n for (int x=0; x<cases[y].length; x++)\n {\n\t\tcases[y][x] = new Case();\n }\n\t}\n\t\n\tint pos_y_case1 = customRandom(4);\n\tint pos_x_case1 = customRandom(4);\n\t\n\tint pos_y_case2 = customRandom(4);\n\tint pos_x_case2 = customRandom(4);\n\t\t\n\twhile ((pos_y_case1 == pos_y_case2) && (pos_x_case1 == pos_x_case2))\n\t{\n pos_y_case2 = customRandom(4);\n pos_x_case2 = customRandom(4);\n\t}\n\t\t\n\tcases[pos_y_case1][pos_x_case1] = new Case(true);\n\tcases[pos_y_case2][pos_x_case2] = new Case(true);\n }", "public void createGrid() {\r\n generator.generate();\r\n }", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "public void genNewGame() {\n Random rand = new Random();\n int num = 0;\n\n int[] row = new int[9];\n\n for (int i = 0; i < 9; i++) {\n while (isInRow(row, num)) {\n num = rand.nextInt(9) + 1;\n }\n row[i] = num;\n }\n\n setRow(board, row, 0);\n shiftRow(row, 3);\n setRow(board, row, 1);\n shiftRow(row, 3);\n setRow(board, row, 2);\n\n shiftRow(row, 1);\n setRow(board, row, 3);\n shiftRow(row, 3);\n setRow(board, row, 4);\n shiftRow(row, 3);\n setRow(board, row, 5);\n\n shiftRow(row, 1);\n setRow(board, row, 6);\n shiftRow(row, 3);\n setRow(board, row, 7);\n shiftRow(row, 3);\n setRow(board, row, 8);\n\n }", "public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}", "private void generateBoardLayout() {\n Collections.shuffle(availableDice);\n List<GameCube> row1 = Arrays.asList(availableDice.get(0), availableDice.get(1), availableDice.get(2), availableDice.get(3));\n List<GameCube> row2 = Arrays.asList(availableDice.get(4), availableDice.get(5), availableDice.get(6), availableDice.get(7));\n List<GameCube> row3 = Arrays.asList(availableDice.get(8), availableDice.get(9), availableDice.get(10), availableDice.get(11));\n List<GameCube> row4 = Arrays.asList(availableDice.get(12), availableDice.get(13), availableDice.get(14), availableDice.get(15));\n board = new ArrayList<>();\n board.add(0, row1);\n board.add(1, row2);\n board.add(2, row3);\n board.add(3, row4);\n }", "public RandomGrid() {\n random = new Random(System.currentTimeMillis());\n /*\n indexes = new LinkedList<>();\n for (int i = 0; i < 81; i++) {\n indexes.add(i);\n }\n numbers = new ArrayList<>(9);\n for (int i = 1; i <= 9; i++) {\n numbers.add(i);\n }\n Collections.shuffle(indexes, random);\n */\n grid = new int[9][9];\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n grid[i][j] = 0;\n }\n }\n subGrid = new SubGrid[3][3];\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n subGrid[i][j] = new SubGrid();\n }\n }\n }", "void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "public void generateGame() {\n clearGame();\n\n //generate new game\n SudokuGenerator generator = new FullGenerator();\n generator.generateSudoku(this);\n\n //set start locations\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < size; j++) {\n int value = board.getSquareValue(i, j);\n if (value != 0) { // startlocation\n startLocations.add(new int[] {i, j});\n }\n }\n }\n }", "private GamePiece[][] initBoard(int rows, int cols, Random rand) {\n gameBoard = new GamePiece[rows][cols];\n curPlayerRow = 0;\n curPlayerCol = 0;\n for(int i = 0; i < rows; i++){\n for(int j = 0; j < cols; j++){\n gameBoard[i][j] = new EmptyPiece();\n }\n }\n gameBoard[0][0] = new PlayerPiece(INIT_PLAYER_POINTS);\n curTrollRow = getRandTrollRow(rand, rows);\n curTrollCol = getRandTrollCol(rand, cols);\n while(curTrollRow == 7 && curTrollCol == 9){\n curTrollRow = getRandTrollRow(rand, rows);\n curTrollCol = getRandTrollCol(rand, cols);\n }\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n gameBoard[7][9] = new TreasurePiece(TREASURE_POINTS);\n return gameBoard;\n }", "public void generaBuits() {\r\n\r\n //FIX PARA EL OUT OF BOUNDS DE la columna 9 \r\n //int cellId = randomGenerator(N*N) - 1;\r\n //QUITAR \r\n //if (j != 0)\r\n //j = j - 1;\r\n int count = K;\r\n while (count != 0) {\r\n int cellId = generadorAleatoris(N * N) - 1;\r\n\r\n //System.out.println(cellId); \r\n // extract coordinates i and j \r\n int i = (cellId / N);\r\n int j = cellId % 9;\r\n\r\n // System.out.println(i+\" \"+j); \r\n if (mat[i][j] != 0) {\r\n count--;\r\n mat[i][j] = 0;\r\n }\r\n }\r\n }", "public Grid generateGrid(){\n myGrid = new RectGrid();\n myStates = new HashMap<>();\n\n for(int row = 0; row < imageHeight; row++){\n for(int column = 0; column < imageWidth; column++){\n int color = myImage.getRGB(column, row);\n int blue = color & 0xff;\n int green = (color & 0xff00) >> 8;\n int red = (color & 0xff0000) >> 16;\n\n int stateValue = color*-1;\n System.out.println(stateValue);\n //int stateValue = Integer.parseInt(hex, 16);\n //System.out.println(stateValue);\n\n Cell myCell = new RPSCell();\n myCell.setState(stateValue);\n myGrid.placeCell(row, column, myCell);\n\n Color myColor = Color.rgb(red, green, blue);\n myStates.put(stateValue, myColor);\n }\n }\n return myGrid;\n }", "public void step()\n { \n //Remember, you need to access both row and column to specify a spot in the array\n //The scalar refers to how big the value could be\n //int someRandom = (int) (Math.random() * scalar)\n //remember that you need to watch for the edges of the array\n\t int randomRow = (int)(Math.random() * grid.length - 1);\n\t int randomCol = (int)(Math.random() * grid[0].length - 1);\n\t int randomDirection = (int)(Math.random() * 3);\n\t int randomDirectionFire = (int)(Math.random() * 4);\n\t int randomSpread = (int)(Math.random() * 100);\n\t int randomTelRow = (int)(Math.random() * grid.length);\n\t int randomTelCol = (int)(Math.random() * grid[0].length);\n\t \n\t //Sand\n\t if(grid[randomRow][randomCol] == SAND && (grid[randomRow + 1][randomCol] == EMPTY || grid[randomRow + 1][randomCol] == WATER))\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\n\t }\n\t //Water\n\t if(grid[randomRow][randomCol] == WATER && randomCol - 1 >= 0)\n\t {\n\t\t if(randomDirection == 1 && grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t //Helium\n\t if(grid[randomRow][randomCol] == HELIUM && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow - 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else if(randomDirection == 1 && grid[randomRow - 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Bounce\n\t if(grid[randomRow][randomCol] == BOUNCE)\n\t { \t\n\t\t if(randomRow + 1 >= grid[0].length - 1 || randomRow + 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = true;\n\t\t }\n\t\t else if(randomRow - 1 < 0 || randomRow - 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = false;\n\t\t }\n\t\t \n\t\t if(hitEdge[randomCol] == true)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Virus\n\t if(grid[randomRow][randomCol] == VIRUS && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t \n\t\t\t int temp = grid[randomRow + 1][randomCol];\n\t\t\t //VIRUS takeover\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = VIRUS;\n\t\t\t }\n\t\t\t //TEMP takeover\n\t\t\t grid[randomRow][randomCol] = temp;\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = temp;\n\t\t\t }\n\t }\n\t \n\t //Fire\n\t if(grid[randomRow][randomCol] == FIRE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t { \n\t\t if(randomDirectionFire == 1)\n\t\t {\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol - 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 3)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol + 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t \n\t\t //Fire Eats Vine\n\t\t if(grid[randomRow - 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = FIRE;\n\t\t }\n\t\t \n\t\t //Fire Blows Up Helium\n\t\t if(grid[randomRow - 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t //Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t }\n\t \n\t //Vine\n\t if(grid[randomRow][randomCol] == VINE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t { \n\t\t\t if(randomSpread == 1)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t }\n\t\t }\n\t\t else if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t if(randomSpread >= 90)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t\t grid[randomRow][randomCol + 1] = VINE;\n\t\t\t\t grid[randomRow][randomCol - 1] = VINE;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //Teleport\n\t if(grid[randomRow][randomCol] == TELEPORT && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t grid[randomTelRow][randomTelCol] = TELEPORT;\n\t\t grid[randomRow][randomCol] = EMPTY;\n\t }\n\t \n\t //Laser\n\t if(grid[randomRow][randomCol] == LASER && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(randomDirectionLaser == 1 && randomRow - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = LASER;\n\t\t\t grid[randomRow - 4][randomCol] = EMPTY;\n\t\t\t if(randomRow + 1 == grid.length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = LASER;\n\t\t\t grid[randomRow + 4][randomCol] = EMPTY;\n\t\t\t if(randomRow - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 3 && randomCol - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = LASER;\n\t\t\t grid[randomRow][randomCol - 4] = EMPTY;\n\t\t\t if(randomCol + 1 == grid[0].length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = LASER;\n\t\t\t grid[randomRow][randomCol + 4] = EMPTY;\n\t\t\t if(randomCol - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t }\n }", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "public void generateCells() {\n\t\tfor(int x = 0; x < width; x++) {\n\t\t\tfor(int y = 0; y < height; y++) {\n\t\t\t\tboolean alive;\n\t\t\t\tif(livingYSpaceTop > y || height - livingYSpaceBottom < y || livingXSpaceLeft > x || width - livingXSpaceRight < x) {\n\t\t\t\t\talive = true;\n\t\t\t\t}\n\t\t\t\telse if(deadYSpaceTop > y || height - deadYSpaceBottom < y || deadXSpaceLeft > x || width - deadXSpaceRight < x) {\n\t\t\t\t\talive = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\talive = UpWardUtils.randomFloat() < chanceToStartAlive;\n\t\t\t\t}\n\t\t\t\tcellMatrix[x][y] = alive ? 1 : 0;\n\t\t\t}\n\t\t}\n\t}", "public MazeRoom[][] generate() {\n\t\tgenerate(theGrid[0][0]);\n\t\treturn theGrid;\n\t}", "public void next(){\n\t\tboolean[][] newBoard = new boolean[rows][columns]; //create a temporary board, same size as real game board\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tnewBoard[i][j] = false; //set all to false\n\t\t\t}\n\t\t}\n\t\tint cellCounter = 0;\n\t\tfor (int i = (rows - 1); i >= 0; i--) {\n\t\t\tfor (int j = (columns - 1); j >= 0; j--) { //iterate through the game board\n\t\t\t\tfor (int k = (i - 1); k < (i + 2); k++) {\n\t\t\t\t\tfor (int m = (j - 1); m < (j + 2); m++) {//iterate around the testable element\n\t\t\t\t\t\tif (!(k == i && m == j)) {\n\t\t\t\t\t\t\tif (!((k < 0 || k > (rows - 1)) || (m < 0 || m > (columns - 1)))) { //if not out of bounds and not the original point\n\t\t\t\t\t\t\t\tif (theGrid[k][m]) {\n\t\t\t\t\t\t\t\t\tcellCounter++; //if a cell is alive at the surrounding point, increase the counter\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (cellCounter == 3 || cellCounter == 2 && theGrid[i][j]) { //if meets the criteria\n\t\t\t\t\tnewBoard[i][j] = true; //create on new board\n\t\t\t\t}\n\t\t\t\tcellCounter = 0; //reset cell counter\n\t\t\t}\n\t\t}\n\t\t//transpose onto new grid\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tif(newBoard[i][j]){ //read temp board, set temp board data on real game board\n\t\t\t\t\ttheGrid[i][j] = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttheGrid[i][j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public BuildGrid()\n {\n System.out.print(\"Creating a new grid: \");\n\n m_grid = new double[1][5];\n setDimX(1);\n setDimY(5);\n\n this.fillWith(0);\n System.out.println(\"Done\");\n }", "private void generateRows() {\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\trows[i]=new Row(squares[i]);\n\t\t}\n\t}", "public void genField() {\n\t\tint mines = (int)(height * width * .1);\r\n\t\tRandom random = new Random();\r\n\t\tint x;\r\n\t\tint y;\r\n\t\tint i = 0;\r\n\t\twhile(i < mines) {\r\n\t\t\tx = random.nextInt(width);\r\n\t\t\ty = random.nextInt(height);\r\n\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\tcells.get(x).get(y).setValue(-1);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(x = 0; x < width; x++) {\r\n\t\t\tfor(y = 0; y < height; y++) {\r\n\t\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\t\tprocessCell(x, y); //generate cell number\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private Level produce() {\n\t\tint[][]grid = new int[row][column];\n\t\tArrayList<Point> goals = new ArrayList<Point>();\n\t\tint newRand = 0;\n\t\tfor (int x = 0; x < row; x++)\t{\n\t\t\tfor (int y = 0; y < column; y++)\t{\n\t\t\t\tnewRand = rand.nextInt(TOTAL);\n\t\t\t\tif (newRand < CAT_1)\t{\n\t\t\t\t\tgrid[x][y] = 1;\n\t\t\t\t} else if (newRand < CAT_2)\t{\n\t\t\t\t\tgrid[x][y] = 2;\n\t\t\t\t} else if (newRand < CAT_3)\t{\n\t\t\t\t\tgrid[x][y] = 3;\n\t\t\t\t} else if (newRand < CAT_4)\t{\n\t\t\t\t\tgrid[x][y] = 4;\n\t\t\t\t} else if (newRand < CAT_5)\t{\n\t\t\t\t\tgoals.add(new Point(x,y));\n\t\t\t\t} else if (newRand < TOTAL)\t{\n\t\t\t\t\tgrid[x][y] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Level(grid, row, column, goals);\n\t}", "private void createValley(Square[][]Squares, int rows, int columns, int grid)\n {\n // a center point for the valley is randomized in relation to the number of rows or columns, whichever is smaller,\n // so the whole valley will fit inside the grid\n\n int seedRowRand = (int)(Math.random() * rows);\n int seedColRand = (int)(Math.random() * columns);\n int swellRandMax = 0;\n int swellRand = 0;\n int swellRand2 = 0;\n \n // define max swelling for the valley\n if (columns > rows)\n {\n swellRandMax = rows/10+1;\n }\n else\n {\n swellRandMax = columns/10+1;\n }\n \n // if the first randomed vertical valley seedlocation is too close to the borders, it is randomed again\n if (seedRowRand <= swellRandMax || seedRowRand >= rows-swellRandMax)\n {\n for (;seedRowRand <= swellRandMax || seedRowRand >= rows-swellRandMax;)\n {\n seedRowRand = (int)(Math.random()*rows);\n } \n }\n \n // if the first randomed horizontal valley seedlocation is too close to the borders, it is randomed again\n if (seedColRand <= swellRandMax || seedColRand >= columns-swellRandMax)\n {\n for(;seedColRand <= swellRandMax || seedColRand >= columns-swellRandMax;)\n {\n seedColRand = (int)(Math.random()*rows);\n }\n }\n\n // the seed is placed\n Squares[seedRowRand][seedColRand].setTerrain(0);\n\n int scRand;\n\n // make the valley around the seed\n\n // the first for-loop is for making three differently shaped rectangles \n // on top of the seed out of plains tiles to create a valley\n for(int a = 0;a<3;a++)\n {\n // the second for-loop is to place 500 plains randomly inside each rectangle, creating a valley\n for(int b = 0;b<500;b++)\n {\n // create a vertical rectangle\n if(a==0)\n {\n swellRand = (int) ((Math.random() * Math.sqrt(grid))/6)+1;\n swellRand2 = (int) ((Math.random() * Math.sqrt(grid))/12)+1;\n }\n\n //create a vertical rectangle\n if (a==1)\n {\n swellRand = (int) ((Math.random() * Math.sqrt(grid))/12)+1;\n swellRand2 = (int) ((Math.random() * Math.sqrt(grid))/6)+1;\n }\n\n // create a square\n if (a==2)\n {\n swellRand = (int) ((Math.random() * Math.sqrt(grid))/8)+1;\n swellRand2 = (int) ((Math.random() * Math.sqrt(grid))/8)+1;\n }\n \n // random the placement for each plains tile\n scRand = (int) (Math.random() * 8) + 1;\n\n switch (scRand)\n {\n case 1:\n if(seedRowRand+swellRand < rows && seedColRand+swellRand2 <columns)\n Squares[seedRowRand+swellRand][seedColRand+swellRand2].setTerrain(0);\n\n case 2:\n if(seedRowRand-swellRand >=0 && seedColRand-swellRand2 >=0)\n Squares[seedRowRand-swellRand][seedColRand-swellRand2].setTerrain(0);\n\n case 3: \n if(seedRowRand+swellRand<rows && seedColRand-swellRand2 >=0)\n Squares[seedRowRand+swellRand][seedColRand-swellRand2].setTerrain(0);\n\n case 4:\n if(seedRowRand-swellRand >= 0 && seedColRand+swellRand2 <columns)\n Squares[seedRowRand-swellRand][seedColRand+swellRand2].setTerrain(0);\n\n case 5:\n if(seedRowRand < rows && seedRowRand >= 0 && seedColRand+swellRand<columns)\n Squares[seedRowRand][seedColRand+swellRand].setTerrain(0);\n\n case 6:\n if(seedRowRand < rows && seedRowRand >= 0 && seedColRand-swellRand >= 0)\n Squares[seedRowRand][seedColRand-swellRand].setTerrain(0);\n\n case 7:\n if(seedRowRand+swellRand < rows && seedColRand < columns && seedColRand >= 0)\n Squares[seedRowRand+swellRand][seedColRand].setTerrain(0);\n\n case 8:\n if(seedRowRand-swellRand >= 0 && seedColRand < columns && seedColRand >= 0)\n Squares[seedRowRand-swellRand][seedColRand].setTerrain(0);\n }\n }\n } \n }", "public void randomInit() {\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n for (int i = 1; i < grid.length - 1; i++) {\n for (int j = 1; j < grid[i].length - 1; j++) {\n int randomNum = (int) (Math.random() * 5);\n switch (randomNum) {\n case 0:\n grid[i][j] = new Badger(plain, i, j, 0);\n break;\n case 1:\n grid[i][j] = new Empty(plain, i, j);\n break;\n case 2:\n grid[i][j] = new Fox(plain, i, j, 0);\n break;\n case 3:\n grid[i][j] = new Grass(plain, i, j);\n break;\n case 4:\n grid[i][j] = new Rabbit(plain, i, j, 0);\n break;\n }\n }\n }\n }", "public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "private int[] generate(int[] cells) {\n // Placeholder\n int[] newCells = new int[cells.length];\n\n // Boundary-elements, simply ignoring them..\n for (int x = 1; x < cells.length - 1; x++) {\n\n // Neighborhood\n int left = cells[x - 1];\n int mid = cells[x];\n int right = cells[x + 1];\n\n int newState = next(left, mid, right);\n\n newCells[x] = newState;\n }\n\n return newCells;\n }", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private int[][] makeBoard() {\r\n int[][] gridBoard = new int[gridSize][gridSize];\r\n int remainingPlacedBombs = numBombs;\r\n \r\n for (int i = 0; i < gridBoard.length; i++) {\r\n for (int j = 0; j < gridBoard[i].length; j++) {\r\n gridBoard[i][j] = 0;\r\n }\r\n } \r\n while (remainingPlacedBombs > 0) {\r\n int row = (int) (Math.random() * gridSize);\r\n int col = (int) (Math.random() * gridSize);\r\n if (gridBoard[row][col] == 0) {\r\n gridBoard[row][col] = 1;\r\n remainingPlacedBombs--;\r\n } \r\n } \r\n return gridBoard;\r\n }", "private void generateMap(){\n int[] blockStepX = {X_STEP, 0, -X_STEP, -X_STEP, 0, X_STEP};\n int[] blockStepY = {Y_STEP_ONE, Y_STEP_TWO, Y_STEP_ONE, -Y_STEP_ONE, -Y_STEP_TWO, -Y_STEP_ONE};\n int blockSpecialValue = 0;\n int cellSpecial = 0;\n\n mapCells[origin.x/10][origin.y/10] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n cellGrid[0][0][0] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n for (int distanceFromOrigin = 0; distanceFromOrigin < config.getSizeOfMap();\n distanceFromOrigin++){\n\n int[] blockXVals = {origin.x,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x,\n origin.x - X_STEP * distanceFromOrigin,\n origin.x - X_STEP * distanceFromOrigin};\n\n int[] blockYVals = {origin.y - Y_STEP_TWO * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_TWO * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin};\n\n blockSpecialValue = getRandomNumber(distanceFromOrigin, 0, 0);\n\n for (int block = 0; block < NUMBER_OF_BLOCKS; block ++){\n\n int blockXOrdinal = blockXVals[block];\n int blockYOrdinal = blockYVals[block];\n\n for (int blockSize = 0; blockSize < distanceFromOrigin; blockSize++){\n if(blockSpecialValue == blockSize){\n cellSpecial = getRandomNumber(2, 1, 1);\n }else {\n cellSpecial = 0;\n }\n cellGrid [distanceFromOrigin][block+1][blockSize+1] = makeNewCell(\n new CellPosition(distanceFromOrigin,block+1, blockSize+1),\n new Point(blockXOrdinal + blockStepX[block] * (blockSize + 1),\n blockYOrdinal + blockStepY[block] * (blockSize + 1)), cellSpecial);\n }\n }\n }\n }", "public void generate() {\n\t\tint randNum;\n\n\t\t// Generates variables.\n\t\tfor (int i = 0; i < variables.length; i++) {\n\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\twhile (!checkDuplicate(variables, i, randNum)) {\n\t\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\t}\n\t\t\tvariables[i] = randNum;\n\t\t}\n\n\t\t// Example sudoku.\n\t\trandNum = rand.nextInt(3) + 1;\n\t\tswitch (randNum) {\n\t\tcase 1:\n\t\t\tint[][] array1 = { { 4, 7, 1, 3, 2, 8, 5, 9, 6 },\n\t\t\t\t\t{ 6, 3, 9, 5, 1, 4, 7, 8, 2 },\n\t\t\t\t\t{ 5, 2, 8, 6, 7, 9, 1, 3, 4 },\n\t\t\t\t\t{ 1, 4, 2, 9, 6, 7, 3, 5, 8 },\n\t\t\t\t\t{ 8, 9, 7, 2, 5, 3, 4, 6, 1 },\n\t\t\t\t\t{ 3, 6, 5, 4, 8, 1, 2, 7, 9 },\n\t\t\t\t\t{ 9, 5, 6, 1, 3, 2, 8, 4, 7 },\n\t\t\t\t\t{ 2, 8, 4, 7, 9, 5, 6, 1, 3 },\n\t\t\t\t\t{ 7, 1, 3, 8, 4, 6, 9, 2, 5 } };\n\t\t\tcopy(array1, answer); // Copies example to answer.\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tint[][] array2 = { { 8, 3, 5, 4, 1, 6, 9, 2, 7 },\n\t\t\t\t\t{ 2, 9, 6, 8, 5, 7, 4, 3, 1 },\n\t\t\t\t\t{ 4, 1, 7, 2, 9, 3, 6, 5, 8 },\n\t\t\t\t\t{ 5, 6, 9, 1, 3, 4, 7, 8, 2 },\n\t\t\t\t\t{ 1, 2, 3, 6, 7, 8, 5, 4, 9 },\n\t\t\t\t\t{ 7, 4, 8, 5, 2, 9, 1, 6, 3 },\n\t\t\t\t\t{ 6, 5, 2, 7, 8, 1, 3, 9, 4 },\n\t\t\t\t\t{ 9, 8, 1, 3, 4, 5, 2, 7, 6 },\n\t\t\t\t\t{ 3, 7, 4, 9, 6, 2, 8, 1, 5 } };\n\t\t\tcopy(array2, answer);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tint[][] array3 = { { 5, 3, 4, 6, 7, 8, 9, 1, 2 },\n\t\t\t\t\t{ 6, 7, 2, 1, 9, 5, 3, 4, 8 },\n\t\t\t\t\t{ 1, 9, 8, 3, 4, 2, 5, 6, 7 },\n\t\t\t\t\t{ 8, 5, 9, 7, 6, 1, 4, 2, 3 },\n\t\t\t\t\t{ 4, 2, 6, 8, 5, 3, 7, 9, 1 },\n\t\t\t\t\t{ 7, 1, 3, 9, 2, 4, 8, 5, 6 },\n\t\t\t\t\t{ 9, 6, 1, 5, 3, 7, 2, 8, 4 },\n\t\t\t\t\t{ 2, 8, 7, 4, 1, 9, 6, 3, 5 },\n\t\t\t\t\t{ 3, 4, 5, 2, 8, 6, 1, 7, 9 } };\n\t\t\tcopy(array3, answer);\n\t\t\tbreak;\n\t\t}\n\n\t\treplace(answer); // Randomize once more.\n\t\tcopy(answer, problem); // Copies answer to problem.\n\t\tgenProb(); // Generates problem.\n\n\t\tshuffle();\n\t\tcopy(problem, player); // Copies problem to player.\n\n\t\t// Checking for shuffled problem\n\t\tcopy(problem, comp);\n\n\t\tif (!solve(0, 0, 0, comp)) {\n\t\t\tgenerate();\n\t\t}\n\t\tif (!unique()) {\n\t\t\tgenerate();\n\t\t}\n\t}", "@Override\n public void createBoard(int width, int height, int numMines) {\n // Clamp the dimensions and mine numbers\n dims = new Point(Util.clamp(width, MIN_DIM_X, MAX_DIM_X),\n Util.clamp(height, MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Step 1\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n List<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), false));\n }\n cells.add(oneRow);\n }\n\n // Step 2\n int minesPlaced = 0;\n while (minesPlaced < this.numMines) {\n int randX = ThreadLocalRandom.current().nextInt((int) dims.getX());\n int randY = ThreadLocalRandom.current().nextInt((int) dims.getY());\n\n if (!cells.get(randY).get(randX).isMine()) {\n cells.get(randY).get(randX).setNumber(-1);\n minesPlaced++;\n }\n }\n\n // Step 3\n updateCellNumbers();\n }", "public void randomize() {\n // randomize the position/number of alive and dead cells by looping through each cell\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n // get a random number(between 0 and 1)\n double randomNum = Math.random();\n // cell is live if the random number is greater than 0.7\n // (0.7 gives a greater chance of a dead cell so that the grid isn't too full)\n if (randomNum > 0.7) {\n game.grid[i][j] = true;\n } else {\n game.grid[i][j] = false;\n }\n }\n }\n // repaint so that the cells show up regardless of if the program has started or not\n repaint();\n }", "public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }", "private void generateCombination() {\r\n\r\n\t\tfor (byte x = 0; x < field.length; x++) {\r\n\t\t\tfor (byte y = 0; y < field[x].length; y++) {\r\n\t\t\t\tfield[x][y].setValue((byte) newFigure(Constants.getRandom()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private Board create5by5Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 5);\n Tile t2 = new Tile(1, 5);\n Tile t3 = new Tile(2, 5);\n Tile t4 = new Tile(3, 5);\n Tile t5 = new Tile(4, 5);\n Tile t6 = new Tile(5, 5);\n Tile t7 = new Tile(6, 5);\n Tile t8 = new Tile(7, 5);\n Tile t9 = new Tile(8, 5);\n Tile t10 = new Tile(9, 5);\n Tile t11 = new Tile(10, 5);\n Tile t12 = new Tile(11, 5);\n Tile t13 = new Tile(12, 5);\n Tile t14 = new Tile(13, 5);\n Tile t15 = new Tile(14, 5);\n Tile t16 = new Tile(15, 5);\n Tile t17 = new Tile(16, 5);\n Tile t18 = new Tile(17, 5);\n Tile t19 = new Tile(18, 5);\n Tile t20 = new Tile(19, 5);\n Tile t21 = new Tile(20, 5);\n Tile t22 = new Tile(21, 5);\n Tile t23 = new Tile(22, 5);\n Tile t24 = new Tile(23, 5);\n Tile t25 = new Tile(24, 5);\n tiles = new Tile[5][5];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[0][3] = t5;\n tiles[0][4] = t9;\n tiles[1][0] = t3;\n tiles[1][1] = t1;\n tiles[1][2] = t8;\n tiles[1][3] = t4;\n tiles[1][4] = t11;\n tiles[2][0] = t17;\n tiles[2][1] = t18;\n tiles[2][2] = t10;\n tiles[2][3] = t25;\n tiles[2][4] = t20;\n tiles[3][0] = t23;\n tiles[3][1] = t21;\n tiles[3][2] = t12;\n tiles[3][3] = t15;\n tiles[3][4] = t13;\n tiles[4][0] = t22;\n tiles[4][1] = t24;\n tiles[4][2] = t14;\n tiles[4][3] = t16;\n tiles[4][4] = t19;\n return new Board(tiles);\n }", "public Board() {\n tiles = new int[3][3];\n int[] values = genValues(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 0});\n\n int offset;\n for (int i = 0; i < 3; i++) {\n offset = 2 * i;\n tiles[i] = Arrays.copyOfRange(values, i + offset, i + offset + 3);\n }\n }", "public static int[][] firstGeneration(){\n int R = 10, C = 10;\n\n // Intiliazing the grid.\n int[][] grid = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }\n };\n\n // Displaying the grid\n System.out.println(\"Original Generation\");\n for (int i = 0; i < R; i++)\n {\n for (int j = 0; j < C; j++)\n {\n if (grid[i][j] == 0)\n System.out.print(\".\");\n else\n System.out.print(\"*\");\n }\n System.out.println();\n }\n System.out.println();\n return grid;\n }", "private void generateConfig() \n {\n Random randomSpin = new Random();\n //System.out.println(\"Generated lattice looks like this:\");\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < m; j++) {\n if (randomSpin.nextDouble() < 0.5) {\n lattice[i][j] = -1; \n } else {\n lattice[i][j] = 1;\n }\n // System.out.printf(\"%d \", lattice[i][j]);\n }\n // System.out.println();\n\n }\n }", "private void initMatrix() {\n\t\ttry {\n\t\t\tRandom random = new Random();\n\t\t\tfor (int row=0; row<_numRows; ++row) {\n\t\t\t\tfor (int column=0; column<_numColumns; ++column) {\n\t\t\t\t\t// generate alive cells, with CHANCE_OF_ALIVE chance\n\t\t\t\t\tboolean value = (random.nextInt(100) < CHANCE_OF_ALIVE);\n\t\t\t\t\t_matrix.setCellValue(row, column, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// This is not supposed to happend because we use only legal row and column numbers\n\t\t}\n\t}", "public boolean fillGrid(int[][] grid) {\n Integer[] intArray = {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\n //Find unfilled cell and fill it.\n for (int i = 0; i < 81; i++) {\n int row = i / 9;\n int col = i % 9;\n if (grid[row][col] == 0) {\n\n //Shuffle collection\n List<Integer> intList = Arrays.asList(intArray);\n Collections.shuffle(intList);\n Integer[] numbers = intList.toArray(intArray);\n for (int j = 0; j < numbers.length; j++) {\n\n //Test Row to see if it contains the value\n if (!Arrays.asList(grid[row][0], grid[row][1], grid[row][2], \n \t\tgrid[row][3], grid[row][4], grid[row][5], grid[row][6], \n \t\tgrid[row][7], grid[row][8]).contains(numbers[j])) {\n\n //Test Column to see if it contains the value\n if (!Arrays.asList(grid[0][col],grid[1][col],grid[2][col],\n \t\tgrid[3][col],grid[4][col],grid[5][col],grid[6][col],\n \t\tgrid[7][col],grid[8][col]).contains(numbers[j])) {\n\n //Test squares to see if they contain value\n int[] testsquare;\n if (row < 3) {\n if (col < 3) {\n testsquare = testSection(grid, 3, 3, 0, 0);\n } else if (col < 6){\n testsquare = testSection(grid, 3, 6, 0, 3);\n } else {\n testsquare = testSection(grid, 3, 9, 0, 6);\n }\n } else if (row < 6){\n if (col < 3) {\n testsquare = testSection(grid, 6, 3, 3, 0);\n } else if (col < 6) {\n testsquare = testSection(grid, 6, 6, 3, 3);\n } else {\n testsquare = testSection(grid, 6, 9, 3, 6);\n }\n } else {\n if (col < 3) {\n testsquare = testSection(grid, 9, 3, 6, 0);\n } else if (col < 6) {\n testsquare = testSection(grid, 9, 6, 6, 3);\n } else {\n testsquare = testSection(grid, 9, 9, 6, 6);\n }\n }\n if (!Arrays.asList(testsquare[0], testsquare[1], testsquare[2], testsquare[3], testsquare[4],\n testsquare[5], testsquare[6], testsquare[7], testsquare[8]).contains(numbers[j])) {\n grid[row][col] = numbers[j];\n if (isFull(grid))\n return true;\n else if (fillGrid(grid))\n break;\n }\n }\n }\n }\n break;\n }\n }\n return false;\n }", "private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }", "public List<int[][]> evaluate(IBoard board){\n\n int area = board.getHeight() * board.getWidth();\n\n int[][] newArray = new int[area][2];\n\n int k = 0;\n\n while (k < newArray.length) {\n for (int i = 0; i < board.getHeight(); i++) {\n for (int j = 0; j < board.getWidth(); j++) {\n newArray[k][0] = i;\n newArray[k][1] = j;\n k++;\n }\n }\n }\n\n List<int[][]> Allmoves = new ArrayList<>();\n\n int res = newArray.length / board.getHeight();\n\n /*For rows*/\n int q = 0;\n int w = res;\n\n for (int i = 0; i < res; i++) {\n int[][] arr = new int[res][2];\n\n int e = 0;\n\n for (int j = q; j < w; j++) {\n arr[e][0] = newArray[j][0];\n arr[e][1] = newArray[j][1];\n e++;\n }\n\n w += res;\n q += res;\n\n Allmoves.add(arr);\n\n }\n\n /*For columns*/\n int r = 0;\n for (int i = 0; i < res; i++) {\n\n int[][] arr = new int[res][2];\n int e = 0;\n\n for (int j = 0; j < res; j++) {\n arr[e][0] = newArray[r][0];\n arr[e][1] = newArray[r][1];\n\n r += res;\n e++;\n }\n r = 0;\n r += i + 1;\n\n Allmoves.add(arr);\n }\n\n /*For diagonal - 1*/\n int[][] arr = new int[res][2];\n int d1 = res + 1;\n int d = 0;\n int e = 0;\n for (int i = 0; i < res; i++) {\n arr[e][0] = newArray[d][0];\n arr[e][1] = newArray[d][1];\n d += d1;\n e++;\n }\n\n Allmoves.add(arr);\n\n int[][] arr1 = new int[res][2];\n int d2 = res - 1;\n int D = res - 1;\n int p = 0;\n for (int i = 0; i < res; i++) {\n arr1[p][0] = newArray[D][0];\n arr1[p][1] = newArray[D][1];\n D += d2;\n p++;\n }\n\n Allmoves.add(arr1);\n\n return Allmoves;\n\n }", "public void fillGrid() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.fillGrid()\");\r\n\t\t// From top to bottom...\r\n\t\tfor (int i=0; i<powerGrid.length; i++) {\r\n\t\t\t// ...and from left to right...\r\n\t\t\tfor (int j=0; j<powerGrid[0].length; j++) {\r\n\t\t\t\t// ...calculate each cell's power level.\r\n\t\t\t\tpowerGrid[i][j] = calculateCellPower(j, i);\r\n\t\t\t}\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}", "private List<Integer> generateRandom() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n int amt = myStateMap.get(i).getAmount();\n end = amt + start;\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "public static int[][] createBoard() {\r\n\t\t\r\n\t\tint[][] board = new int [8][8];\r\n\t\t//printing the red solduers\r\n\t\tfor (int line =0,column=0;line<3;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the blu solduers\r\n\t\tfor (int line =5,column=0;line<8;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = -1;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn board;\r\n\t}", "public static void generateGrid(int[][] grid, double percentEmpty) {\n int totalCells = grid.length * grid[0].length;\n int[] availableCells = getAvailableCells(totalCells, percentEmpty);\n\n for(int i = 0; i < grid.length; i++) {\n for(int j = 0; j < grid[0].length; j++) {\n\n int cellType = getWeightedRand(availableCells);\n\n grid[i][j] = cellType;\n availableCells[cellType]--;\n }\n }\n }", "public TicTacToeBoard() {\n grid = new Cell[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++)\n grid[i][j] = new Cell(i, j, '-');\n }\n }", "ArrayList<ArrayList<GamePiece>> makeBoard() {\n ArrayList<ArrayList<GamePiece>> row = new ArrayList<ArrayList<GamePiece>>();\n for (int i = 0; i < this.width; i++) {\n ArrayList<GamePiece> column = new ArrayList<GamePiece>();\n for (int j = 0; j < this.height; j++) {\n GamePiece temp = new GamePiece(i, j);\n column.add(temp);\n nodes.add(temp);\n }\n row.add(column);\n }\n return row;\n }", "private Grid makeGrid()\n\t{\n\t\tGrid grid = Grid.grid().\n\t\t\t\tBus(\"1\").\n\t\t\t\tSlackSource(\"Slack\", BASE_VOLTAGE, 0, 0, 0).\n\t\t\t\tLine(\"1-2\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\tBus(\"2\").\n\t\t\t\t\t\tControllableDemand(\"S\").\n\t\t\t\t\t\tLine(\"2-3\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\t\tBus(\"3\").\n\t\t\t\t\t\t\t\tLoad(\"L\").\n\t\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tLine(\"2-4\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\tBus(\"4\").\n\t\t\t\t\t\t\tDistributedSource(\"DG\").\n\t\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\tterminate().\n\t\t\tterminate().\n\t\tgrid();\n\t\t\n\t\t// x_0:\n\t\tLoad load = grid.getLoad(\"L\");\n\t\tControllableDemand storage = grid.getControllableDemand(\"S\");\n\t\tDistributedSource dg = grid.getDistributedSource(\"DG\");\n\t\tsetupUnits(load, storage, dg);\n\t\t\n\t\treturn grid;\n\t}", "void makeBoard(int[] values) {\n int c = 0;\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (values[c] == 0) {\n blankRow = i;\n blankCol = j;\n }\n board[i][j] = values[c++];\n }\n }\n this.rank = setRank();\n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n boolean[][] grid = new boolean[N][N];\n int x = N/2, y = N/2;\n grid[x][y] = true;\n\n while(((x>0 && x<N-1) && (y>0 && y<N-1))) { // Checking if the pointer is at the grid's end\n // Checking for dead ends\n if (grid[x-1][y] && grid[x+1][y] && grid [x][y-1] && grid[x][y+1]) {\n break;\n }\n int r = (int) (Math.random() * 4);\n\n // Making a move if it's legal\n if (r==0 && !grid[x-1][y]) x--;\n else if (r==1 && !grid[x][y-1]) y--;\n else if (r==2 && !grid[x+1][y]) x++;\n else if (r==3 && !grid[x][y+1]) y++;\n grid[x][y] = true;\n }\n\n for (boolean[] r : grid) {\n for (boolean c : r) {\n if (c) System.out.print(\"x \");\n else System.out.print(\". \");\n }\n System.out.println();\n }\n }", "public void initializeGameboard() {\r\n\t\t\r\n\t\t for (int row=0 ; row<gameBoard.length; row++)\r\n\t\t { \r\n\t\t \t \r\n\t\t \t for(int column=0;column<gameBoard[row].length;column++ )\t \r\n\t\t \t { \r\n\t\t \t\t if( row==0|| row ==1)\r\n\t\t \t\t { \r\n\t\t \t\t\t if (column==0) {gameBoard[row][column]=\"2\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"3\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"5\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"9\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"11\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"12\";} \r\n\t\t \t\t }\r\n\t\t \t\t \r\n\t\t\t \t else if(row ==2 || row==3) \r\n\t\t\t \t {\r\n\t\t\t \t\t if (column==0) {gameBoard[row][column]=\"12\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"11\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"9\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"5\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"3\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"2\";} \r\n\t\t\t \t }\r\n\t\t }\r\n\t\t }\r\n\t }", "void create(){\n // I assign zero value to each element of the array.\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n array[i][j]= 0;\n }\n }\n // I create random values for mines indexes\n int min = 0;\n int max = this.row;\n Random random = new Random();\n int randRow, randColumn, count=0;\n //I generate random mines quarter of the size of the array and assign it into the array.\n while(count != (this.row*this.column/4)){\n randRow = random.nextInt(max + min) + min;\n randColumn = random.nextInt(max + min) + min;\n if (array[randRow][randColumn] != -1){\n array[randRow][randColumn]= -1;\n count++;\n }\n }\n // I show the all minesweeper map\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n if (array[i][j]==0)\n System.out.print(\"0 \");\n else\n System.out.print(\"* \");\n }\n System.out.println();\n }\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "public void initLogicBoard() {\n int numOfBombs = 0;\n while (numOfBombs<bombs) {\n int randX = (int) (Math.random() * (rows - 1));\n int randY = (int) (Math.random() * (cols - 1));\n if (allTiles[randX][randY].getType() != 10) {\n allTiles[randX][randY].setType(10);\n\n for (int m = randX - 1; m <= randX + 1; m++) {\n for (int n = randY - 1; n <= randY + 1; n++) {\n if ((m < rows && n < cols) && (m >= 0 && n >= 0)) {\n if (allTiles[m][n].getType() != 10)\n allTiles[m][n].setType(allTiles[m][n].getType() + 1);\n }\n }\n }\n numOfBombs++;\n\n }\n }\n }", "GameBoard(){\r\n int i, j;\r\n char first = '0';\r\n grid = new char[yMax][xMax];\r\n\r\n grid[0][0] = ' ';\r\n\r\n //labels rows\r\n for(i = 1; i < yMax; i++){\r\n j = 0;\r\n grid[i][j] = first;\r\n first++;\r\n }\r\n\r\n //labels columns\r\n first = '0';\r\n for(j = 1; j < xMax; j++){\r\n i = 0;\r\n if(j % 2 == 0) {\r\n grid[i][j] = first;\r\n first++;\r\n }\r\n else\r\n grid[i][j] = ' ';\r\n }\r\n\r\n //separates squares with '|'\r\n for(i = 1; i < yMax; i++){\r\n for(j = 1; j < xMax; j++){\r\n if(j % 2 != 0)\r\n grid[i][j] = '|';\r\n else\r\n grid[i][j] = ' ';\r\n }\r\n }\r\n }", "public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}", "private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }", "public void fillGamePanel() {\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n gridPanel.add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n }", "public abstract Case[][] generate();", "public void step()\n {\n\t int rows = grid.length-1;\n\t int cols = grid[0].length-1;\n\t int direction = (int) (Math.random()*3);\n\t direction--;\n\t int row = (int) (Math.random()*rows);\n\t //System.out.println(row);\n\t int col = (int) (Math.random()*cols);\n\t //System.out.println(col);\n\t if(grid[row][col] == SAND && (grid[row+1][col] == EMPTY || grid[row+1][col] == WATER)) {\n\t\t grid[row+1][col] = SAND;\n\t\t grid[row][col] = EMPTY;\n\t }\n\t if(grid[row][col] == WATER && grid[row+1][col] == EMPTY) {\n\t\t if(col != 0) {\n\t\t\t grid[row+1][col+direction] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t\t else {\n\t\t\t grid[row+1][col] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t }\n }", "void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void generate_maze()\n\t{\n\t\tint i, j, r, c;\n\n\t\t// choose a cell at random and make it the current cell\n\t\tRandom rand = new Random(666);\n\t\tr = (int)(rand.nextFloat() * (ROWS - 1));\n\t\tc = (int)(rand.nextFloat() * (COLS - 1));\n\t\tint[] curr = {r,c}; // current search location\n\t\tint visited = 1;\n\t\tint total = ROWS*COLS;\n\t\tint tos = 0; // index for top of cell stack \n\n\t\t// arrays of single step movements between cells\n\t\t// north east south west\n\t\tint[][] move = {{-1, 0}, {0, 1}, {1, 0}, {0,-1}};\n\t\tint[][] next = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};\n\n\t\twhile (visited < total)\n\t\t{\n\t\t\t// find all neighbors of current cell with all walls intact\n\t\t\tj = 0;\n\t\t\tfor (i = 0; i < 4; i++)\n\t\t\t{\n\t\t\t\tr = curr[0] + move[i][0];\n\t\t\t\tc = curr[1] + move[i][1];\n\n\t\t\t\t// check for valid next cell\n\t\t\t\tif ((0 <= r) && (r < ROWS) && (0 <= c) && (c < COLS))\n\t\t\t\t{\n\t\t\t\t\t// check if previously visited\n\t\t\t\t\tif ((Maze[r][c] == 15))//N) && (Maze[r][c] == E) && (Maze[r][c] == S) && (Maze[r][c] == W))\n\t\t\t\t\t{\n\t\t\t\t\t\t// not visited, so add to possible next cells\n\t\t\t\t\t\tnext[j][0] = r;\n\t\t\t\t\t\tnext[j][1] = c;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (j > 0)\n\t\t\t{\n\t\t\t\t// current cell has one or more unvisited neighbors, so choose one at random \n\t\t\t\t// and knock down the wall between it and the current cell\n\t\t\t\ti = (int)(rand.nextFloat() * (j-1));\n\n\t\t\t\tif ((next[i][0] - curr[0]) == 0) // next on same row\n\t\t\t\t{\n\t\t\t\t\tr = next[i][0];\n\t\t\t\t\tif (next[i][1] > curr[1]) // move east\n\t\t\t\t\t{\n\t\t\t\t\t\tc = curr[1];\n\t\t\t\t\t\tMaze[r][c] &= ~E; // clear E wall\n\t\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t\tMaze[r][c] &= ~W; // clear W wall\n\t\t\t\t\t}\n\t\t\t\t\telse // move west\n\t\t\t\t\t{\n\t\t\t\t\t\tc = curr[1];\n\t\t\t\t\t\tMaze[r][c] &= ~W; // clear W wall\n\t\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t\tMaze[r][c] &= ~E; // clear E wall\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // next on same column\n\t\t\t\t{\n\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t if (next[i][0] > curr[0]) // move south \n\t\t\t\t\t {\n\t\t\t\t\t \tr = curr[0];\n\t\t\t\t\t \tMaze[r][c] &= ~S; // clear S wall\n\t\t\t\t\t \tr = next[i][0];\n\t\t\t\t\t \tMaze[r][c] &= ~N; // clear N wall\n\t\t\t\t\t }\n\t\t\t\t\t else // move north\n\t\t\t\t\t {\n\t\t\t\t\t \tr = curr[0];\n\t\t\t\t\t \tMaze[r][c] &= ~N; // clear N wall\n\t\t\t\t\t \tr = next[i][0];\n\t\t\t\t\t \tMaze[r][c] &= ~S; // clear S wall\n\t\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ttos++; // push current cell location\n\t\t\t\tstack.elementAt(tos)[0] = curr[0];\n\t\t\t\tstack.elementAt(tos)[1] = curr[1];\n\n\t\t\t\tcurr[0] = next[i][0]; // make next cell the current cell\n\t\t\t\tcurr[1] = next[i][1];\n\n\t\t\t\tvisited++; // increment count of visited cells\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// reached dead end, backtrack\n\t\t\t\t// pop the most recent cell from the cell stack \n\t\t\t\t// and make it the current cell\n\t\t\t\tcurr[0] = stack.elementAt(tos)[0];\n\t\t\t\tcurr[1] = stack.elementAt(tos)[1];\n\t\t\t\ttos--;\n\t\t\t}\n\t\t}\n\t}", "private BDD nextGeneration(BDD generation){\n\t\tBDD res = this.factory.makeOne();\n\t\tAssignment assignment = generation.anySat();\n\n\n\t\t// be build the map/transition from board to board_p vars\n\t\tfor(int i = 0; i < this.dimension; i++)\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\n\n\t\t\t\t// it's a live cell, we remove it if we can\n\t\t\t\tif(assignment.holds(this.board[i][j])){\n\n\t\t\t\t\tif(trySolitude(i, j, assignment)){\t\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); // evaluate T the var in board\n\t\t\t\t\t\tres.andWith(this.board_p[i][j].not()); // evaluate F the var in board_p\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(tryOverpopulation(i, j, assignment)){\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); \n\t\t\t\t\t\tres.andWith(this.board_p[i][j].not()); \n\t\t\t\t\t}\n\n\t\t\t\t\telse if(tryBorder(i, j)){\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); \n\t\t\t\t\t\tres.andWith(this.board_p[i][j].not()); \n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); // evaluate T the var in board\n\t\t\t\t\t\tres.andWith(this.board_p[i][j].copy()); // evaluate T the var in board_p\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// it's a dead cell, we populate it if we can\n\t\t\t\telse{\n\n\t\t\t\t\tif(tryPopulatingDeadCell(i, j, assignment)){\n\t\t\t\t\t\tres.andWith(this.board[i][j].not()); \t// evaluate F the var in board\n\t\t\t\t\t\tres.andWith(this.board_p[i][j].copy()); // evaluate T the var in board_p\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\t\t\t\t\t\tres.andWith(this.board[i][j].biimp(this.board_p[i][j])); // vars equal\n\n\t\t\t\t}\n\t\t\t}\n\n\n\t\treturn res;\n\t}", "public void Game() {\n\t\tboard = new int[3][3];\n\t\trowSum = new int[3];\n\t\tcolSum = new int[3];\n\t\tdiagSum = new int[2];\n\t\treset();\n\t}", "private void fillBoard() {\n\n boardMapper.put(1, new int[]{0, 0});\n boardMapper.put(2, new int[]{0, 1});\n boardMapper.put(3, new int[]{0, 2});\n boardMapper.put(4, new int[]{1, 0});\n boardMapper.put(5, new int[]{1, 1});\n boardMapper.put(6, new int[]{1, 2});\n boardMapper.put(7, new int[]{2, 0});\n boardMapper.put(8, new int[]{2, 1});\n boardMapper.put(9, new int[]{2, 2});\n\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "private void generateRealizations() {\n\t\t// lastTime + 1 rows because the first hosts the initial value\n\t\trealizations = new double[lastTime + 1][numberOfSimulations];\n\t\tgenerateUpsAndDowns();// will be called only once\n\t\t// a first for loop the fill the first row\n\t\tfor (int simulationIndex = 0; simulationIndex < numberOfSimulations; simulationIndex++) {\n\t\t\trealizations[0][simulationIndex] = initialValue;\n\t\t}\n\t\t// double for loop for the realizations. We start from time 1\n\t\tfor (int timeIndex = 1; timeIndex <= lastTime; timeIndex++) {\n\t\t\tfor (int simulationIndex = 0; simulationIndex < numberOfSimulations; simulationIndex++) {\n\t\t\t\trealizations[timeIndex][simulationIndex] = realizations[timeIndex - 1][simulationIndex]\n\t\t\t\t\t\t* upsAndDowns[timeIndex - 1][simulationIndex];\n\t\t\t\t// S(i+1)=S(i)M(I)\n\t\t\t}\n\t\t}\n\t}", "private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }", "public abstract void initiateRandomCells(double probabilityForEachCell);", "public static void step(int[][] grid) {\n\n int[][] temp = new int[grid.length][grid[0].length];\n copy2DArray(grid, temp);\n\n ArrayList<int[]> emptyCells = getEmptyCellCoords(grid);\n ArrayList<int[]> dissatisfiedCells = getDissatisfiedCellCoords(grid);\n\n for (int i = 0; i < dissatisfiedCells.size(); i++) {\n if (emptyCells.isEmpty()) break;\n\n int[] cellLoc = dissatisfiedCells.get(i);\n int randIndex = (int)(Math.random() * (emptyCells.size() - 1));\n int[] emptyLoc = emptyCells.get(randIndex);\n\n temp[emptyLoc[0]][emptyLoc[1]] = grid[cellLoc[0]][cellLoc[1]];\n emptyCells.remove(randIndex);\n emptyCells.add(randIndex, cellLoc);\n\n temp[cellLoc[0]][cellLoc[1]] = 0;\n }\n\n copy2DArray(temp, grid);\n }", "public static Grid makeRandStackGrid() {\n Block randBlock = makeRandomBlock();\n ArrayList<Block> array1 = new ArrayList<>();\n array1.add(randBlock);\n ArrayList<Block> array2 = new ArrayList<>();\n Block block1 = makeBlockUnder(randBlock);\n array2.add(block1);\n Grid testGrid = new Grid(array2, array1);\n return testGrid;\n }", "private Board create4by4Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 4);\n Tile t2 = new Tile(1, 4);\n Tile t3 = new Tile(2, 4);\n Tile t4 = new Tile(3, 4);\n Tile t5 = new Tile(4, 4);\n Tile t6 = new Tile(5, 4);\n Tile t7 = new Tile(6, 4);\n Tile t8 = new Tile(7, 4);\n Tile t9 = new Tile(8, 4);\n Tile t10 = new Tile(9, 4);\n Tile t11 = new Tile(10, 4);\n Tile t12 = new Tile(11, 4);\n Tile t13 = new Tile(12, 4);\n Tile t14 = new Tile(13, 4);\n Tile t15 = new Tile(14, 4);\n Tile t16 = new Tile(15, 4);\n tiles = new Tile[4][4];\n tiles[0][0] = t5;\n tiles[0][1] = t16;\n tiles[0][2] = t1;\n tiles[0][3] = t3;\n tiles[1][0] = t13;\n tiles[1][1] = t15;\n tiles[1][2] = t9;\n tiles[1][3] = t12;\n tiles[2][0] = t2;\n tiles[2][1] = t6;\n tiles[2][2] = t7;\n tiles[2][3] = t14;\n tiles[3][0] = t10;\n tiles[3][1] = t4;\n tiles[3][2] = t8;\n tiles[3][3] = t11;\n return new Board(tiles);\n }", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public Board()\n {\n ArrayList<String[]> dies = new ArrayList<String[]>();\n dies.add(Die0);\n dies.add(Die1);\n dies.add(Die2);\n dies.add(Die3);\n dies.add(Die4);\n dies.add(Die5);\n dies.add(Die6);\n dies.add(Die7);\n dies.add(Die8);\n dies.add(Die9);\n dies.add(Die10);\n dies.add(Die11);\n dies.add(Die12);\n dies.add(Die13);\n dies.add(Die14);\n dies.add(Die15);\n \n \n \n Random rand = new Random();\n int a = rand.nextInt(16);\n int b = rand.nextInt(15);\n int c = rand.nextInt(14);\n int d = rand.nextInt(13);\n int e = rand.nextInt(12);\n int f = rand.nextInt(11);\n int g = rand.nextInt(10);\n int h = rand.nextInt(9);\n int i = rand.nextInt(8);\n int j = rand.nextInt(7);\n int k = rand.nextInt(6);\n int l = rand.nextInt(5);\n int m = rand.nextInt(4);\n int n = rand.nextInt(3);\n int o = rand.nextInt(2);\n int p = rand.nextInt(1);\n row0.add(new Tile(dies.get(a)[rand.nextInt(6)].charAt(0),0,0));\n dies.remove(a);\n row0.add(new Tile(dies.get(b)[rand.nextInt(6)].charAt(0),0,1));\n dies.remove(b);\n row0.add(new Tile(dies.get(c)[rand.nextInt(6)].charAt(0),0,2));\n dies.remove(c);\n row0.add(new Tile(dies.get(d)[rand.nextInt(6)].charAt(0),0,3));\n dies.remove(d);\n row1.add(new Tile(dies.get(e)[rand.nextInt(6)].charAt(0),1,0));\n dies.remove(e);\n row1.add(new Tile(dies.get(f)[rand.nextInt(6)].charAt(0),1,1));\n dies.remove(f);\n row1.add(new Tile(dies.get(g)[rand.nextInt(6)].charAt(0),1,2));\n dies.remove(g);\n row1.add(new Tile(dies.get(h)[rand.nextInt(6)].charAt(0),1,3));\n dies.remove(h);\n row2.add(new Tile(dies.get(i)[rand.nextInt(6)].charAt(0),2,0));\n dies.remove(i);\n row2.add(new Tile(dies.get(j)[rand.nextInt(6)].charAt(0),2,1));\n dies.remove(j);\n row2.add(new Tile(dies.get(k)[rand.nextInt(6)].charAt(0),2,2));\n dies.remove(k);\n row2.add(new Tile(dies.get(l)[rand.nextInt(6)].charAt(0),2,3));\n dies.remove(l);\n row3.add(new Tile(dies.get(m)[rand.nextInt(6)].charAt(0),3,0));\n dies.remove(m);\n row3.add(new Tile(dies.get(n)[rand.nextInt(6)].charAt(0),3,1));\n dies.remove(n);\n row3.add(new Tile(dies.get(o)[rand.nextInt(6)].charAt(0),3,2));\n dies.remove(o);\n row3.add(new Tile(dies.get(p)[rand.nextInt(6)].charAt(0),3,3));\n dies.remove(p);\n tiles.add(row0);\n tiles.add(row1);\n tiles.add(row2);\n tiles.add(row3);\n \n }", "private void createGrid() {\n String imageButtonID;\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n imageButtonID = \"painterImageButton_\" + i + j;\n\n //This step allows easy assignment of each imageButton with a nested loop\n int resID = this.getResources().getIdentifier(imageButtonID, \"id\", this.getPackageName());\n grid[i][j] = findViewById(resID);\n grid[i][j].setOnClickListener(this); //Response to each button click\n\n //Generate a random number to decide whether to put white or black here\n double x = Math.random() * 2;\n if (x < 1) {\n grid[i][j].setImageResource(R.drawable.black_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_black));\n } else if (x < 2) {\n grid[i][j].setImageResource(R.drawable.white_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_white));\n }\n\n }\n }\n\n //Make sure the grid isn't entirely black at the beginning\n grid[1][1].setImageResource(R.drawable.white_circle);\n grid[1][1].setContentDescription(\"white\");\n }", "public static LinkedList<LinkedList<TicTacToeGame>> generateAllGames(int lines, int columns, int winLength){\n\n LinkedList<LinkedList<TicTacToeGame>> allGames = new LinkedList<LinkedList<TicTacToeGame>>();\n LinkedList<TicTacToeGame> gamesList = new LinkedList<TicTacToeGame>();\n TicTacToeGame newGame = new TicTacToeGame(lines, columns, winLength);\n gamesList.add(0, newGame);\n allGames.add(0, gamesList);\n\n boolean generate = true;\n\n while ( generate ) {\n \n generate = false;\n LinkedList<TicTacToeGame> list = new LinkedList<TicTacToeGame>();\n\n for( TicTacToeGame game: gamesList ) {\n\n for ( int i = 0 ; i < lines*columns ; i++ ) {\n\n if ( game.valueAt(i) == CellValue.EMPTY && game.getGameState() == GameState.PLAYING ) {\n\n newGame = new TicTacToeGame(game, i);\n boolean valid = true;\n\n for ( TicTacToeGame otherGame: list ) {\n\n if ( newGame.equals(otherGame) ) {\n valid = false;\n break;\n }\n\n }\n\n if ( valid ) {\n list.add(newGame);\n }\n\n if ( newGame.getGameState() == GameState.PLAYING ) {\n generate = true;\n }\n\n }\n\n }\n\n }\n\n gamesList = list;\n allGames.addLast(gamesList);\n\n }\n\n return allGames;\n\n\t}", "public Tile[] generate() {\n Tile[] tiles = generateTiles();\n calculatePathfindingGrid(tiles);\n return tiles;\n }", "private void fillRandomEmptyCell(int value, PredatorPreyCell cell, Grid<Integer> grid) {\n\t\tRandom r = new Random();\n\t\tPredatorPreyCell randCell = getEmptyCells(grid).get(r.nextInt(getEmptyCells(grid).size()));\n\t\tswap(cell, randCell);\n\t}", "public int[] setUpBoard(int noOfPlayers)\r\n\t{\r\n\t\tswitch(noOfPlayers)\r\n\t\t{\r\n\t\t//One player\r\n\t\tcase 1:\r\n\t\t\tfillTriangle(-1, board, 1, 16, 12);\r\n\t\t\treturn new int[] {1};\r\n\t\t//Two players opposite to one another\r\n\t\tcase 2:\r\n\t\t\tfillTriangle(-1, board, 1, 16, 12);\r\n\t\t\tfillTriangle(1, board, 4, 0, 4);\r\n\t\t\treturn new int[] {1,4};\r\n\t\t//Three players arranged in a triangle\r\n\t\tcase 3:\r\n\t\t\tfillTriangle(1, board, 2, 9, 13);\r\n\t\t\tfillTriangle(1, board, 4, 0, 4);\r\n\t\t\tfillTriangle(1, board, 6, 9, 4);\r\n\t\t\treturn new int[] {2,4,6};\r\n\t\t//Four players with two empty spots opposite from one another\r\n\t\tcase 4:\r\n\t\t\tfillTriangle(1, board, 2, 9, 13);\r\n\t\t\tfillTriangle(-1, board, 3, 7, 12);\r\n\t\t\tfillTriangle(-1, board, 5, 7, 3);\r\n\t\t\tfillTriangle(1, board, 6, 9, 4);\r\n\t\t\treturn new int[] {2,3,5,6};\r\n\t\t//Five players\r\n\t\tcase 5:\r\n\t\t\tfillTriangle(-1, board, 1, 16, 12);\r\n\t\t\tfillTriangle(1, board, 2, 9, 13);\r\n\t\t\tfillTriangle(-1, board, 3, 7, 12);\r\n\t\t\tfillTriangle(1, board, 4, 0, 4);\r\n\t\t\tfillTriangle(-1, board, 5, 7, 3);\r\n\t\t\treturn new int[] {1,2,3,4,5};\r\n\t\t//All six positions occupied by players\r\n\t\tdefault:\r\n\t\t\tfillTriangle(-1, board, 1, 16, 12);\r\n\t\t\tfillTriangle(1, board, 2, 9, 13);\r\n\t\t\tfillTriangle(-1, board, 3, 7, 12);\r\n\t\t\tfillTriangle(1, board, 4, 0, 4);\r\n\t\t\tfillTriangle(-1, board, 5, 7, 3);\r\n\t\t\tfillTriangle(1, board, 6, 9, 4);\r\n\t\t\treturn new int[] {1,2,3,4,5,6};\r\n\t\t}\r\n\t}", "public void drawGrid()\n {\n noStroke();\n for(int i = 0; i < xCells; i++)\n {\n for(int j = 0; j < yCells; j++)\n {\n if(pattern[i][j])\n fill(0);\n else\n fill(255);\n rect(firstCellPosition[0]+i*cellSize,firstCellPosition[1]+j*cellSize,cellSize-1,cellSize-1);\n }\n }\n }", "public List<PuzzleInstance> generateInstance() {\n\n final String[] POSITION = {\"Up\", \"Down\", \"Left\", \"Right\"};// In this order\n List<PuzzleInstance> puzzleInstances = new ArrayList<>();\n\n for (String traverse : POSITION) {\n int tempI=-1, tempJ=-1;\n switch (traverse) {\n case \"Up\":\n tempI = row - 1; \n tempJ = coloum;\n break;\n case \"Down\":\n tempI = row + 1; \n tempJ = coloum;\n break;\n case \"Left\":\n tempI = row; \n tempJ = coloum - 1;\n break;\n case \"Right\":\n tempI = row; \n tempJ = coloum + 1;\n break;\n }\n \n if((tempI < 0 || tempJ <0)|| (tempI >= rowColoumSize || tempJ >=rowColoumSize )){\n System.out.println(\"Out of bound\");\n // skip it nothing to add in the list\n }else{\n final Integer[][] puzzleGenerator = cloneArray(puzzle); \n int temp = puzzleGenerator [tempI][tempJ];\n puzzleGenerator[tempI][tempJ] = 0;\n puzzleGenerator[row][coloum] = temp;\n \n PuzzleInstance puzzleInstance = new PuzzleInstance(cloneArray(puzzleGenerator),rowColoumSize,cost_of_path+1,traverse, this);\n puzzleInstances.add(puzzleInstance); \n }\n }\n\n return puzzleInstances;\n \n \n }", "public Piece[][] createStandardChessboard(Player whitePlayer, Player blackPlayer) {\t\t\r\n\t\tPiece[][] start_board = {\r\n\t\t\t\t{new Rook(0,0,blackPlayer), new Knight(1,0,blackPlayer), new Bishop(2,0,blackPlayer), new Queen(3,0,blackPlayer),new King(4,0,blackPlayer), new Bishop(5,0,blackPlayer), new Knight(6,0,blackPlayer), new Rook(7,0,blackPlayer)},\r\n\t\t\t\t{new Pawn(0,1,blackPlayer), new Pawn(1,1,blackPlayer), new Pawn(2,1,blackPlayer), new Pawn(3,1,blackPlayer),new Pawn(4,1,blackPlayer), new Pawn(5,1,blackPlayer), new Pawn(6,1,blackPlayer), new Pawn(7,1,blackPlayer)},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{new Pawn(0,6,whitePlayer), new Pawn(1,6,whitePlayer), new Pawn(2,6,whitePlayer), new Pawn(3,6,whitePlayer),new Pawn(4,6,whitePlayer), new Pawn(5,6,whitePlayer), new Pawn(6,6,whitePlayer), new Pawn(7,6,whitePlayer)},\r\n\t\t\t\t{new Rook(0,7,whitePlayer), new Knight(1,7,whitePlayer), new Bishop(2,7,whitePlayer), new Queen(3,7,whitePlayer),new King(4,7,whitePlayer), new Bishop(5,7,whitePlayer), new Knight(6,7,whitePlayer), new Rook(7,7,whitePlayer)}\r\n\t\t};\r\n\t\treturn start_board;\r\n\t}", "private void generateLevel() {\n\t\tgenerateBorder();\n\t\tfor (int y = 1; y < height - 1; y++) {\n\t\t\tfor (int x = 1; x < height - 1; x++) {\n\t\t\t\tif (random.nextInt(2) == 1) {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getGrass(), false, x, y);\n\t\t\t\t\trandForest(x, y);\n\t\t\t\t} else {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getDirt(), false, x, y);\n\t\t\t\t\trandOre(x, y);\n\t\t\t\t}\n\t\t\t\tif (x == 4 && y == 4) {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getGrass(), false, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public void initializeBoard(int r, int c) {\n\n grid = new Tile[HEIGHT][WIDTH];\n\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Tile(Tile.BLANK, row, col);\n }\n }\n\n Random random = new Random();\n for (int i = 0; i < numMines; i++) {\n int row = random.nextInt(HEIGHT);\n int col = random.nextInt(WIDTH);\n if ((row == r && col == c) || grid[row][col].getType() == Tile.MINE || grid[row][col].getType() == Tile.NUMBER) {\n i--;\n } else {\n grid[row][col] = new Tile(Tile.MINE, row, col);\n }\n }\n\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n if (getNumNeighboringMines(row, col) > 0 && grid[row][col].getType() != Tile.MINE) {\n Tile tile = new Tile(Tile.NUMBER, getNumNeighboringMines(row, col), row, col);\n grid[row][col] = tile;\n }\n }\n }\n }", "public void generate() {\n\n enemies.clear();\n\n for (int i = 0; i < (GRID_SIZE * ROOM_WIDTH); i++) {\n for (int j = 0; j < (GRID_SIZE * ROOM_HEIGHT); j++) {\n terrain[i][j] = null;\n }\n }\n\n RoomType[][] rooms = new RoomType[GRID_SIZE][GRID_SIZE];\n for(int i = 0; i < GRID_SIZE; i++) {\n for (int j = 0; j < GRID_SIZE; j++) {\n rooms[i][j] = RoomType.None;\n }\n }\n\n left = down = false;\n int x = random.nextInt(GRID_SIZE), y = 0;\n\n startPosition = new Vector2();\n startPosition.y = 4 * Tile.SIZE;\n startPosition.x = ((x + 1) * ROOM_WIDTH * Tile.SIZE) + 5 * Tile.SIZE;\n\n\n startRoom = true;\n while(true) {\n down = false;\n getDir();\n\n if(left) {\n x--;\n }\n else {\n x++;\n }\n\n if(x >= GRID_SIZE) {\n x--;\n down = true;\n }\n else if(x < 0) {\n x++;\n down = true;\n }\n\n if(down) {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.Down;\n y++;\n left = !left;\n if(y >= GRID_SIZE) {\n rooms[x][y - 1] = RoomType.Standard;\n endRoomX = x;\n endRoomY = y - 1;\n break;\n }\n }\n\n if(!down) {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.Standard;\n }\n else {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.getEnum(random.nextInt(1) + 3);\n }\n }\n\n for (int i = 0; i < GRID_SIZE; i++) {\n for (int j = 0; j < GRID_SIZE; j++) {\n System.out.print(rooms[i][j].VALUE + \" \");\n generateRoom(i, j, rooms[i][j]);\n }\n System.out.println(\"\");\n }\n }", "@Override\n public void generateMaze() {\n //Opens up the entrance to the maze\n MazeCell current=maze[0][0];\n current.openWall(Directions.North.getBValue());\n\n //A list of sets. The sets contain the cells which can be accessed from one another.\n List<List<MazeCell>> sets=new LinkedList<>();\n //All the walls in the maze\n List<InnerWall> wallList=new LinkedList<>();\n //Initially create a set for each cell\n //Also add the walls to the list\n for(int row=0;row< maze.length;row++){\n for(int column=0;column<maze[0].length;column++){\n sets.add(Arrays.asList(maze[row][column]));\n List<MazeCell> valid=returnValidNeighbours(maze[row][column].getX(), maze[row][column].getY());\n for(int i=0;i<valid.size();i++){\n wallList.add(new InnerWall(maze[row][column], valid.get(i)));\n }\n }\n }\n //Now we have as many wall sets as maze cells, each containing four walls.\n\n Random rnd=new Random();\n int idx;\n //Loops until only one set remains, meaning all cells can be reached from any cell\n while(sets.size()!=1){\n //Select a random wall\n idx=wallList.size()>1 ? rnd.nextInt(wallList.size()) : 0;\n InnerWall w= wallList.get(idx);\n //The two neighbouring cells\n MazeCell c1=w.parent;\n MazeCell c2=w.connected;\n\n //Their relative directions\n Directions d=Directions.getOffsetDirection(c1.getX(),c1.getY(),c2.getX(),c2.getY());\n\n //Check if the two cells are already connected\n if((c1.getOpenWalls() % d.getBValue())==d.getBValue())\n continue;\n\n //Two new sets\n List<MazeCell> set1=null;\n List<MazeCell> set2=null;\n //We get the sets\n boolean b1,b2;\n b1=b2=false;\n //We loop through the set of sets looking for the two which contains the two cells\n for(List<MazeCell> list : sets) {\n if(list.contains(c1)){\n set1=list;\n b1=true;\n }\n if(list.contains(c2)) {\n set2=list;\n b2=true;\n }\n if(b1 && b2)\n break;\n }\n //If the two sets are disjoint then we join them together\n if(set1!=null && set2!=null && !set1.equals(set2)){\n\n //We connect the two cells\n c1.openWall(d.getBValue());\n c2.openOppositeWall(d.getBValue());\n\n if(sleepDrawTime>0) {\n try {\n Thread.sleep(sleepDrawTime);\n mf.repaint();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n //Join the two sets\n List<MazeCell> temp= Stream.concat(set1.stream(), set2.stream())\n .collect(Collectors.toList());\n sets.remove(set2);\n sets.remove(set1);\n sets.add(temp);\n }\n //We remove the wall from the list\n wallList.remove(w);\n //As the walls are double-sided, two cells share a wall, we have to find the opposite cell's wall in the list\n InnerWall oppositeWall=wallList.stream().filter((x)->x.parent==w.connected).findFirst().orElse(null);\n wallList.remove(oppositeWall);\n\n\n }\n //We open an exit in the last row.\n maze[maze.length-1][rnd.nextInt(maze[0].length)].openWall(Directions.South.getBValue());\n\n }", "public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }", "public Gameboard() {\n\n\t\tturn = 0;\n\n\t\tboard = new Cell[4][4][4];\n\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\tfor (int k = 0; k < board.length; k++) {\n\n\t\t\t\t\tboard[i][j][k] = Cell.E;\n\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }", "public static void main(String[] args) {\n int[][] map = new int[N][N];\r\n // 1D to 2D index map\r\n CustomPair[] indToVal = new CustomPair[(N * N) + 1];\r\n // 2D to value map\r\n Map<CustomPair, Integer> gridToValue = new HashMap<>();\r\n // Direction to start\r\n Direction dir = Direction.RIGHT;\r\n int j = 1;\r\n int y = N / 2;\r\n // shift left for even n's\r\n int x = (N % 2 == 0) ? y - 1 : y;\r\n /**\r\n * We use y, x here because the grid is sort of turned around.\r\n * */\r\n while(j <= ((N * N))) {\r\n CustomPair currentIndex = new CustomPair(y, x);\r\n // if the number is not prime it is traversable\r\n if (!isPrime(j)) {\r\n map[y][x] = 1;\r\n gridToValue.put(currentIndex, j);\r\n } else {\r\n map[y][x] = -1;\r\n }\r\n // add the value to 1d to 2d index values\r\n indToVal[j] = currentIndex;\r\n switch(dir){\r\n case RIGHT:\r\n if(x <= (N - 1) && map[y - 1][x] == 0 && j > 1)\r\n dir = Direction.UP;\r\n break;\r\n case UP:\r\n if(map[y][x - 1] == 0)\r\n dir = Direction.LEFT;\r\n break;\r\n case LEFT:\r\n if(x == 0 || map[y + 1][x] == 0)\r\n dir = Direction.DOWN;\r\n break;\r\n case DOWN:\r\n if(map[y][x + 1] == 0)\r\n dir = Direction.RIGHT;\r\n break;\r\n }\r\n // update the grid index\r\n switch(dir){\r\n case RIGHT:\r\n x++;\r\n break;\r\n case UP:\r\n y--;\r\n break;\r\n case LEFT:\r\n x--;\r\n break;\r\n case DOWN:\r\n y++;\r\n break;\r\n }\r\n // update 1D index\r\n j++;\r\n }\r\n\r\n Scanner sc = new Scanner(System.in);\r\n int caseNum = 1;\r\n while (sc.hasNextInt()) {\r\n int start = sc.nextInt();\r\n int goal = sc.nextInt();\r\n // find the shortest path\r\n Queue<CustomPair> q = new LinkedList<>();\r\n // 2D grid to distance values\r\n Map<CustomPair, Integer> distMap = new HashMap<>();\r\n // start is 0\r\n distMap.put(indToVal[start], 0);\r\n q.add(indToVal[start]);\r\n while (!q.isEmpty()) {\r\n CustomPair cur = q.remove();\r\n // for each neighbour (4 potential moves)\r\n for (int i = 0; i < 4; i++) {\r\n int nx = cur.a + X_NEIG_INDEX[i];\r\n int ny = cur.b + Y_NEIG_INDEX[i];\r\n CustomPair neighP = new CustomPair(nx, ny);\r\n // if the value is not in the grid\r\n if (!gridToValue.containsKey(neighP))\r\n continue;\r\n // if the value is already visited\r\n if (distMap.containsKey(neighP))\r\n continue;\r\n distMap.put(neighP, distMap.get(cur) + 1);\r\n q.add(neighP);\r\n }\r\n }\r\n // print for Kattis reasons\r\n String msg = \"Case \" + caseNum + \": \";\r\n if (!distMap.containsKey(indToVal[goal]) ||\r\n distMap.getOrDefault(indToVal[goal], -1) == -1 && start != goal)\r\n System.out.println(msg + \" impossible\");\r\n else\r\n System.out.println(msg + \"\" + distMap.get(indToVal[goal]));\r\n caseNum++;\r\n }\r\n }", "public static void main(String[] args) {\n\n int gridWidth, gridHeight, humanNumber, goblinNumber, positionX, positionY, strength;\n ArrayList<Player> humanList = new ArrayList<>();\n ArrayList<Player> goblinList = new ArrayList<>();\n Scanner input = new Scanner(System.in);\n\n System.out.println(\" Welcome to Human vs. Goblin\");\n System.out.println();\n\n // Get the size of the grid\n System.out.print(\"Width of the grid (1-500): \");\n gridWidth = input.nextInt();\n if (gridWidth<1 || gridWidth>500) {\n gridWidth = 10; // In case input is wrong, set 10 as default;\n }\n\n System.out.print(\"Height of the grid (1-500): \");\n gridHeight = input.nextInt();\n if (gridHeight<1 || gridHeight>500)\n gridHeight = 10; // In case input is wrong, set 10 as default;\n\n // Init Grid\n World grid = new World(gridWidth, gridHeight);\n System.out.println();\n\n // Get the number of Players\n System.out.print(\"Number of human (0-\"+grid.getArea()+\"): \");\n humanNumber = input.nextInt();\n\n if (humanNumber<0 || humanNumber>grid.getArea()){\n humanNumber = grid.getArea()/3; // In case input is wrong, set one third as default;\n }\n\n System.out.print(\"Number of goblin (0-\"+(grid.getArea())+\"): \");\n goblinNumber = input.nextInt();\n if (goblinNumber<0 || goblinNumber>grid.getArea()){\n goblinNumber = grid.getArea()/3; // In case input is wrong, set one third as default;\n }\n\n Coordinates coordinates = new Coordinates(ThreadLocalRandom.current().nextInt(grid.getArea() -1,grid.getArea()), ThreadLocalRandom.current().nextInt(grid.getArea() -1,grid.getArea()));\n // Fill Grid with creatures\n for(int i=0;i<humanNumber;i++){\n do {\n positionX = ThreadLocalRandom.current().nextInt(0,grid.getWidth()-1);\n positionY = ThreadLocalRandom.current().nextInt(0,grid.getHeight()-1);\n strength = ThreadLocalRandom.current().nextInt(1,10);\n Human human = new Human(\"human\",strength,1, coordinates);\n humanList.add(human);\n\n } while (grid.addPlayer(positionX, positionY, humanList.get(i)));\n }\n for(int i=0;i<goblinNumber;i++){\n do {\n positionX = ThreadLocalRandom.current().nextInt(0,grid.getWidth()-1);\n positionY = ThreadLocalRandom.current().nextInt(0,grid.getHeight()-1);\n strength = ThreadLocalRandom.current().nextInt(1,10);\n Goblin goblin = new Goblin(\"goblin\",strength,1, coordinates);\n goblinList.add(goblin);\n\n } while (grid.addPlayer(positionX, positionY, goblinList.get(i)));\n }\n\n System.out.println();\n System.out.print(\"You have just created Human vs Goblin grid size of \"+grid.getSizeString()+\" \");\n System.out.println(\"with \"+humanNumber+\" humans and \"+goblinNumber+\" Goblins!\");\n System.out.println();\n Timer timer = new Timer();\n timer.schedule(new PlayGame(grid, timer),0,500);\n }", "private void fillBoard() {\n\t\tint randomRow, randomColumn;\n\t\t\n\t\tfor (int i = 0; i < bombs; ++i) {\n\t\t\trandomRow = (int)(Math.random() * rows);\n\t\t\trandomColumn = (int)(Math.random() * columns);\n\t\t\tboard[randomRow][randomColumn] = -1;\n\t\t}\n\t\t\n\t\tfor (int r = 0; r < rows; ++r) {\n\t\t\tfor (int c = 0; c < columns; ++c) {\n\t\t\t\tif (board[r][c] == -1) {\n\t\t\t\t\tincreaseFreeCells(r, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void generate () {\n\t\t\n\t\tArrayList<Integer[]> copyToCheck = new ArrayList<Integer[]> ();\n\t\tfor (int i = 0; i < Math.pow(size, 3); i++) { // Filling up the maze with blocks\n\t\t\tint x, y, z;\n\t\t\tx = i / (size * size); // Get the x, y, and z\n\t\t\ty = i % (size * size) / size;\n\t\t\tz = i % (size * size) % size;\n\t\t\t// spaces each block out by 1\n\t\t\tif (x%2 == 1 && y%2 == 1 && z%2 == 1) {\n\t\t\t\tmaze.add(new Block (x, y, z, ' ')); // 'w' means wall\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tmaze.add(new Block (x, y, z, 'w'));\n\t\t\t\tif (x > 0 && y > 0 && z > 0 && x < size-1 && y < size-1 && z < size-1) { // if the blocks are within the outer shell, add the blocks to the list of walls to check\n\t\t\t\t\tif (x%2+y%2+z%2 == 2)copyToCheck.add(new Integer[] {x, y, z});\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if (x > 0 && y > 0 && z > 0 && x < size-1 && y < size-1 && z < size-1) { // checks if the coordinates are within the smaller cube that is below the first layer.\n\t\t\t\t//copyToCheck.add(new Integer[] { x, y, z });\t// the Block coords left to check\n\t\t\t//}\n\t\t}\n\t\t\n\t\tint starty, startx, startz; // x, y and z of current block\n\t\tstartz = 0; // the starting block will be at z = 0 because that is the bottom-most layer\n\n\t\tstartx = ((int)(Math.random() * (size/2)))*2 + 1; \n\t\tstarty = ((int)(Math.random() * (size/2)))*2 + 1;\n\t\tstart = get(startx, starty, startz);\n\t\t\n\t\tint endx, endy, endz; // x, y and z of end block\n\t\tendx = ((int)(Math.random() * (size/2)))*2 + 1; \n\t\tendy = ((int)(Math.random() * (size/2)))*2 + 1;\n\t\tendz = size-1;\n\t\tend = get(endx, endy, endz);\n\t\t\n\t\tArrayList<Integer[]> toCheck;\n\t\tboolean removed = true;\n\t\twhile (removed) {\n\t\t\tremoved = false;\n\t\t\ttoCheck = new ArrayList<Integer[]> ();\n\t\t\tfor (Integer[] thing : copyToCheck) {\n\t\t\t\ttoCheck.add(thing);\n\t\t\t}\n\t\t\tCollections.shuffle(toCheck); // Randomizes the order of the list of coordinates to check.\n\t\t\tfor (Integer[] coords : toCheck) {\n\t\t\t\tBlock curr = get(coords[0], coords[1], coords[2]);\n\t\t\t\tArrayList<Block> neighbors = getAdj(curr);\n\t\t\t\tboolean isJoint = false;\n\t\t\t\t\tfor (int i = 0; i < neighbors.size() - 1 && !isJoint; i++) {\n\t\t\t\t\t\tfor (int j = i+1; j < neighbors.size(); j++) {\n\t\t\t\t\t\t\tif (neighbors.get(j).t == ' ')\n\t\t\t\t\t\t\t\tif (neighbors.get(i).tree == neighbors.get(j).tree) {\n\t\t\t\t\t\t\t\t\tisJoint = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isJoint) { // Even if it doesn't matter too much, don't want to spend a bunch of time iterating through the stuff unless I have too.\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\tif (!isJoint) {\n\t\t\t\t\t\tremoved = true;\n\t\t\t\t\t\tcopyToCheck.remove(coords);\n\t\t\t\t\t\tjoin(curr); // Joins all of the sets, changes the type of the block.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\tArrayList<Block> t = new ArrayList<Block>();\n\t\tfor (int i = 0; i < 5*size; i++) {\n\t\t\tArrayList<Block> b = getWalls();\n\t\t\t\n\t\t\tint rand = (int)(Math.random()*b.size());\n\t\t\tint x = b.get(rand).x;\n\t\t\tint y = b.get(rand).y;\n\t\t\tint z = b.get(rand).z;\n\t\t\tset(x, y, z, new Trap (x, y, z));\n\t\t}\n\t\tstart.t = ' '; // sets the type of the start and end blocks\n\t\tend.t = 'e';\n\t}", "public void setTestBoard() {\n\n /*game.setNode(new NodeImp(\"2,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"2,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"3,2\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"3,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));\n\n game.setNode(new NodeImp(\"4,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"5,5\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));*/\n\n }", "public void gameOfLife(int[][] board) {\n int m = board.length;\n int n = board[0].length;\n\n int[][] nextGeneration = new int[m][n];\n\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n int liveNeighbors = countLiveNeighbors(board, i, j, m, n);\n\n if (board[i][j] == 1) {\n if (liveNeighbors < 2 || liveNeighbors > 3) {\n nextGeneration[i][j] = 0;\n } else {\n nextGeneration[i][j] = 1;\n }\n } else {\n if (liveNeighbors == 3) {\n nextGeneration[i][j] = 1;\n }\n }\n }\n }\n\n for (int i = 0; i < m; i++) {\n System.arraycopy(nextGeneration[i], 0, board[i], 0, n);\n }\n }" ]
[ "0.729535", "0.71419805", "0.7115022", "0.70346516", "0.70220214", "0.69841003", "0.689586", "0.6751395", "0.6734576", "0.6712145", "0.67093754", "0.6707481", "0.666104", "0.6656446", "0.66335106", "0.655725", "0.65533245", "0.65429884", "0.6533386", "0.6459129", "0.6457506", "0.6445664", "0.64301187", "0.6402338", "0.6400915", "0.63469416", "0.6346686", "0.6342607", "0.6338714", "0.6330746", "0.63092875", "0.63051224", "0.62805796", "0.6275937", "0.62717474", "0.6268055", "0.6261981", "0.624945", "0.6246333", "0.62287074", "0.6225059", "0.6220229", "0.6219479", "0.6219376", "0.6209783", "0.62069225", "0.620065", "0.618465", "0.6179379", "0.61758506", "0.6164767", "0.61646134", "0.6160116", "0.6142649", "0.6142231", "0.6139952", "0.6129298", "0.61287737", "0.6127187", "0.61239994", "0.6087743", "0.6084202", "0.60602164", "0.6059244", "0.6050751", "0.6050062", "0.6044486", "0.6043293", "0.6038544", "0.60336226", "0.6030341", "0.60290444", "0.60226727", "0.60199046", "0.6003596", "0.59927464", "0.5992429", "0.59846294", "0.5980015", "0.5979294", "0.59761596", "0.5974969", "0.59727186", "0.59613127", "0.5958674", "0.5954071", "0.59538954", "0.59509826", "0.59475094", "0.59468335", "0.5944825", "0.5944061", "0.59433526", "0.59407836", "0.5933096", "0.59299135", "0.5929778", "0.5928624", "0.59243155", "0.5922671" ]
0.71453047
1
allows GameOfLifeGraphics to get values of grid
public static int[][] GetValues() { return gridValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GameObject[][] getGrid(){\n\t\t\r\n\t\treturn this.grid;\r\n\t}", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "@Override\n public Tile[][] getGrid() { return grid; }", "public int[][] getGrid()\n {\n return grid;\n }", "public Grid grid() { return grid; }", "public List<Square> getSquareGrid();", "public boolean onGrid(int xValue, int yValue);", "public Cell[][] getGrid() {\n return grid;\n }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "public Box[][] getGrid() {\n return this.grid;\n }", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "public int getGridRows() \n { \n return gridRows; \n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "public void updateGridX();", "public Grid generateGrid(){\n myGrid = new RectGrid();\n myStates = new HashMap<>();\n\n for(int row = 0; row < imageHeight; row++){\n for(int column = 0; column < imageWidth; column++){\n int color = myImage.getRGB(column, row);\n int blue = color & 0xff;\n int green = (color & 0xff00) >> 8;\n int red = (color & 0xff0000) >> 16;\n\n int stateValue = color*-1;\n System.out.println(stateValue);\n //int stateValue = Integer.parseInt(hex, 16);\n //System.out.println(stateValue);\n\n Cell myCell = new RPSCell();\n myCell.setState(stateValue);\n myGrid.placeCell(row, column, myCell);\n\n Color myColor = Color.rgb(red, green, blue);\n myStates.put(stateValue, myColor);\n }\n }\n return myGrid;\n }", "private void displayGrid() {\r\n System.out.print(this.grid);\r\n }", "private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Square[][] getGrid() {\n\t\treturn this.grid;\n\t}", "public int getGridColumns() \n { \n return gridColumns; \n }", "public int[] getCurrentPieceGridPosition() {\n\t\treturn currentPieceGridPosition; \n\t}", "protected void computeGridParameters() {\n float padding = 0.02f * overlay.getScalingValue();\n boolean flipX = x2 < x1;\n float xx1 = flipX ? (x1 + padding) : (x1 - padding);\n float xx2 = flipX ? (x2 - padding) : (x2 + padding);\n boolean flipY = y2 < y1;\n float yy1 = flipY ? (y1 + padding) : (y1 - padding);\n float yy2 = flipY ? (y2 - padding) : (y2 + padding);\n \n xGrid1 = xx1; yGrid1 = yy1;\n xGrid2 = xx2; yGrid2 = yy1;\n xGrid3 = xx1; yGrid3 = yy2;\n xGrid4 = xx2; yGrid4 = yy2;\n horizGridCount = 3; vertGridCount = 3;\n }", "public GridPane getGrid(){\n\t\treturn myGrid;\n\t}", "public char getGrid(int x ,int y){\n\t\treturn Grid[x][y] ;\n\t}", "public void displayGrid ()\n {\n for (int i = 0; i < getDimX(); i++) {\n System.out.print(\"[ \");\n for (int y = 0; y < getDimY(); y++) {\n System.out.print(m_grid[i][y]);\n System.out.print(\" \");\n }\n System.out.println(\"]\");\n }\n }", "public boolean getGrid(int x, int y){\n\t\treturn grid[x][y];\n\t}", "public boolean getGrid(int x, int y) {\n\t\tif ((x < 0) || (x > width)) {\n\t\t\treturn true;\n\t\t} else if ((y < 0) || (y > height)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn grid[x][y]; // YOUR CODE HERE\n\t\t}\n\t}", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }", "public GridDisplay getGrid(){\n\t\treturn this.display.gridDisplay;\n\t\t//return this.grid;\n\t}", "public ArrayList<MahjongSolitaireTile>[][] getTileGrid() \n { \n return tileGrid; \n }", "public Grid getGrid() {\n return myGrid;\n }", "protected BattleGrid getGrid() {\n return grid;\n }", "public int[][] getRawGrid()\n\t{\n\t\treturn grid;\n\t}", "public Creature[][] getGrid()\n\t{\n\t\treturn grid;\n\t}", "public Grid getGrid()\n {\n \treturn puzzle;\n }", "public Grid getGrid() {\n \t\treturn grid;\n \t}", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "public InventoryRange getGrid() {\n \t\treturn this.grid;\n \t}", "public interface Grid {\n /**\n * @name getCell\n * @desc Ritorna la cella specificata dai parametri.\n * @param {int} x - Rappresenta la coordinata x della cella.\n * @param {int} y - Rappresenta la coordinata y della cella.\n * @returns {Client.Games.Battleship.Types.Cell}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell getCell(int x, int y);\n /**\n * @name getHeigth\n * @desc Ritorna l'altezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getHeight();\n /**\n * @name getLength\n * @desc Ritorna la lunghezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getLength();\n /**\n * @name Equals\n * @desc Ritorna true se i grid sono uguali.\n * @returns {boolean}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public boolean equals(Grid grid);\n /**\n * @name getGrid\n * @desc Ritorna la la griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell [][] getCells();\n}", "public void displayGrid()\n {\n\t\t\n\tfor (int y=0; y<cases.length; y++)\n\t{\n for (int x=0; x<cases[y].length; x++)\n {\n\t\tSystem.out.print(\"|\"+cases[y][x].getValue());\n }\n System.out.println(\"|\");\n\t}\n }", "public abstract Grid<?> getGrid();", "public void renderBoard(){\n for (int k = 0; k < grid.length; k++)\n for (int m = 0; m < grid[k].length; m++)\n grid[k][m] = 0;\n\n // fill the 2D array using information for non-empty tiles\n for (Cell c : game.getNonEmptyTiles())\n grid[c.getRow()][c.getCol()] = c.getValue();\n }", "public void updateGridY();", "@Override\r\n\tpublic Integer getCell(Integer x, Integer y) {\n\t\treturn game[x][y];\r\n\t}", "public void fillGamePanel() {\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n gridPanel.add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n }", "protected abstract void paintGrid(Graphics2D g);", "public TetrisGrid getGrid()\r\n\t{\r\n\t\treturn grid;\r\n\t}", "boolean hasGrid();", "public void printGrid(){\n System.out.println(\"printing the grid\");\n for(int i=0;i<row_size;i++){\n for(int j = 0;j<col_size;j++){\n System.out.println(grid[i][j]);\n }\n }\n }", "private static void drawGrid(int[][] grid) {\n BufferStrategy buf = canvas.getBufferStrategy();\n Graphics g = buf.getDrawGraphics();\n\n g.clearRect(0, 0, (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n g.setColor(pallette[grid[i][j]]);\n g.fillRect(WINDOW_MARGINS + (CELL_SIZE * i), WINDOW_MARGINS + (CELL_SIZE * j), CELL_SIZE, CELL_SIZE);\n }\n }\n\n if (!buf.contentsLost()) buf.show();\n g.dispose();\n }", "public GridAlg getGrid() {\n\t\treturn grid;\n\t}", "void draw(Graphics g)\n {\n int aliveCount = 0, deadCount = 0;\n\n boolean[][] gridArray = grid.getGrid();\n for(int row = 0; row < gridArray.length; row++){\n for(int col = 0; col < gridArray[row].length; col++){\n if(gridArray[row][col]){\n if(grid.isInverted()) {\n g.setColor(Color.white);\n } else {\n g.setColor(Color.black);\n }\n aliveCount++;\n } else {\n if(grid.isInverted()) {\n g.setColor(Color.black);\n } else {\n g.setColor(Color.white);\n }\n deadCount++;\n }\n g.fillRect(col * (grid.getCellSize() + grid.getCellInnerGap()) + grid.getCellOuterGap() , row * (grid.getCellSize() + grid.getCellInnerGap()) + grid.getCellOuterGap(), grid.getCellSize(), grid.getCellSize());\n }\n }\n\n UserInterface.infoLabel.setText(\"<html><center>Generation: \" + grid.getGeneration() + \"</center>Alive: \" + aliveCount + \" ; Dead: \" + deadCount + \"</html>\");\n }", "private void renderGrid(Graphics g, int width, int height, GridLocation gridPosition){\n g.setColor(Color.GRAY);\n for(int x = 0; x < width; x++){\n for(int y = 0; y < height; y++){\n g.drawRect(gridPosition.getX() + x * CELL_SIZE, gridPosition.getY() + y*CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n }\n }", "protected BoardGrid getGrid() {\n return GameController.getInstance().getGrid();\n }", "public GridPane initializeGridPane() {\n\t\tGridPane world = new GridPane();\n\t\t\n\t\tfor (int x = 0; x < this.columns; x++) {\n\t\t\tfor (int y = 0; y < this.rows; y++) {\n\t\t\t\tRectangle cellGUI = new Rectangle(this.widthOfCells - 1, this.heightOfCells - 1);\n\t\t\t\tcellGUI.setFill(Color.web(\"#FFFFFF\"));\t\t// White cell background color\n cellGUI.setStroke(Color.web(\"#C0C0C0\")); \t// Grey cell border color\n cellGUI.setStrokeWidth(1); \t\t\t\t\t// Width of the border\n\n world.add(cellGUI, x, y);\n this.cellGUIArray[x][y] = cellGUI;\n\n cellGUI.setOnMouseClicked((event) -> {\n \tthis.currentGeneration = this.simulation.getCurrentGeneration();\n for (int i = 0; i < columns; i++) {\n for (int j = 0; j < rows; j++) {\n if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 0) {\n this.currentGeneration[i][j] = 1;\n } else if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 1) {\n this.currentGeneration[i][j] = 0;\n }\n }\n }\n this.simulation.setCurrentGeneration(this.currentGeneration);\n });\n\t\t\t}\n\t\t}\n\t\treturn world;\n\t}", "public Pawn[][] getBoardGrid() {\n\t\treturn boardGrid;\n\t}", "public visibleObject[][] getVisibility() {\n\n\t\tvisibleObject visiblility[][] = new GridCell.visibleObject[2 * visionRange + 1][2 * visionRange + 1];\n\t\tGridCell[][] cellArray = MazeGame.worldGraph.cellArray;\n\n\t\tfor (int i = (-visionRange); i < visionRange + 1; i++) {\n\t\t\tfor (int j = (-visionRange); j < visionRange + 1; j++) {\n\n\t\t\t\tGridCell cell = MazeGame.worldGraph.cellArray[currentCell.rowIndex + i][currentCell.columnIndex + j];\n\n\t\t\t\tfor (int k = currentCell.rowIndex - visionRange; k < currentCell.rowIndex + visionRange + 1; k++) {\n\t\t\t\t\tfor (int l = (currentCell.columnIndex - visionRange); l < currentCell.columnIndex + visionRange\n\t\t\t\t\t\t\t+ 1; l++) {\n\n\t\t\t\t\t\tif (!cellArray[k][l].hasEastEdge) {\n\n\t\t\t\t\t\t\tBoolean isIntersected = isIntersected(\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + j + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.rowIndex + i + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + 0.5, \n\t\t\t\t\t\t\t\t\tcurrentCell.rowIndex + 0.5, \n\t\t\t\t\t\t\t\t\tcellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex, \n\t\t\t\t\t\t\t\t\tcellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex + 1);\n\n\t\t\t\t\t\t\tif (isIntersected != null) {\n\t\t\t\t\t\t\t\tif (isIntersected.booleanValue()) {\n\t\t\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.NULL;\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\t\n\t\t\t\t\t\tif (!cellArray[k][l].hasSouthEdge) {\n\n\t\t\t\t\t\t\tBoolean isIntersected = isIntersected(currentCell.columnIndex + j + 0.5, currentCell.rowIndex + i + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + 0.5, currentCell.rowIndex + 0.5, cellArray[k][l].columnIndex,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex +1 , cellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex + 1);\n\n\t\t\t\t\t\t\tif (isIntersected != null) {\n\t\t\t\t\t\t\t\tif (isIntersected.booleanValue()) {\n\t\t\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.NULL;\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\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tif(visiblility[i + visionRange][j + visionRange] != visibleObject.NULL){\n//\n//\t\t\t\t\tif (cell.cheese != null) {\n//\t\t\t\t\t\tif (cell.jerry != null) {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.JERRY_AND_CHEESE;\n//\t\t\t\t\t\t} else if (cell.tom != null) {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.TOM_AND_CHEESE;\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.CHEESE;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} else if (cell.jerry != null) {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.JERRY;\n//\t\t\t\t\t} else if (cell.tom != null) {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.TOM;\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.EMPTY_SPACE;\n//\t\t\t\t\t}\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.visiblility = visiblility;\n\t\treturn visiblility;\n\t}", "public String toString ()\n\t{\n\t\tString s = \"Grid:\\n\";\n\t\tfor (int row=0; row<GRID_SIZE; row++)\n\t\t{\n\t\t\tfor (int col=0; col<GRID_SIZE; col++) {\n\t\t\t\ts = s + grid[col][row].value()+ \" \";\n\t\t\t}\n\t\t\ts += \"\\n\";\n\t\t}\n\t\treturn s;\n\t}", "public GridPane getGrid() {\n return grid;\n }", "public static int getGridPosition(int x, int y, int width){\n\t\treturn (y*width)+x;\n\t}", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "private int matrixRowToGridVal(int i) \n {\n return i % gDim + 1;\n }", "public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }", "@Override\n protected void drawGrid(Graphics2D g2, int startPos, int rightEdgePos, int bottomEdgePos, int start,\n int nrows1, int ncols1, int gridOffset) {}", "void setGridX(int i);", "public int[] getGridAt(int mouseX, int mouseY) {\n\n int gridX = (int) Math.floor((mouseX + OFFSET_HOZ - EMBOSS/2.0)/(double)P_SCALE);\n int gridY = (int) Math.floor((mouseY + OFFSET_VERT - EMBOSS/2.0)/(double)P_SCALE);\n\n return new int[]{gridX, gridY};\n }", "public int getGridWidth() { return gridWidth; }", "public int getGridX() {\r\n\t\treturn gridX;\r\n\t}", "public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void drawGrid()\n {\n noStroke();\n for(int i = 0; i < xCells; i++)\n {\n for(int j = 0; j < yCells; j++)\n {\n if(pattern[i][j])\n fill(0);\n else\n fill(255);\n rect(firstCellPosition[0]+i*cellSize,firstCellPosition[1]+j*cellSize,cellSize-1,cellSize-1);\n }\n }\n }", "default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }", "private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}", "public void printGrid() {\n // Creation of depth Z\n for (int d = 0; d < grid[0][0].length; d++) {\n System.out.println(\"\");\n int layer = d + 1;\n System.out.println(\"\");\n System.out.println(\"Grid layer: \" + layer);\n // Creation of height Y\n for (int h = 1; h < grid.length; h++) {\n System.out.println(\"\");\n // Creation of width X\n for (int w = 1; w < grid[0].length; w++) {\n if (grid[h][w][d] == null) {\n System.out.print(\" . \");\n } else {\n String gridContent = grid[h][w][d];\n char identifier = gridContent.charAt(0);\n\n int n = 0;\n if(grid[h][w][d].length() == 3) {\n n = grid[h][w][d].charAt(2) % 5;\n } else if (grid[h][w][d].length() == 2) {\n n = grid[h][w][d].charAt(1)%5;\n }\n if(n == 0) n = 6;\n\n // Labelling\n if (identifier == 'G' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'G') {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n } else if (identifier == 'L' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'L') {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n }\n }\n }\n }\n }\n System.out.println(\"\");\n }", "public GameCell[] getBoardCells(){\r\n return this.boardCells;\r\n }", "GameBoard(){\r\n int i, j;\r\n char first = '0';\r\n grid = new char[yMax][xMax];\r\n\r\n grid[0][0] = ' ';\r\n\r\n //labels rows\r\n for(i = 1; i < yMax; i++){\r\n j = 0;\r\n grid[i][j] = first;\r\n first++;\r\n }\r\n\r\n //labels columns\r\n first = '0';\r\n for(j = 1; j < xMax; j++){\r\n i = 0;\r\n if(j % 2 == 0) {\r\n grid[i][j] = first;\r\n first++;\r\n }\r\n else\r\n grid[i][j] = ' ';\r\n }\r\n\r\n //separates squares with '|'\r\n for(i = 1; i < yMax; i++){\r\n for(j = 1; j < xMax; j++){\r\n if(j % 2 != 0)\r\n grid[i][j] = '|';\r\n else\r\n grid[i][j] = ' ';\r\n }\r\n }\r\n }", "private void setCellGrid(){\n count=0;\n status.setText(\"Player 1 Move\");\n field = new ArrayList<>();\n for (int i=0; i< TwoPlayersActivity.CELL_AMOUNT; i++) {\n field.add(new Cell(i));\n }\n }", "public List<Grid> getGrids() {\n\tList<Grid> grids = new ArrayList<Grid>();\n\tList<Line> currentLines = _path;\n\twhile(currentLines.size()>1) {\n\t Grid grid = new Grid();\n\t grids.add(grid);\n\t List<Line> nonOverlappingLines = grid.overlapping(currentLines);\n\t \t \n\t Double[] xs = grid.xs();\n\t Double[] ys = grid.ys();\n\t \n\t if (xs.length>3 && ys.length>3) {\n\t\tDouble minx = xs[0];\n\t\tDouble maxx = xs[xs.length-1];\n\t\t\n\t\tDouble miny = ys[0];\n\t\tDouble maxy = ys[ys.length-1];\n\t\t\n\t\tfor(int i=0; i<xs.length; i++) {\n\t\t System.out.println(\"Line: \" + xs[i].toString() + \",\" + miny.toString() + \",\" + xs[i].toString() + \",\" + maxy.toString());\n\t\t}\n\t\tfor(int i=0; i<ys.length; i++) {\n\t\t System.out.println(\"Line: \" + minx.toString() + \",\" + ys[i].toString() + \",\" + maxx.toString() + \",\" + ys[i].toString());\n\t\t}\n\t }\n\n\t currentLines = nonOverlappingLines;\n\t}\n\treturn grids;\n }", "public Grid getEntrance(){\n\t\treturn getpos((byte)2);\n\t}", "private void drawBackgroundGrid(Canvas canvas) {\n Resources resources = getResources();\n Drawable backgroundCell = resources.getDrawable(R.drawable.cell_rectangle);\n // Outputting the game grid\n for (int xx = 0; xx < game.numSquaresX; xx++) {\n for (int yy = 0; yy < game.numSquaresY; yy++) {\n int sX = startingX + gridWidth + (cellSize + gridWidth) * xx;\n int eX = sX + cellSize;\n int sY = startingY + gridWidth + (cellSize + gridWidth) * yy;\n int eY = sY + cellSize;\n\n drawDrawable(canvas, backgroundCell, sX, sY, eX, eY);\n }\n }\n }", "public void initializeGrid() {\n resetGrid(_lifeGrid);\n\n _lifeGrid[8][(WIDTH / 2) - 1] = 1;\n _lifeGrid[8][(WIDTH / 2) + 1] = 1;\n _lifeGrid[9][(WIDTH / 2) - 1] = 1;\n _lifeGrid[9][(WIDTH / 2) + 1] = 1;\n _lifeGrid[10][(WIDTH / 2) - 1] = 1;\n _lifeGrid[10][(WIDTH / 2)] = 1;\n _lifeGrid[10][(WIDTH / 2) + 1] = 1;\n\n }", "public void updateDisplay()\n {\n //Step 3\n\t Color color = null;\n //Hint - use a nested for loop\n\t for(int row = 0; row < grid.length; row++)\n\t {\n\t\t for(int col = 0; col < grid[0].length; col++)\n\t\t {\n\t\t\t if(grid[row][col] == EMPTY)\n\t\t\t {\n\t\t\t\t color = Color.BLACK;\n\t\t\t }\n\t\t\t else if(grid[row][col] == METAL)\n\t\t\t {\n\t\t\t\t color = Color.GRAY;\n\t\t\t }\n\t\t\t else if(grid[row][col] == SAND)\n\t\t\t {\n\t\t\t\t color = new Color(204, 186, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == WATER)\n\t\t\t {\n\t\t\t\t color = new Color(7, 125, 116);\n\t\t\t }\n\t\t\t else if(grid[row][col] == HELIUM)\n\t\t\t {\n\t\t\t\t color = Color.WHITE;\n\t\t\t }\n\t\t\t else if(grid[row][col] == BOUNCE)\n\t\t\t {\n\t\t\t\t color = new Color(255, 0, 200);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VIRUS)\n\t\t\t {\n\t\t\t\t color = new Color(153, 51, 204);\n\t\t\t }\n\t\t\t else if(grid[row][col] == FIRE)\n\t\t\t {\n\t\t\t\t color = new Color(229, 64, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VINE)\n\t\t\t {\n\t\t\t\t color = new Color(45, 102, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == TELEPORT)\n\t\t\t {\n\t\t\t\t color = new Color(255, 255, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == LASER)\n\t\t\t {\n\t\t\t\t color = new Color(245, 50, 41);\n\t\t\t }\n\t\t\t display.setColor(row, col, color);\n\t\t }\n\t }\n\t \n }", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }", "public void show(Graphics g) {\n for (int row = 0; row < grid.length; row++) { //iterate through the array\r\n for (int col = 0; col < grid[0].length; col++) {\r\n if (grid[row][col]==true) //if the value is \"alive\"\r\n {\r\n g.setColor(Color.black); //display black square\r\n } else {\r\n g.setColor(Color.white); //otherwise display white square\r\n }\r\n g.fillRect(col * 5 + 2, row * 5 + 2, 5, 5); // fill the square in\r\n }\r\n }\r\n }", "public Move getGridElement (int row, int column)\n {\n return mGrid[row][column];\n }", "private void createGraphics() {\n\t\toppStatGrid = new GridPane();\n\t\toppStatGrid.setHgap(5);\n\t\tColumnConstraints columnOpp1 = new ColumnConstraints();\n\t\tcolumnOpp1.setMinWidth(gameScene.getWidth()*0.3);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnOpp2 = new ColumnConstraints();\n\t\tcolumnOpp2.setMinWidth(gameScene.getWidth()*0.3);\n\t\toppStatGrid.getColumnConstraints().addAll(columnOpp1,columnOpp2);\n\t\tRowConstraints rowOpp = new RowConstraints();\n\t\trowOpp.setMinHeight(gameScene.getHeight()*0.1);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\n\t\tlocStatGrid = new GridPane();\n\t\tlocStatGrid.setHgap(5);\n\t\tColumnConstraints columnLoc1 = new ColumnConstraints();\n\t\tcolumnLoc1.setMinWidth(gameScene.getWidth()*0.1);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnLoc2 = new ColumnConstraints();\n\t\tcolumnLoc2.setMinWidth(gameScene.getWidth()*0.3);\n\t\tlocStatGrid.getColumnConstraints().addAll(columnLoc1,columnLoc2);\n\t\tRowConstraints rowLoc2 = new RowConstraints();\n\t\trowLoc2.setMinHeight(gameScene.getHeight()*0.1);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\n\t\topponentName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\tlocalName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\topponentLevel.setFont(Font.font(defaultFont, 14));\n\t\tlocalLevel.setFont(Font.font(defaultFont, 14));\n\t\topponentHealth.setFont(Font.font(defaultFont, 14));\n\t\tlocalHealth.setFont(Font.font(defaultFont, 14));\n\n\t\topponentName.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localName, HPos.RIGHT);\n\t\topponentLevel.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalLevel.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localLevel, HPos.RIGHT);\n\t\topponentHealth.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalHealth.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localHealth, HPos.RIGHT);\n\n\t\topponentHealthBar = new Rectangle();\n\t\tlocalHealthBar = new Rectangle();\n\t\topponentHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\tlocalHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\topponentHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\tlocalHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\topponentHealthBar.setArcWidth(5);\n\t\topponentHealthBar.setArcHeight(5);\n\t\tlocalHealthBar.setArcWidth(5);\n\t\tlocalHealthBar.setArcHeight(5);\n\t\t/*NumberBinding oppHealthBind = gameScene.property\n\t\topponentHealthBar.prop*/\n\n\t\topponentHealthBar.setEffect(new Lighting());\n\t\tlocalHealthBar.setEffect(new Lighting());\n\n\t\topponentHealthBar.setFill(Color.DARKRED);\n\t\tlocalHealthBar.setFill(Color.DARKRED);\n\n\t\toppStatGrid.add(opponentName, 0, 0);\n\t\toppStatGrid.add(opponentLevel, 1, 0);\n\t\toppStatGrid.add(opponentHealthBar, 0, 1);\n\t\toppStatGrid.add(opponentHealth, 1, 1);\n\n\t\tlocStatGrid.add(localLevel, 0, 0);\n\t\tlocStatGrid.add(localName, 1, 0);\n\t\tlocStatGrid.add(localHealthBar, 1, 1);\n\t\tlocStatGrid.add(localHealth, 0, 1);\n\n\t\tAnchorPane.setTopAnchor(oppStatGrid, 10.0);\n\t\tAnchorPane.setLeftAnchor(oppStatGrid, 10.0);\n\n\t\tAnchorPane.setBottomAnchor(locStatGrid, 10.0);\n\t\tAnchorPane.setRightAnchor(locStatGrid, 10.0);\n\n\t\tthis.getChildren().addAll(oppStatGrid,locStatGrid);\n\t\t\n\t\toppPane = new Pane();\n\t\toppPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\toppPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tlocPane = new Pane();\n\t\tlocPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\tlocPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tAnchorPane.setBottomAnchor(locPane, 10.0);\n\t\tAnchorPane.setLeftAnchor(locPane, 10.0);\n\t\t\n\t\tAnchorPane.setTopAnchor(oppPane, 10.0);\n\t\tAnchorPane.setRightAnchor(oppPane, 10.0);\n\t\t\n\t\tthis.getChildren().addAll(locPane,oppPane);\n\t\t\n\n\t}", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "private void drawGrid(Graphics2D graphics, int x, int y,\n int width, int height)\n {\n graphics.setPaint(Color.black);\n\n // the columns\n graphics.setStroke(new BasicStroke(2));\n int agentGUISize = Parameters.getAgentGUISize();\n for (int row = 0; row < width / agentGUISize; row++)\n graphics.drawLine(x + (row * agentGUISize), y, \n x + (row * agentGUISize), y + height - 1);\n\n // the rows\n for (int col = 0; col < height / agentGUISize; col++){\n graphics.drawLine(x, y + (col * agentGUISize),\n x + width - 1, y + (col * agentGUISize));\n }\n \n // the border\n graphics.drawLine(x, y, x, y + height);\n graphics.drawLine(x, y, x + width, y);\n graphics.drawLine(x + width, y, x + width, y + height);\n graphics.drawLine(x, y + height, x + width, y + height);\n graphics.setStroke(new BasicStroke());\n }", "public final Paint getGridPaint() {\n return gridPaint;\n }", "public void printGrid()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "@Override\n\tpublic String toString() {\n\t\tString countCell = \"\";\n\t\tfor ( int row = 0; row < gameGrid.length; row++){\n\t\t\tfor ( int column = 0; column < gameGrid[0].length; column++){\n\t\t\t\tif(gameGrid[row][column] == 1) //this represents a live cell or exist\n\t\t\t\t\tcountCell = countCell + \"0\"; \n\t\t\t\telse{\n\t\t\t\t\tcountCell = countCell + \".\";//this will create little dots if there is no live cell...\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tcountCell = countCell + \"\\n\"; //creates a new line and moves down in the array\n\t\t}\n\n\t\treturn countCell;\n\t}", "void printGrid() {\n\t\tSystem.out.println();\n\t\tfor (int row = 0; row < moleGrid.length; row++) {\n\t\t\tfor (int col = 0; col < moleGrid[row].length; col++) {\n\t\t\t\tSystem.out.print(moleGrid[row][col] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public Color getGridColor() {\n return this.gridColor;\n }", "public MazeRoom[][] generate() {\n\t\tgenerate(theGrid[0][0]);\n\t\treturn theGrid;\n\t}", "public void printCountGrid() {\n\n System.out.println(\"AI count grid :\");\n for (int i = this.boardSize.x - 1; i >= 0; i--) {\n for (int j = 0; j < this.boardSize.y; j++) {\n System.out.print(this.countGrid[i][j] + \" \");\n }\n System.out.println(\"\");\n }\n }", "public Grid() { //Constructs a new grid and fills it with Blank game objects.\r\n\t\tthis.grid = new GameObject[10][10];\r\n\t\tthis.aliveShips = new Ships[4];\r\n\t\tfor (int i = 0; i < this.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.grid[i].length; j++) {\r\n\t\t\t\tthis.grid[i][j] = new Blank(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "public void printCells()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n System.out.println(\"Columns: \" + columns + \"Row: \" + rows + \" \" + cellGrid[columns][rows].isAlive());\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "@Override\n public void printGrid(){\n for(int row = 0; row < rows; row++){\n System.out.print(\"\\n\");\n if(row==0){\n char row_char='A';\n System.out.print(\" |\");\n for(int i=0; i<rows; i++){\n System.out.print(\"[\" + row_char + \"]\");\n row_char++;\n }\n System.out.print(\"\\n\");\n System.out.print(\"---|\");\n for(int i=0; i<rows;i++){\n System.out.print(\"---\");\n }\n System.out.print(\"\\n\");\n }\n\n for(int column = 0; column < columns; column++){\n if (column==0){System.out.print(\"[\"+row+\"]|\");}\n System.out.print(grid[row][column]);\n }\n }\n }", "public void createGrid() {\r\n generator.generate();\r\n }", "public abstract boolean getCell(int x, int y);" ]
[ "0.72352445", "0.69467", "0.6937755", "0.6932786", "0.6843223", "0.68273205", "0.67677987", "0.6760044", "0.67455405", "0.67012703", "0.66779804", "0.6664596", "0.66453767", "0.66108733", "0.6543766", "0.6528118", "0.6524882", "0.6521714", "0.6520721", "0.65073395", "0.64799595", "0.64608216", "0.64538395", "0.64522225", "0.6447522", "0.64456075", "0.6431297", "0.64267755", "0.6410968", "0.6401015", "0.63997996", "0.63903546", "0.6389142", "0.6377387", "0.63657826", "0.63375217", "0.6330747", "0.63245326", "0.63187814", "0.6316236", "0.62994766", "0.6296497", "0.6290022", "0.627971", "0.62705785", "0.62694526", "0.6264031", "0.6257951", "0.6252766", "0.6238836", "0.6233418", "0.6212824", "0.62103313", "0.6209486", "0.6200403", "0.61813897", "0.6181161", "0.6172003", "0.61485815", "0.6148124", "0.6131476", "0.6128038", "0.61274254", "0.6125479", "0.61192083", "0.61159325", "0.6106305", "0.60998243", "0.6096046", "0.60932016", "0.60882294", "0.60804904", "0.6066762", "0.60614985", "0.60591775", "0.60461223", "0.6030651", "0.6030324", "0.6028595", "0.6027077", "0.60266876", "0.602371", "0.6018401", "0.6016178", "0.6007464", "0.60051256", "0.6004519", "0.5998412", "0.5993458", "0.5993235", "0.5978316", "0.59732234", "0.59680784", "0.5955994", "0.59460026", "0.5939434", "0.5939331", "0.5936569", "0.59325725", "0.5930076" ]
0.6292892
42
allows GameOfLifeGraphics to get size of grid
public static int GetSize() { return gridSize.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int getSize() {\n\t\treturn gridSize;\r\n\t}", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public int getGridWidth() { return gridWidth; }", "public int getWidth(){\r\n\t\treturn grid.length;\r\n\t}", "public short getGridSize() {\n\t\treturn gridSize;\n\t}", "public GridSize getGridSize()\n {\n return this.gridSize.clone();\n }", "@Override\n\tpublic int size() {\n\t\treturn grid.length;\n\t}", "public int getGridDimensions() {\n return GRID_DIMENSIONS;\n }", "int getTileSize();", "public int getHeight(){\r\n\t\treturn grid[0].length;\r\n\t}", "Dimension getSize();", "Dimension getSize();", "public int getBoardSize(){\n\t\treturn grids.getRows();\n\t}", "private double getCellSize() {\n double wr = canvas.getWidth() / board.getWidth();\n double hr = canvas.getHeight() / board.getHeight();\n\n return Math.min(wr, hr);\n }", "public Dimension getPreferredSize()\n {\n return new Dimension(m_grid.length,m_grid[0].length);\n }", "int getBoardSize() {\n return row * column;\n }", "protected Integer getGridHeight () {\n\t\treturn null ; \n\t}", "public int getSize() {\n return rows * cols;\n }", "public int getGridRows() \n { \n return gridRows; \n }", "public int getGridColumns() \n { \n return gridColumns; \n }", "public Dimension getPreferredSize()\n {\n return new Dimension(gridWidth * GRID_VIEW_SCALING_FACTOR,\n gridHeight * GRID_VIEW_SCALING_FACTOR);\n }", "public synchronized int getOpponentGridSize() {\n\t\treturn this.compPlayerGrid.getCompletedWordList().size();\n\t}", "public int getCellSize()\n {\n return cellSize;\n }", "public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}", "public Dimension getPreferredSize()\n {\n return new Dimension(gridWidth * GRID_VIEW_SCALING_FACTOR,\n gridHeight * GRID_VIEW_SCALING_FACTOR);\n }", "int getGameFieldSize();", "boolean hasGrid();", "public static int getTileSize(){\n\t\treturn tileDim;\n\t}", "public int getCellSize(){\n return cellSize;\n }", "int getAreaSize();", "public int getSize(){\n\treturn Cells.size();\n }", "public abstract boolean currentSizeVSCageSize(int row, int col);", "public int getGraphicsWidth(Graphics g);", "int getCellsCount();", "private float ScreenWidth() {\n RelativeLayout linBoardGame = (RelativeLayout) ((Activity) context).findViewById(R.id.gridContainer);\n Resources r = linBoardGame.getResources();\n DisplayMetrics d = r.getDisplayMetrics();\n return d.widthPixels;\n }", "public int getCellsUniverseSize(){\r\n return cellsUniverse.size();\r\n }", "public Dimension getSize() { return new Dimension(width,height); }", "private void calc_screen_size(){\r\n \tscn_grid.setFont(scn_font);\r\n \tscn_context = scn_grid.getFontRenderContext();\r\n \t scn_layout = new TextLayout(\"X\",scn_font,scn_context);\r\n scn_char_rect = scn_layout.getBlackBoxBounds(0,1).getBounds();\r\n scn_char_height = (int) (scn_char_rect.getHeight()); // RPI 630 was Width in err, 6 to *1.5\r\n \tscn_char_base = scn_char_height/2+1;\r\n \tscn_char_height = scn_char_height + scn_char_base+2;\r\n scn_char_width = (int) (scn_char_rect.getWidth()); // RPI 630 was Height in err\r\n \tscn_height = scn_rows * scn_char_height; // RPI 408 + 5 \r\n \tscn_width = scn_cols * scn_char_width + 3; // RPI 408 + 5 \r\n \tscn_size = new Dimension(scn_width,scn_height);\r\n \tscn_image = new BufferedImage(scn_width,scn_height,BufferedImage.TYPE_INT_ARGB);\r\n \tscn_grid = scn_image.createGraphics();\r\n \tscn_grid.setFont(scn_font); \r\n scn_grid.setColor(scn_text_color);\r\n \t scn_context = scn_grid.getFontRenderContext();\r\n scn_grid.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "private void setGridSize() {\n int width = Math.max(boardView.windowWidth(), buttonPanel.getWidth());\n\n int height = points.getHeight() + boardView.windowHeight() + buttonPanel.getHeight();\n\n setSize(width, height);\n }", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "public int getGraphicsHeight(Graphics g);", "Dimension getCanvasDimension();", "public int winSize() { return winSize; }", "public int getxlength(){ \n return numcols*boxsize;\n }", "int numberOfDimensions();", "public int getActualWidthInTiles() {\n return getWidth() / getActualTileWidth();\n }", "public int getTileWidth() {\n return 8;\n }", "public Dimension getCellSize() {\r\n if (board.getWidth() == 0 || board.getHeight() == 0)\r\n return new Dimension(0,0);\r\n return new Dimension(getWidth()/board.getWidth(), getHeight()/board.getHeight());\r\n }", "public Dimension getSize()\n {\n return new Dimension(300, 150);\n }", "public static int size() {\n return cells.size();\n }", "public int getWidth() {\n return getTileWidth() * getWidthInTiles();\n }", "public int getActualTileWidth() {\n return 32;\n }", "private int squareWidth() {\n return (int) getSize().getWidth() / BOARD_WIDTH;\n }", "public abstract Dimension getSize();", "public int getSize() {\n return board.getSize();\n }", "public int geomDim();", "public int getCartogramGridSizeInX ()\n\t{\n\t\treturn mCartogramGridSizeX;\n\t}", "private int squareHeight() {\n return (int) getSize().getHeight() / BOARD_HEIGHT;\n }", "public int size() {\r\n return cells.size();\r\n }", "protected int getBoardSize(){\n\t\treturn boardSize;\n\t}", "public abstract Regionlike getGridBounds();", "private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public int getNumRows(){\n return HEIGHT;\n }", "public void drawGrid() {\r\n\t\tsetLayout(new GridLayout(getSize_w(), getSize_h()));\r\n\t\tfor (int i = 0; i < getSize_h(); i++) {\r\n\t\t\tfor (int j = 0; j < getSize_w(); j++) {\r\n\t\t\t\tcity_squares[i][j] = new Gridpanel(j, i);\r\n\t\t\t\tadd(city_squares[i][j]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public int getStorageSize() {\n int nCells = nRows * nCols;\n return 16 + 8 * nCells;\n }", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "public int size() {\n\treturn slices*rows*columns;\n}", "int getBoundsHeight();", "public int getActualHeightInTiles() {\n return getHeight() / getActualTileHeight();\n }", "Dimension[] getSizes();", "public abstract int getDimension();", "public XYPoint getMapSize();", "int getDimensionsCount();", "public GameObject[][] getGrid(){\n\t\t\r\n\t\treturn this.grid;\r\n\t}", "public int getGameSize() {\r\n\t\treturn this.gameSize;\r\n\t}", "protected abstract void paintGrid(Graphics2D g);", "public int grHeight() { return height; }", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }", "public void printCountGrid() {\n\n System.out.println(\"AI count grid :\");\n for (int i = this.boardSize.x - 1; i >= 0; i--) {\n for (int j = 0; j < this.boardSize.y; j++) {\n System.out.print(this.countGrid[i][j] + \" \");\n }\n System.out.println(\"\");\n }\n }", "Dimension getDimensions();", "private void drawGrid(Graphics2D graphics, int x, int y,\n int width, int height)\n {\n graphics.setPaint(Color.black);\n\n // the columns\n graphics.setStroke(new BasicStroke(2));\n int agentGUISize = Parameters.getAgentGUISize();\n for (int row = 0; row < width / agentGUISize; row++)\n graphics.drawLine(x + (row * agentGUISize), y, \n x + (row * agentGUISize), y + height - 1);\n\n // the rows\n for (int col = 0; col < height / agentGUISize; col++){\n graphics.drawLine(x, y + (col * agentGUISize),\n x + width - 1, y + (col * agentGUISize));\n }\n \n // the border\n graphics.drawLine(x, y, x, y + height);\n graphics.drawLine(x, y, x + width, y);\n graphics.drawLine(x + width, y, x + width, y + height);\n graphics.drawLine(x, y + height, x + width, y + height);\n graphics.setStroke(new BasicStroke());\n }", "public static native void OpenMM_AmoebaMultipoleForce_getPmeGridDimensions(PointerByReference target, PointerByReference gridDimension);", "public Dimension getPreferredSize()\n{ \n Dimension d=new Dimension(gRectangle.width+2*GC_CANVAS_HORIZ_GAP,\n gRectangle.height+2*GC_CANVAS_VERT_GAP);\n return d;\n}", "private void displayGrid() {\r\n System.out.print(this.grid);\r\n }", "public void resizeGrid() {\n resizeGrid(getWidth(),getHeight());\n }", "BigInteger getDimension();", "public int getDeformationGridSize ()\n\t{\n\t\treturn mDeformationGridSize;\n\t\t\n\t}", "public int[][] getGrid()\n {\n return grid;\n }", "@Test\n public void testNumCellsSpreadingFromInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0, 0.5);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n\n assertEquals(2, coloniser.getNumCellsColonisedFromInsideGrid(LscapeLayer.Oak));\n assertEquals(1, coloniser.getNumCellsColonisedFromInsideGrid(LscapeLayer.Pine));\n assertEquals(1, coloniser.getNumCellsColonisedFromInsideGrid(LscapeLayer.Deciduous));\n }", "public void fillGamePanel() {\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n gridPanel.add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "public Grid grid() { return grid; }", "protected void computeGridParameters() {\n float padding = 0.02f * overlay.getScalingValue();\n boolean flipX = x2 < x1;\n float xx1 = flipX ? (x1 + padding) : (x1 - padding);\n float xx2 = flipX ? (x2 - padding) : (x2 + padding);\n boolean flipY = y2 < y1;\n float yy1 = flipY ? (y1 + padding) : (y1 - padding);\n float yy2 = flipY ? (y2 - padding) : (y2 + padding);\n \n xGrid1 = xx1; yGrid1 = yy1;\n xGrid2 = xx2; yGrid2 = yy1;\n xGrid3 = xx1; yGrid3 = yy2;\n xGrid4 = xx2; yGrid4 = yy2;\n horizGridCount = 3; vertGridCount = 3;\n }", "public Vector2i getActualSizeInTiles() {\n return new Vector2i(getActualWidthInTiles(), getActualHeightInTiles());\n }", "public Dimension getPreferredSize() {\r\n Dimension dimension = graphX.getDimension();\r\n\r\n int width = dimension.width;\r\n int height = dimension.height;\r\n\r\n int i;\r\n\r\n for (i = 0; width > i * ((GraphBuilder) getFrameParent()).getMiniMap().getWidth(); i++) {\r\n }\r\n width = i * ((GraphBuilder) getFrameParent()).getMiniMap().getWidth();\r\n\r\n for (i = 0; height > i * ((GraphBuilder) getFrameParent()).getMiniMap().getHeight(); i++) {\r\n }\r\n height = i * ((GraphBuilder) getFrameParent()).getMiniMap().getHeight();\r\n\r\n /* Size conditions */\r\n if (width < MIN_WIDTH) {\r\n width = MIN_WIDTH;\r\n } else if (width > MAX_WIDTH) {\r\n width = MAX_WIDTH;\r\n }\r\n /* Size conditions */\r\n if (height < MIN_HEIGHT) {\r\n height = MIN_HEIGHT;\r\n } else if (height > MAX_HEIGHT) {\r\n height = MAX_HEIGHT;\r\n }\r\n\r\n // System.out.println(width + \" / \" + height);\r\n\r\n return new Dimension(width, height);\r\n }", "int getCurrentDimension() {\n if (!playerExists())\n return lastdim;\n return game.h.m;\n }", "public abstract int getPuzzleLengthSize();", "private void renderGrid(Graphics g, int width, int height, GridLocation gridPosition){\n g.setColor(Color.GRAY);\n for(int x = 0; x < width; x++){\n for(int y = 0; y < height; y++){\n g.drawRect(gridPosition.getX() + x * CELL_SIZE, gridPosition.getY() + y*CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n }\n }", "public int getTileHeight() {\n return 8;\n }" ]
[ "0.7833804", "0.7607244", "0.7509249", "0.73789674", "0.7292877", "0.7291244", "0.72249705", "0.7204282", "0.71130353", "0.70436984", "0.6982772", "0.6982772", "0.6939516", "0.69150865", "0.6888716", "0.6827264", "0.68272066", "0.6783681", "0.67350566", "0.66889", "0.66631955", "0.66594243", "0.66467947", "0.66341525", "0.6605", "0.65976596", "0.65904576", "0.6567398", "0.65312505", "0.65200555", "0.6503441", "0.646072", "0.6452614", "0.6444424", "0.64122385", "0.63990015", "0.63879627", "0.6374144", "0.63733506", "0.6366351", "0.6349929", "0.63467896", "0.63127226", "0.63117903", "0.6309187", "0.63049865", "0.62996525", "0.6296932", "0.6259973", "0.6257684", "0.6248469", "0.62473774", "0.6243223", "0.62426", "0.62285966", "0.6228001", "0.6217839", "0.6201644", "0.6190356", "0.6182364", "0.61816806", "0.6174875", "0.6174602", "0.6172282", "0.61592764", "0.6156304", "0.614889", "0.6145851", "0.6141942", "0.6140805", "0.6132659", "0.61193097", "0.61184675", "0.6115061", "0.6109581", "0.6107176", "0.6106751", "0.61045635", "0.61035633", "0.6096826", "0.6095675", "0.60938776", "0.60937285", "0.6089392", "0.6081584", "0.6078136", "0.6074837", "0.6070389", "0.60647285", "0.60597616", "0.60566866", "0.605178", "0.60400844", "0.6036312", "0.6036162", "0.6029433", "0.6029158", "0.6013193", "0.5998956", "0.59988105" ]
0.7088706
9
/ this method counts the number of neighbors each cell has. it utilizes modular arithmetic to treat the side columns as neighbors to each other, and the top and bottom rows as neighbors
public static int checkAlive(int i, int j) { int counter = 0; for (int a = -1; a < 2; a++) { for(int b = -1; b < 2; b++) { int columnValue = (i + a + gridSize.getValue()) % gridSize.getValue(); int rowValue = (j + b + gridSize.getValue()) % gridSize.getValue(); counter += gridValues[columnValue][rowValue]; } } counter -= gridValues[i][j]; return counter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void countCells() {\n\t\tvisitedCells = 0;\n\t\ttotalCells = 0;\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\ttotalCells++;\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tvisitedCells++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int neighborCount(int row, int col) {//these are your current positions\n\t\tint neighborCell = 0;\n\t\t//array is zero based index\n\n\t\t//down one or row down one\n\t\tif(cellAt((row + 1) % rowCount, col)) //lets say our arrayCell is arrayCell(4,4)\n\t\t\tneighborCell++;\t\t\t\t\t\t// row here is your current cell(this is where you start and put your cell) and you add + 1 \n\t\t\t\t\t\t\t\t\t\t\t\t//lets say row is 1 then it is 1+1 = 2 \n\t\t\t\t\t\t\t\t\t\t\t\t//then 2 % 4(rowCount is 4) = 2\n\t\t\t\t\t\t\t\t\t\t\t\t//then your row is 2 and column 1\n\t\t\n\t\t//row up one\n\t\tif(cellAt((row + rowCount - 1) % rowCount , col))\n\t\t\tneighborCell++;\n\n\t\t//column right or column + 1\n\t\tif(cellAt(row, (col + 1)% colCount))\n\t\t\tneighborCell++;\n\n\t\t//column left or column -1\n\t\tif(cellAt(row,(col + colCount -1)% colCount))\n\t\t\tneighborCell++;\n\n\t\t//row up one and column right one\n\t\tif(cellAt((row + rowCount - 1) % rowCount,(col + 1)% colCount ))\n\t\t\tneighborCell++;\n\n\t\t//row down one and column right \n\t\tif(cellAt((row + 1) % rowCount,(col + 1)% colCount)) \n\t\t\tneighborCell++;\n\n\t\t//row down one and column left\n\t\tif(cellAt((row + 1) % rowCount,(col + colCount -1)% colCount)) \n\t\t\tneighborCell++;\n\n\t\t//row up one and column left\n\t\tif(cellAt((row + rowCount - 1) % rowCount, (col + colCount -1)% colCount))\n\t\t\tneighborCell++;\n\n\t\treturn neighborCell;\n\n\t}", "protected static int countNeighbours(int i, int j, byte[][] currentGen){\n int count = 0;\n \n for(int x = i-1; x<i+2; x++){\n count+=checkBorders(x, j-1, currentGen);\n count+=checkBorders(x, j+1, currentGen);\n }\n count+=checkBorders(i-1, j, currentGen);\n count+=checkBorders(i+1, j, currentGen);\n\n return count;\n }", "protected int countNeighbours(int col, int row){\n int Total = 0;\r\n Total = getCell(col-1,row-1)? ++Total : Total;\r\n Total = getCell(col,row-1)? ++Total : Total;\r\n Total = getCell(col+1,row-1)? ++Total : Total;\r\n Total = getCell(col-1,row)? ++Total : Total;\r\n Total = getCell(col+1,row)? ++Total : Total;\r\n Total = getCell(col-1,row+1)? ++Total : Total;\r\n Total = getCell(col,row+1)? ++Total : Total;\r\n Total = getCell(col+1,row+1)? ++Total : Total;\r\n return Total;\r\n }", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "protected abstract int countNeighbors(int x, int y);", "public void populateNeighbors(Cell[][] cells) {\n\t\tint limitHoriz = cells[0].length;\n\t\tint limitVert = cells.length;\n\t\t// above left\n\t\tif (myRow > 0 && myRow < limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) {\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t\t// ADD 8 cells to neighbors (see the diagram from the textbook)\n\t\t\t}\n\t\t\tif (myCol == 0) { // left edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow+1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // right edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow -1][myCol]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == 0) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // top edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol -1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // top left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // top right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // bottom edge\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // bottom left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // bottom right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t}\n\t\t}\n\t}", "public int countNeighbours() {\n\t\tint count = 0;\n\t\tif (this.hasNeighbour(0))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(1))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(2))\n\t\t\tcount++;\n\t\treturn count;\n\t}", "@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math.max(col - 1, 0), colFinish = Math.min(col + 1, grid[0].length - 1);\n\n for (int curRow = rowStart; curRow <= rowFinish; curRow++) {\n for (int curCol = colStart; curCol <= colFinish; curCol++) {\n if (grid[curRow][curCol].getType() == Tile.MINE) count++;\n }\n }\n return count;\n }", "private int getNeighbours(Cell cell) {\n\n //Get the X, Y co-ordinates of the cell\n int cellX = cell.getXCord();\n int cellY = cell.getYCord();\n\n // Helper variable initially set to check all neighbours.\n int[][] neighbourCords = allCords;\n\n //Checks what location the cell is and which of its neighbours to check\n //This avoids any array out of bounds issues by trying to look outside the grid\n if (cellX == 0 && cellY == 0) {\n neighbourCords = topLeftCords;\n } else if (cellX == this.width - 1 && cellY == this.height - 1) {\n neighbourCords = bottomRightCords;\n } else if (cellX == this.width - 1 && cellY == 0) {\n neighbourCords = topRightCords;\n } else if (cellX == 0 && cellY == this.height - 1) {\n neighbourCords = bottomLeftCords;\n } else if (cellY == 0) {\n neighbourCords = topCords;\n } else if (cellX == 0) {\n neighbourCords = leftCords;\n } else if (cellX == this.width - 1) {\n neighbourCords = rightCords;\n } else if (cellY == this.height - 1) {\n neighbourCords = bottomCords;\n }\n\n // Return the number of neighbours\n return searchNeighbours(neighbourCords, cellX, cellY);\n }", "private int nextColumnNeighbours(Cell[][] cells, int i, int j) {\n\t\tint no = 0;\n\t\tif (cells[i - 1][j].isAlive())\n\t\t\tno++;\n\t\tif (cells[i + 1][j].isAlive())\n\t\t\tno++;\n\t\tif (cells[i - 1][j + 1].isAlive())\n\t\t\tno++;\n\t\tif (cells[i][j + 1].isAlive())\n\t\t\tno++;\n\t\tif (cells[i + 1][j + 1].isAlive())\n\t\t\tno++;\n\t\treturn no;\n\t}", "@Override\n\tpublic List<Cell> calcNeighbors(int row, int col) {\n\t\tList<Cell> neighborLocs = new ArrayList<>();\n\t\tint shift_constant = 1 - 2*((row+col) % 2);\n\t\tif(!includesDiagonals) {\n\t\t\tfor(int a = col - 1; a <= col + 1; a++) {\n\t\t\t\tif(a == col)\n\t\t\t\t\taddLocation(row + shift_constant,a,neighborLocs);\n\t\t\t\telse \n\t\t\t\t\taddLocation(row,a,neighborLocs);\n\t\t\t}\n\t\t\treturn neighborLocs;\n\t\t}\n\t\tfor(int b = col - 2; b <= col + 2; b++) {\n\t\t\tfor(int a = row; a != row + 2*shift_constant; a += shift_constant) {\n\t\t\t\tif(a == row && b == col)\n\t\t\t\t\tcontinue;\n\t\t\t\taddLocation(a,b,neighborLocs);\n\t\t\t}\n\t\t}\n\t\tfor(int b = col -1; b <= col + 1; b++) {\n\t\t\taddLocation(row - shift_constant,b,neighborLocs);\n\t\t}\n\t\treturn neighborLocs;\n\t}", "private int liveNeighbours(int i,int j) {\n\t\tint count = 0;\n\t\tif (button[i - 1][j - 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i - 1][j].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i - 1][j + 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i][j - 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i][j + 1].getBackground() == Color.yellow){\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][ j - 1].getBackground() == Color.yellow){\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][j].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][j + 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "int getCellsCount();", "private int previousColumnNeighbours(Cell[][] cells, int i, int j) {\n\t\tint no = 0;\n\t\tif (cells[i - 1][j].isAlive())\n\t\t\tno++;\n\t\tif (cells[i + 1][j].isAlive())\n\t\t\tno++;\n\t\tif (cells[i - 1][j - 1].isAlive())\n\t\t\tno++;\n\t\tif (cells[i][j - 1].isAlive())\n\t\t\tno++;\n\t\tif (cells[i + 1][j - 1].isAlive())\n\t\t\tno++;\n\t\treturn no;\n\t}", "public int getNumAdjacentLivingCells(int row, int col) \n {\n int numLiving = 0;\n\n if (row - 1 >= 0 && col - 1 >= 0 && isAlive(getCell(row - 1, col - 1))) \n {\n numLiving++;\n }\n if (row - 1 >= 0 && isAlive(getCell(row - 1, col))) \n {\n numLiving++;\n }\n if (row - 1 >= 0 && col + 1 < getColumns() && isAlive(getCell(row - 1, col + 1))) \n {\n numLiving++;\n }\n if (col - 1 >= 0 && isAlive(getCell(row, col - 1))) \n {\n numLiving++;\n }\n if (col + 1 < getColumns() && isAlive(getCell(row, col + 1))) \n {\n numLiving++;\n }\n if (row + 1 < getRows() && col - 1 >= 0 && isAlive(getCell(row + 1, col - 1))) \n {\n numLiving++;\n }\n if (row + 1 < getRows() && isAlive(getCell(row + 1, col)))\n {\n numLiving++;\n }\n if (row + 1 < getRows() && col + 1 < getColumns() && isAlive(getCell(row + 1, col + 1))) \n {\n numLiving++;\n }\n return numLiving;\n }", "private int nextLineNeighbours(Cell[][] cells, int i, int j) {\n\t\tint no = 0;\n\t\tif (j != 0) {\n\t\t\tif (cells[i][j - 1].isAlive())\n\t\t\t\tno++;\n\t\t\tif (cells[i + 1][j - 1].isAlive())\n\t\t\t\tno++;\n\t\t}\n\t\tif (j != cells.length - 1) {\n\t\t\tif (cells[i][j + 1].isAlive())\n\t\t\t\tno++;\n\t\t\tif (cells[i + 1][j + 1].isAlive())\n\t\t\t\tno++;\n\t\t}\n\t\tif (cells[i + 1][j].isAlive())\n\t\t\tno++;\n\t\treturn no;\n\t}", "private int getNeighborCount(int x, int y, Assignment assignment){\n\t\tint neighbors = 0;\n\n\t\t// try neighbor up\n\t\tif(isNeighborAt(x-1, y, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor up-left\n\t\tif(isNeighborAt(x-1, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor up-right\n\t\tif(isNeighborAt(x-1, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down\n\t\tif(isNeighborAt(x+1, y, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down-left\n\t\tif(isNeighborAt(x+1, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down-right\n\t\tif(isNeighborAt(x+1, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor left\n\t\tif(isNeighborAt(x, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor right\n\t\tif(isNeighborAt(x, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\treturn neighbors;\n\t}", "private static boolean isCellAlive(int[][] coordinates, int row, int column) {\n\t\tboolean cellAlive = coordinates[row][column] == 1;\r\n\t\tint numberOfNeighbours = 0;\r\n\t\t//check one to the right of col\r\n\t\tif (coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one to the left of col\r\n\t\tif (coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one above col\r\n\t\tif (coordinates.length > row - 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one below col\r\n\t\tif (coordinates.length > row + 1) {\r\n\t\t\tif (coordinates[row + 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top left diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column - 1 && row - 1 >= 0 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top right diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column + 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom left diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row + 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom right diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row + 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t System.out.println(\"Number of neighbours for \" + row + \", \" + column\r\n\t\t + \" was \" + numberOfNeighbours);\r\n\t\t//if the number of neighbours was 2 or 3, the cell is alive\r\n\t\tif ((numberOfNeighbours == 2) && cellAlive) {\r\n\t\t\treturn true;\r\n\t\t} else if (numberOfNeighbours == 3) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }", "private int neighborBombCount(Tile t) {\r\n int tileRow = t.getRow();\r\n int tileCol = t.getCol();\r\n int bombCount = 0;\r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) { \r\n if (grid[r][c].isBomb()) {\r\n bombCount++;\r\n } \r\n }\r\n }\r\n }\r\n return bombCount; \r\n }", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private int getNeighbours(Container[][][] buffer) {\n int neighbours = 0;\n if (indexPosition.x + 1 < buffer.length && buffer[(int) indexPosition.x + 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.x - 1 >= 0 && buffer[(int) indexPosition.x - 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y + 1 < buffer[0].length && buffer[(int) indexPosition.x][(int) indexPosition.y + 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y - 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.z + 1 < buffer[0][0].length && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z + 1] != null) {\n neighbours++;\n }\n if (indexPosition.z - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z - 1] != null) {\n neighbours++;\n }\n return neighbours;\n }", "static int numberAmazonTreasureTrucks(int rows, int column,\n\t\t\t\t\t\t\t\t List<List<Integer> > grid)\n {\n // WRITE YOUR CODE HERE\n int count = 0;\n for(int i=0;i<rows;i++) {\n for(int j=0;j<column;j++) {\n if(grid.get(i).get(j) == 1) {\n count++;\n markNeighbours(grid, i, j, rows, column);\n }\n }\n }\n return count;\n }", "private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "private int numIslands_dfs(char[][] grid) {\n int m = grid.length;\n int n = grid[0].length;\n \n // 很多解法是将grid[i][j] 设置成0,这样也可以,只是会改变输入,可以讨论。\n boolean[] visited = new boolean[m * n]; // 这里就不用map了,一个一维数组就可以。\n \n int numOfIslands = 0;\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; ++j) {\n if (grid[i][j] == '1' && !visited[i * n + j]) {\n ++ numOfIslands;\n dfs(grid, i, j, visited);\n }\n }\n }\n return numOfIslands;\n }", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "void updateCellNumbers() {\n cells.stream().forEach(row -> row.stream().filter(cell -> !cell.isMine()).forEach(cell -> {\n int numNeighbouringMines =\n (int) getNeighboursOf(cell).stream().filter(neighbour -> neighbour.isMine()).count();\n cell.setNumber(numNeighbouringMines);\n }));\n }", "public static int numIslands(char[][] grid) {\n int row = grid.length;\n int col = grid[0].length;\n int ans = 0;\n boolean[][] visited = new boolean[row][col];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n if (!visited[i][j] && grid[i][j] == '1') {\n dfs(grid, visited, i, j);\n ans++;\n }\n visited[i][j] = true;\n }\n }\n return ans;\n }", "public int sameNeighborCount(int x, int y) {\n\t\tint radius = 1;\n\t\tint count = 0;\n\t\tint posX, posY;\n\t\tCell c, me;\n\n\t\tme = cells[x + (y * gridX)];\n\n\t\tfor (int nx = -radius; nx <= radius; nx++) {\n\t\t\tposX = x + nx;\n\t\t\tif (posX < 0 || posX >= gridX) {\n\t\t\t\t// out of bounds\n\t\t\t} else {\n\t\t\t\tfor (int ny = -radius; ny <= radius; ny++) {\n\t\t\t\t\t// skip myself\n\t\t\t\t\tif (nx != 0 && ny != 0) {\n\t\t\t\t\t\tposY = y + ny;\n\t\t\t\t\t\tif (posY < 0 || posY >= gridY) {\n\t\t\t\t\t\t\t// out of bounds\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// valid position\n\t\t\t\t\t\t\t// make sure the cell has the same color and is active\n\t\t\t\t\t\t\tc = cells[posX + (posY * gridX)];\n\t\t\t\t\t\t\tif (c.cellColor == me.cellColor && c.isActive) {\n\t\t\t\t\t\t\t\tcount++;\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\n\t\treturn count;\n\t}", "public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }", "private int getAliveNeighboursCount (int line, int column) {\n assert isInUniverse(line,column);\n// System.out.println(\"getAliveNeighboursCount for \"+line+column);\n int aliveNeighbours = 0;\n// System.out.println(\"->\"+(line-1)+\"|\"+(column-1));\n if (isInUniverse((line-1),(column-1))) if (getCell((line-1),(column-1))) aliveNeighbours++; // -1/-1\n if (isInUniverse((line-1), column) ) if (getCell((line-1), column)) aliveNeighbours++; // -1/0\n if (isInUniverse((line-1),(column+1))) if (getCell((line-1),(column+1))) aliveNeighbours++; // -1/+1\n if (isInUniverse( line ,(column-1))) if (getCell( line ,(column-1))) aliveNeighbours++; // 0/-1\n if (isInUniverse( line ,(column+1))) if (getCell( line ,(column+1))) aliveNeighbours++; // 0/+1\n if (isInUniverse((line+1),(column-1))) if (getCell((line+1),(column-1))) aliveNeighbours++; // +1/-1\n if (isInUniverse((line+1), column) ) if (getCell((line+1), column)) aliveNeighbours++; // +1/0\n if (isInUniverse((line+1),(column+1))) if (getCell((line+1),(column+1))) aliveNeighbours++; // +1/+1\n// System.out.println(\"getAliveNeighboursCount done\");\n return aliveNeighbours;\n }", "public int numIslands(char[][] grid) {\n\n int n = grid.length;\n if(n==0)\n return 0;\n int m = grid[0].length;\n if(m==0)\n return 0;\n \n int ans =0;\n for(int i=0;i<n;i++)\n {\n m = grid[i].length;\n for(int j=0;j<m;j++)\n {\n if(grid[i][j]=='1')\n {\n ans++;\n dfs(grid,i,j,n,m);\n }\n }\n }\n return ans;\n }", "public int numIslands(boolean[][] grid) {\n m = grid.length;\n if (m == 0) return 0;\n n = grid[0].length;\n if (n == 0) return 0;\n \n int ans = 0;\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (!grid[i][j]) continue;\n ans++;\n dfs(grid, i, j);\n }\n }\n return ans;\n }", "private void checkEdges() {\n\n //Check for alive cells on right hand side\n for (int y = 0; y < height; y++) {\n if (getCell(this.width - 1, y).isAlive()) {\n grid = increaseWidthRight(grid);\n break;\n }\n }\n\n //Check for alive cells on left side\n for (int y = 0; y < height; y++) {\n if (getCell(0, y).isAlive()) {\n grid = increaseWidthLeft(grid);\n break;\n }\n }\n\n // Check for alive cells at bottom\n for (int x = 0; x < width; x++) {\n if (getCell(x, this.height - 1).isAlive()) {\n grid = increaseHeightBottom(grid);\n break;\n }\n }\n\n //Check for alive cells at top\n for (int x = 0; x < width; x++) {\n if (getCell(x, 0).isAlive()) {\n grid = increaseHeightTop(grid);\n break;\n }\n }\n\n }", "public int numIslands(char[][] grid) {\n if (grid == null || grid.length == 0) \n return 0;\n \n int count = 0;\n int nr = grid.length;\n int nc = grid[0].length;\n\n for (int r = 0; r < nr; r++) {\n for (int c = 0; c < nc; c++) {\n if (grid[r][c] == '1') {\n count++;\n dfs(grid, r, c);\n }\n }\n }\n return count;\n }", "private int previousLineNeighbours(Cell[][] cells, int i, int j) {\n\t\tint no = 0;\n\t\tif (j != 0) {\n\t\t\tif (cells[i][j - 1].isAlive())\n\t\t\t\tno++;\n\t\t\tif (cells[i - 1][j - 1].isAlive())\n\t\t\t\tno++;\n\t\t}\n\t\tif (j != cells.length - 1) {\n\t\t\tif (cells[i][j + 1].isAlive())\n\t\t\t\tno++;\n\t\t\tif (cells[i - 1][j + 1].isAlive())\n\t\t\t\tno++;\n\t\t}\n\t\tif (cells[i - 1][j].isAlive())\n\t\t\tno++;\n\t\treturn no;\n\t}", "private int[][] genBlackAdjacentTilesCount(char[][] lobby) {\n int[][] neighborsCount = new int[lobby.length][lobby[0].length];\n\n for (int i = 0; i < lobby.length; i++) {\n for (int j = 0; j < lobby[0].length; j++) {\n List<AxialCoordinates> neighbors = findNeighbors(i, j);\n int blackCount = 0;\n for (AxialCoordinates coo : neighbors) {\n if (coo.rAxialCoordinate > 0 && coo.qAxialCoordinate > 0\n && coo.qAxialCoordinate < lobby.length && coo.rAxialCoordinate < lobby[0].length) {\n if (lobby[coo.qAxialCoordinate][coo.rAxialCoordinate] == 'b') {\n blackCount++;\n }\n }\n }\n neighborsCount[i][j] = blackCount;\n }\n// System.out.println();\n }\n return neighborsCount;\n }", "int getMergedCellCount();", "public void countAdjacentMines()\n {\n adjacentMines = 0;\n for (GameSquare square : getAdjacentSquares())\n {\n if (square.mine)\n {\n adjacentMines++;\n }\n }\n }", "public static int numIslands(char[][] mat) {\r\n \r\n if(mat.length == 0 || mat[0].length == 0)\r\n \treturn 0;\r\n\r\n ROW = mat.length;\r\n\t\tCOL = mat[0].length;\r\n\r\n\t\t// Make a boolean matrix that will keep track whether a cell is visited or not\r\n\t\tboolean[][] visited = new boolean[ROW][COL];\r\n\t\t\r\n\t\t// We start counting the total number of DFS calls.\r\n\t\tint count = 0;\r\n\r\n\t\tfor (int i = 0; i < ROW; i++) \r\n\t\t{\r\n\t\t\tfor (int j = 0; j < COL; j++) \r\n\t\t\t{\r\n\t\t\t\t// If the cell is unvisited and is Land (1) check its neighbors by calling DFS()\r\n\t\t\t\t// This cell will be marked as visited in this process.\r\n\t\t\t\t// This cell will make a recursive call to each of their own 8 neighbors.\t\r\n\t\t\t\t// The base case of that recursion will be when all nodes of the subgraph have been visited\r\n\t\t\t\tif(mat[i][j] == '1' && !visited[i][j])\r\n\t\t\t\t{\r\n\t\t\t\t\tDFS(mat, i, j, visited);\r\n\r\n\t\t\t\t\t// After the above call is finished, a lot more 1s would've been converted into 0s.\r\n\t\t\t\t\t// Now the next time the above condition will be true will be when there is a disconnected 1 found.\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn count;\r\n }", "public int getCellsCount() {\n return cells_.size();\n }", "public int numIslands(char[][] grid) {\n int noOfRows = grid.length;\n int noOfCols = grid[0].length;\n int islands = 0;\n for (int row = 0; row < noOfRows; row++) {\n for (int col = 0; col < noOfCols; col++) {\n if (grid[row][col] == '1') {\n islands++;\n dfs(grid,row,col);\n }\n }\n }\n return islands;\n }", "public int numIslands(char[][] grid) {\n int m = grid.length;\n if (m == 0) {\n return 0;\n }\n int n = grid[0].length;\n char[][] map = new char[m][n];\n int[][] visit = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n map[i][j] = grid[i][j];\n\n int count = 0;\n\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++) {\n if (grid[i][j] == '1' && visit[i][j] == 0) {\n count++;\n findIsland(map, visit, i, j);\n }\n }\n\n return count;\n }", "@Test\n public void testNeighbors() {\n\n // Make a bigger nanoverse.runtime.geometry than the one from setUp\n Lattice lattice = new TriangularLattice();\n hex = new Hexagon(lattice, 3);\n Boundary boundary = new Arena(hex, lattice);\n Geometry geometry = new Geometry(lattice, hex, boundary);\n\n Coordinate query;\n\n // Check center\n query = new Coordinate2D(2, 2, 0);\n assertNeighborCount(6, query, geometry);\n\n // Check corner\n query = new Coordinate2D(0, 0, 0);\n assertNeighborCount(3, query, geometry);\n\n // Check side\n query = new Coordinate2D(1, 0, 0);\n assertNeighborCount(4, query, geometry);\n }", "public int numIslands(char[][] grid) {\n\t int noOfIslands = 0;\n\t if(grid.length == 0) return 0;\n\t boolean[] [] visited = new boolean[grid.length][grid[0].length];\n\t \n\t for(int i=0;i<grid.length;i++){\n\t for(int j=0;j<grid[0].length;j++){\n\t if(visited[i][j] == false && grid[i][j]=='1'){\n\t gatherIslandNodes(visited, grid, i, j);\n\t noOfIslands++;\n\t }\n\t \n\t }\n\t }\n\t return noOfIslands;\n\t }", "public void checkNeighbours(int row, int column)\r\n {\r\n int counter = 0;\r\n //*************************************************\r\n //Following code was adapted from Harry Tang 2015-04-27\r\n for (int columnNeighbours = column - 1; columnNeighbours <= column + 1; columnNeighbours ++)\r\n {\r\n for (int rowNeighbours = row - 1; rowNeighbours <= row + 1; rowNeighbours ++)\r\n {\r\n try \r\n {\r\n if (cellGrid[columnNeighbours][rowNeighbours].isAlive()\r\n && cellGrid[columnNeighbours][rowNeighbours] != cellGrid[column][row])\r\n {\r\n counter ++;\r\n }\r\n }\r\n catch (IndexOutOfBoundsException e)\r\n {\r\n // do nothing\r\n }\r\n } // end of for (int y = indexY - 1; y == indexY; y++)\r\n } // end of for (int x = indexX - 1; x == indexX; x++)\r\n //*************************************************\r\n \r\n decisionOnCellState(counter, row, column);\r\n }", "public int getNumberOfEmptyCells() {\n\t\tint numberOfCellsToFill = 81;\n\t\tfor (byte i = 0; i < 9; i++) {\n\t\t\tfor (byte j = 0; j < 9; j++) {\n\t\t\t\tif (!cells[i][j].isEmpty()) {\n\t\t\t\t\tnumberOfCellsToFill--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberOfCellsToFill;\n\t}", "public Collection<N> neighbors();", "public void initializeNeighbors() {\n\t\tfor (int r = 0; r < getRows(); r++) {\n\t\t\tfor (int c = 0; c < getCols(); c++) {\n\t\t\t\tList<Cell> nbs = new ArrayList<>();\n\t\t\t\tinitializeNF(shapeType, r, c);\n\t\t\t\tmyNF.findNeighbors();\n\t\t\t\tfor (int[] arr : myNF.getNeighborLocations()){\n\t\t\t\t\tif (contains(arr[0], arr[1])){\n\t\t\t\t\t\tnbs.add(get(arr[0], arr[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tget(r, c).setNeighbors(nbs);\n\t\t\t}\n\t\t}\n\t}", "private int surroundingMines(int x, int y) {\r\n int startingX, startingY, endingX, endingY;\r\n int count = 0;\r\n \r\n // putting condition for edges\r\n startingX = startEdgeConditon(x);\r\n startingY = startEdgeConditon(y);\r\n endingX = endEdgeConditon(x);\r\n endingY = endEdgeConditon(y);\r\n \r\n // check surrounding cells\r\n for (int i = startingX; i < endingX; i++) {\r\n for (int j = startingY; j < endingY; j++) {\r\n if (mines[i][j]) {\r\n count++;\r\n }\r\n }\r\n }\r\n return count;\r\n }", "public void checkCellStatus()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n checkNeighbours(rows, columns);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "private int diagonalCount() {\n\t\treturn Math.abs(destRow-curRow) > Math.abs(destCol-curCol) ?\n\t\t\t Math.abs(destCol-curCol) : Math.abs(destRow-curRow);\n\t}", "public abstract int getNeighboursNumber(int index);", "public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}", "public int numIslands(char[][] grid){\n int count = 0;\n for (nt i = 0; i < grid.length; i++){\n for (int j = 0; j < grid[0].length; j++){\n if (grid[i][j] == '1'){\n dfs(grid, i, j);\n count++;\n }\n }\n }\n return count;\n}", "public int countEmptyCells()\n\t{\n\t\tint count = 0;\n\t\tfor(int i=0;i<this.numberOfRows;i+=1)\n\t\t{\n\t\t\tfor(int j=0;j<this.numberOfColumns;j+=1)\n\t\t\t{\n\t\t\t\tif(this.board[i][j].value==0)\n\t\t\t\t{\n\t\t\t\t\tcount+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "private void setNeighbors() {\n\t\tfor (int i = 0; i < getNumRows(); i++) {\n\t\t\tfor (int j = 0; j < getNumCols(); j++) {\n\t\t\t\tCell c = getCurrentGrid()[i][j];\n\t\t\t\tsetNeighborsForCell(c);\n\t\t\t}\n\t\t}\n\t}", "int removeObstacle(int numRows, int numColumns, List<List<Integer>> lot)\r\n {\r\n \tint m = 0;\r\n \tint n = 0;\r\n \tfor(List<Integer> rowList: lot) {\r\n \t\tfor(Integer num: rowList) {\r\n \t\t\tif(num == 9 ) {\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\tn++;\r\n \t\t}\r\n \t\tm++;\r\n \t}\r\n \t// to store min cells required to be \r\n // covered to reach a particular cell \r\n int dp[][] = new int[numRows][numColumns]; \r\n \r\n // initially no cells can be reached \r\n for (int i = 0; i < numRows; i++) \r\n for (int j = 0; j < numColumns; j++) \r\n dp[i][j] = Integer.MAX_VALUE; \r\n \r\n // base case \r\n dp[0][0] = 1; \r\n \r\n for (int i = 0; i < lot.size(); i++) {\r\n \tList<Integer> columnList = lot.get(i);\r\n for (int j = 0; j < columnList.size(); j++) { \r\n \r\n // dp[i][j] != INT_MAX denotes that cell \r\n // (i, j) can be reached from cell (0, 0) \r\n // and the other half of the condition \r\n // finds the cell on the right that can \r\n // be reached from (i, j) \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (j + columnList.get(j)) < numColumns && (dp[i][j] + 1) \r\n < dp[i][j + columnList.get(j)]\r\n \t\t && columnList.get(j) != 0) \r\n dp[i][j + columnList.get(j)] = dp[i][j] + 1; \r\n \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (i + columnList.get(j)) < numRows && (dp[i][j] + 1) \r\n < dp[i + columnList.get(j)][j] && columnList.get(j) != 0) \r\n dp[i + columnList.get(j)][j] = dp[i][j] + 1; \r\n } \r\n } \r\n \r\n if (dp[m - 1][n - 1] != Integer.MAX_VALUE) \r\n return dp[m - 1][n - 1]; \r\n \r\n return -1; \r\n }", "public int infectNeighbours(Map map);", "private void setNumbers() {\n\t\tint w = worldWidth;\n\t\tint h = worldHeight;\n\t\tfor (int x = 0; x <= w - 1; x++) {\n\t\t\tfor (int y = 0; y <= h - 1; y++) {\n\t\t\t\tint numbers = 0;\n\n\t\t\t\tint right = x + 1;\n\t\t\t\tint left = x - 1;\n\t\t\t\tint up = y - 1;\n\t\t\t\tint down = y + 1;\n\n\t\t\t\tif (left < 0) {\n\t\t\t\t\tleft = 0;\n\t\t\t\t}\n\t\t\t\tif (up < 0) {\n\t\t\t\t\tup = 0;\n\t\t\t\t}\n\t\t\t\tif (down >= h) {\n\t\t\t\t\tdown = h - 1;\n\t\t\t\t}\n\t\t\t\tif (right >= w) {\n\t\t\t\t\tright = w - 1;\n\t\t\t\t}\n\n\t\t\t\tfor (int m = left; m <= right; m++) {\n\t\t\t\t\tfor (int n = up; n <= down; n++) {\n\t\t\t\t\t\tif (!(m == x && n == y)) {\n\t\t\t\t\t\t\tif (tileArr[m][n].hasBomb()) {\n\t\t\t\t\t\t\t\tnumbers++;\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\ttileArr[x][y].setNeighbors(numbers);\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n public Iterable<WorldState> neighbors() {\n Queue<WorldState> neighbor = new ArrayDeque<>();\n int xDim = 0, yDim = 0;\n int[][] tiles = new int[_N][_N];\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n tiles[i][j] = _tiles[i][j];\n if (_tiles[i][j] == 0) {\n xDim = i;\n yDim = j;\n }\n }\n }\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (Math.abs(i - xDim) + Math.abs(j - yDim) == 1) {\n tiles[i][j] = _tiles[xDim][yDim];\n tiles[xDim][yDim] = _tiles[i][j];\n neighbor.add(new Board(tiles));\n // System.out.println(new Board(tiles));\n tiles[xDim][yDim] = _tiles[xDim][yDim];\n tiles[i][j] = _tiles[i][j];\n }\n }\n }\n return neighbor;\n }", "private void determineCounts( )\n {\n for( int r = 0; r < rows; r++ )\n {\n for( int c = 0; c < cols; c++ )\n {\n if( theMines[ r ][ c ] == 1 )\n theCounts[ r ] [ c ] = 9;\n else\n count( r, c );\n }\n }\n }", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "public int getVisitedCells() \r\n\t{\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\treturn visitedCells;\r\n\t}", "public int numberofDistinctIslands(int[][] grid) {\n int rows = grid.length;\n if (rows == 0){\n return 0;\n }\n int cols = grid[0].length;\n int count = 0;\n\n visited = new boolean[rows][cols];\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n visited[i][j] = false;\n }\n }\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (grid[i][j] == 1 && !visited[i][j]){\n dfs(grid, i, j, rows, cols);\n count++;\n }\n }\n }\n\n System.out.println(count);\n return count;\n }", "public static int checkNeighbor(int[][] board, int i, int j, int m, int n) {\n int count = 0;\n // from i-1 to i+1\n for (int x = Math.max(i - 1, 0); x <= Math.min(i + 1, m - 1); x++) {\n // from j-1 to j+1\n for (int y = Math.max(j - 1, 0); y <= Math.min(j + 1, n - 1); y++) {\n // if board[x][y] is alive now, add count\n count += board[x][y] & 1;\n }\n }\n count -= board[i][j] & 1;\n return count;\n }", "private List<Cell> getNeighbours(int row,int col){\n List<Cell> neighbours = new ArrayList<Cell>();\n for(int i = row -1 ; i <= row+1 ; i++ )\n for(int j = col -1 ; j <= col+1 ; j++)\n if(i>=0 && i<cells.length && j>=0 && j<cells[0].length)\n neighbours.add(cells[i][j]);\n return neighbours;\n }", "protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}", "public Iterable<Board> neighbors() {\n int emptyRow = -1; // Row of the empty tile\n int emptyCol = -1; // Column of the empty tile\n\n // Iterate through each tile in the board, searching for empty tile\n search:\n for (int row = 0; row < N; row++) // For each row in the board\n for (int col = 0; col < N; col++) // For each column in the row\n if (tiles[row][col] == 0) { // If the current tile is empty (value of 0)\n emptyRow = row; // Store the row of the empty tile\n emptyCol = col; // Store the column of the empty tile\n break search; // Break from search\n }\n\n Stack<Board> neighbors = new Stack<Board>(); // Initialize a stack of neighboring board states\n\n if (emptyRow - 1 >= 0) // If there is a row of tiles above the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow - 1, emptyCol)); // Swap empty tile with the above adjacent tile and add to neighbors stack\n\n if (emptyRow + 1 < N) // If there is a row of tiles below the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow + 1, emptyCol)); // Swap empty tile with the below adjacent tile and add to neighbors stack\n\n if (emptyCol - 1 >= 0) // If there is a column of tiles to the left of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol - 1)); // Swap empty tile with the left adjacent tile and add to neighbors stack\n\n if (emptyCol + 1 < N) // If there is a column of tiles to the right of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol + 1)); // Swap empty tile with the right adjacent tile and add to neighbors stack\n\n return neighbors; // Return iterable stack of neighboring board states\n }", "Neighbors() {\n HashMap<Integer, Double> neighbors = new HashMap<>();\n }", "static void nextIteration(int matrix[][], int NUMBER_OF_ROWS, int NUMBER_OF_COLUMNS) {\n\t\t// variable to hold the matrix of original size of the matrix\n\t\tint[][] nextMatrixCycle = new int[NUMBER_OF_ROWS][NUMBER_OF_COLUMNS];\n\n\t\t/**\n\t\t * Looping through each row cell of the matrix Starting from 1 as matrix[1][1]\n\t\t * is first cell with neighbours (in first row) Going only till rows-1 as last\n\t\t * cell with neighbours is matrix[#row-1][#col-1]\n\t\t */\n\t\tfor (int rowCellCounter = 1; rowCellCounter < NUMBER_OF_ROWS - 1; rowCellCounter++) {\n\t\t\t/**\n\t\t\t * Loop to iterate through each column till all columns have been visited\n\t\t\t * Starting from 1 as matrix[1][1] is first cell with neighbours (in first\n\t\t\t * column) Going only till rows-1 as last cell with neighbours is\n\t\t\t * matrix[#row-1][#col-1]\n\t\t\t */\n\t\t\tfor (int colVisitCounter = 1; colVisitCounter < NUMBER_OF_COLUMNS - 1; colVisitCounter++) {\n\t\t\t\t// Variable to store the number of live Neighbouring cells\n\t\t\t\tint liveNeighbourCells = 0;\n\t\t\t\t/**\n\t\t\t\t * Loop to get column neighbour cell values\n\t\t\t\t * Going only from -1 to 1 (0 to 2) as neighbours exists between 0 and 2 only\n\t\t\t\t */\n\t\t\t\tfor (int row = -1; row <= 1; row++)\n\t\t\t\t\t/**\n\t\t\t\t\t * Loop to get row neighbour cell values\n\t\t\t\t\t * Going only from -1 to 1 (0 to 2) as neighbours exists between 0 and 2 only\n\t\t\t\t\t */\n\t\t\t\t\tfor (int col = -1; col <= 1; col++)\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Add the matrix[x][y] cell value to live neighbour cell count\n\t\t\t\t\t\t * where x = rowCellCounter + i, and y = colVisitCounter + j\n\t\t\t\t\t\t * [x][y] ranges from [0][0] to [2][2], that is all neighbours\n\t\t\t\t\t\t * Including the current cell as well\n\t\t\t\t\t\t */\n\t\t\t\t\t\tliveNeighbourCells = liveNeighbourCells + matrix[rowCellCounter + row][colVisitCounter + col];\n\n\t\t\t\t// The current cell needs to be subtracted as it has been counted before already\n\t\t\t\tliveNeighbourCells = liveNeighbourCells - matrix[rowCellCounter][colVisitCounter];\n\n\t\t\t\t/**\n\t\t\t\t * The live cell dies if either The number of neighbouring cells is less than 2\n\t\t\t\t * for a live cell The number of neighbouring cells is more than 3 for a live\n\t\t\t\t * cell\n\t\t\t\t */\n\t\t\t\tif ((matrix[rowCellCounter][colVisitCounter] == 1)\n\t\t\t\t\t\t&& ((liveNeighbourCells < 2) || (liveNeighbourCells > 3))) {\n\t\t\t\t\tnextMatrixCycle[rowCellCounter][colVisitCounter] = 0;\n\t\t\t\t}\n\t\t\t\t// Dead cell becomes a live cell iff there are exactly 3 neighbouring cells\n\t\t\t\t// around it\n\t\t\t\telse if ((matrix[rowCellCounter][colVisitCounter] == 0) && (liveNeighbourCells == 3)) {\n\t\t\t\t\tnextMatrixCycle[rowCellCounter][colVisitCounter] = 1;\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * For any other condition, state of the cell does not change at all, and Just\n\t\t\t\t * take the value from the original matrix and copy it as is\n\t\t\t\t */\n\t\t\t\telse {\n\t\t\t\t\tnextMatrixCycle[rowCellCounter][colVisitCounter] = matrix[rowCellCounter][colVisitCounter];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Print the matrix\n\t\tprintMatrix(nextMatrixCycle, NUMBER_OF_ROWS, NUMBER_OF_COLUMNS);\n\t}", "public int getCellsCount() {\n if (cellsBuilder_ == null) {\n return cells_.size();\n } else {\n return cellsBuilder_.getCount();\n }\n }", "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "private static void findBridges() {\n Map<Integer, Integer> lastSeen = new HashMap<>();\n for (int i = 0; i < columns.length; i++) {\n if (!lastSeen.containsKey(columns[i])) {\n lastSeen.put(columns[i], i);\n }\n }\n bridgesCount = 0;\n\n int lastBridgeIndex = 0;\n for (int i = 1; i < columns.length; i++) {\n\n //returns prev index of columns[i]\n int columnPrevIndex = lastSeen.get(columns[i]);\n //columnPrevIndex must be to the right from lastBridgeIndex to avoid crossing\n if (columnPrevIndex != i &&\n columnPrevIndex >= lastBridgeIndex) {\n lastBridgeIndex = i;\n bridgesCount++;\n connections[i] = true;\n connections[columnPrevIndex] = true;\n }\n //not optimized solution -> for every element we search to it's left side\n //from lastBridgeIndex to i and if we meet same element -> connect new bridge\n// for (int j = lastBridgeIndex; j < i; j++) {\n//\n// if (columns[j] == columns[i]) {\n// lastBridgeIndex = i;\n// connections[j] = true;\n// connections[i] = true;\n// bridgesCount++;\n// break;\n// }\n// }\n\n //update index of columns[i]\n lastSeen.put(columns[i], i);\n }\n }", "public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}", "public static int numIslands(final char[][] grid) {\n int result = 0;\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[i].length; j++) {\n if (grid[i][j] == '1' && traverseGrid(i, j, grid)) {\n result++;\n }\n }\n }\n return result;\n }", "@Override\n\tpublic List<Cell> getDiagonalNeighbors(Cell cell) {\n\t\tList<Cell> neighbors = new ArrayList<Cell>();\n\t\tint northEast, northWest, southEast, southWest;\n\t\t\n\t\tnorthEast = getNorthEastCell(cell);\n\t\tnorthWest = getNorthWestCell(cell);\n\t\tsouthEast = getSouthEastCell(cell);\n\t\tsouthWest = getSouthWestCell(cell);\n\t\t\n\t\tif (northEast != -1) { neighbors.add(getCellList().get(northEast)); }\n\t\tif (northWest != -1) { neighbors.add(getCellList().get(northWest)); }\n\t\tif (southEast != -1) { neighbors.add(getCellList().get(southEast)); }\n\t\tif (southWest != -1) { neighbors.add(getCellList().get(southWest)); }\n\t\t\n\t\treturn neighbors;\n\t}", "public static int numsIslands (boolean[][] grid) {\n\t\t/**\n\t\t * Have to pay attention to check the grid\n\t\t * Don't put it after the n, m claim\n\t\t * Because if grid == 0, there is no grid[0], so we will get outOfBound error\n\t\t * */\n\t\tif (grid == null || grid.length == 0 || grid[0].length == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tint n = grid.length;\n\t\tint m = grid[0].length;\n\t\t\n\t\tint islands = 0;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tif (grid[i][j]) {\n\t\t\t\t\tmarkAsVisited(grid, i, j);\n\t\t\t\t\tislands++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn islands;\n\t}", "public abstract void manageCell(int x, int y, int livingNeighbours);", "public Cell[] getNeighbors(Cell cell) {\n int index = 0;\n Cell neighbors[] = new Cell[4];\n //check top neighbour\n if (cell.getRow() > 0) {\n neighbors[index] = cells[cell.getRow() - 1][cell.getColumn()];\n index++;\n }\n //check left neighbor\n if (cell.getColumn() > 0) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()-1];\n index++;\n }\n //check bottom neighbor\n if (cell.getRow() < height - 1) {\n neighbors[index] = cells[cell.getRow() + 1][cell.getColumn()];\n index++;\n }\n //check right neighbor\n if (cell.getColumn() < width - 1) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()+1];\n index++;\n }\n\n //if there are only 3 neighbor cells, copy cells into smaller array\n if (index == 3) {\n Cell neighbors2[] = new Cell[3];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n //if there are only 2 neighbor cells, copy cells into smaller array\n } else if (index == 2) {\n Cell neighbors2[] = new Cell[2];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n }\n return neighbors;\n }", "private static Iterable<Cell> getNeighbors(Grid<Cell> grid, Cell cell) {\n\t\tMooreQuery<Cell> query = new MooreQuery<Cell>(grid, cell);\n\t\tIterable<Cell> neighbors = query.query();\n\t\treturn neighbors;\n\t}", "public static int size() {\n return cells.size();\n }", "int numOfPillars() {\n // there are one more coordinate line than blocks in each direction\n // since each block must be hinged on a coordinate line on each side\n return (ni+1) * (nj+1);\n }", "public abstract int neighboursInBlock(Set<Integer> block, int vertexIndex);", "public int numAdjacentMines(int row, int col) {\n\t /*create a integer variable*/\n\t int adjacent = 0;\n\t /*count how many mines are there surrounding the square*/\n\t\tfor(int i = row-1; i < row+2; i++) {\n\t\t\tfor(int j = col-1; j < col+2; j++) {\n\t\t\t\tif(inRange(i, j)) {\n\t\t\t\t\t/*skip the loop if the location is the square itself*/\n\t\t\t\t\tif(i==row && j ==col) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t/*when detect mine, adjacent plus 1*/\n\t\t\t\t\t\tif(hasMine(i, j)) {\n\t\t\t\t\t\t\tadjacent++;\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}\n\t\t}\n\t\t/*return the number of adjacent mines*/\n\t\treturn adjacent;\n }", "private int count(int row, int col) {\n\tif (row > X || col > Y || row < 0 || col < 0) return 0;\n\tif (row == X && col == Y) return 1;\n\tif (grid[row][col] == -1) return 0;\n\t\n\tif (memo[row][col] != -1) return memo[row][col];\n\t\n\tint ways = 0;\n\tfor (int i = 0; i < 2; ++i) {\n\t ways += count(row + y_dir[i], col + x_dir[i]); \n\t}\n\n\treturn memo[row][col] = ways;\n }", "public void update() {\n\t\t// Complete this method\n\n\t\tint [][]tempTable = new int [numberOfRows()][numberOfColumns()];\n\n\t\tfor ( int r = 0; r < numberOfRows(); r++ ){\n\t\t\tfor (int c = 0; c < numberOfColumns(); c++){\n\t\t\t\tif(neighborCount(r,c) == 3){//if there is exactly three\n\t\t\t\t\tif(gameGrid[r][c] == 0)//cell is born\n\t\t\t\t\t\ttempTable[r][c] = 1;//then you add one to your tempTable\t\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) == 2) || (neighborCount(r,c) == 3)){//if there is two or three\n\t\t\t\t\tif(gameGrid[r][c] == 1)//this is your existing cell\n\t\t\t\t\t\ttempTable[r][c] = 1;//then the cell remains\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) == 0) || (neighborCount(r,c) == 1)){//if there were two neighbors\n\t\t\t\t\tif(gameGrid[r][c] == 0)//if there is no cell\n\t\t\t\t\t\ttempTable[r][c] = 0;//a cell dies\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) > 3)){//if there is more than three\n\t\t\t\t\tif(gameGrid[r][c] == 1)//if there is no cell\n\t\t\t\t\t\ttempTable[r][c] = 0;//a cell dies\n\t\t\t\t}\n\n\t\t\t}//end of column for loop\n\t\t}//end of row for loop\n\t\tgameGrid = tempTable;\n\t}", "private List<Integer> getCells(Edge e) {\r\n\t\treturn getCells(e.getMBR());\r\n\t}", "public int getNumEdges();", "static int countAdjacent(char[][] seatMap,int row, int col) {\r\n\r\n int occupied = 0;\r\n for (int y = -1; y < 2; y++) {\r\n for (int x = -1; x < 2; x++) {\r\n occupied += checkOccupied(seatMap, row, col, y, x);\r\n }\r\n }\r\n return occupied;\r\n }", "private void recalculateNeighbours(int x, int y) {\r\n\t\tTile t = map.getTile(x, y + 1, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x, y + 1, false);\r\n\t\t}\r\n\t\tt = map.getTile(x + 1, y, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x + 1, y, false);\r\n\t\t}\r\n\t\tt = map.getTile(x, y - 1, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x, y - 1, false);\r\n\t\t}\r\n\t\tt = map.getTile(x - 1, y, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x - 1, y, false);\r\n\t\t}\r\n\t}", "private static int findCollision(int[][] matrix, int n) {\n int count = 0;\n for (int i = 0; i <= n - 1; i++) {\n for (int j = 0; j <= n - 1; j++) {\n if (matrix[i][j] == 1) {\n // left row\n for (int k = j - 1; k >= 0; k--) {\n if (matrix[i][k] == 2) {\n break;\n }\n if (matrix[i][k] == 1) {\n count++;\n }\n }\n // right row\n for (int k = j + 1; k <= n - 1; k++) {\n if (matrix[i][k] == 2) {\n break;\n }\n if (matrix[i][k] == 1) {\n count++;\n }\n }\n // up col\n for (int k = i - 1; k >= 0; k--) {\n if (matrix[k][j] == 2) {\n break;\n }\n if (matrix[k][j] == 1) {\n count++;\n }\n }\n // down col\n for (int k = i + 1; k <= n - 1; k++) {\n if (matrix[k][j] == 2) {\n break;\n }\n if (matrix[k][j] == 1) {\n count++;\n }\n }\n // up left\n for (int k = i - 1, l = j - 1; k >= 0 && l >= 0; k--, l--) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // down left\n for (int k = i + 1, l = j - 1; k <= n - 1 && l >= 0; k++, l--) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // up right\n for (int k = i - 1, l = j + 1; k >= 0 && l <= n - 1; k--, l++) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // down right\n for (int k = i + 1, l = j + 1; k <= n - 1 && l <= n - 1; k++, l++) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n }\n }\n }\n return count / 2;\n }", "public List<Cell> getNeighbors() {\n return this.neighbors;\n }", "public int[][] getPlotNumbers(int[][] point, int numberOfMines, int numberOfColumns,\n int numberOfRows) {\n int mineNumber = 1;\n while (mineNumber <= numberOfMines) {\n int columnNumber = mine[mineNumber][1];\n int rowNumber = mine[mineNumber][2];\n\n if (columnNumber == 1 && rowNumber == 1) { // top left corner\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == 1 && (rowNumber != 1 && rowNumber != numberOfRows)) { // left edge\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == 1 && rowNumber == numberOfRows) { // bottom left corner\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns) && rowNumber == 1) {\n // top edge\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n } else if (columnNumber == numberOfColumns && rowNumber == 1) { // top right corner\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == numberOfColumns && (rowNumber != 1 && rowNumber != numberOfRows)) {\n // right edge\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == numberOfColumns && rowNumber == numberOfRows) {\n // bottom right corner\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns)\n && rowNumber == numberOfRows) {\n // bottom edge\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns)\n && (rowNumber != 1 && rowNumber != numberOfRows)) { // not on the edge or corner\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n }\n mineNumber++;\n }\n return point;\n }", "public int[] getNeighborColIndex() {\n if (myRow % 2 == 0) {\n return neighborEvenColIndex;\n } else {\n return neighborOddColIndex;\n }\n }", "public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}", "public void printVisitedCells()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(c.getDiscoveryTime() != -1)\r\n\t\t\t\t\tSystem.out.print(c.getDiscoveryTime() % 10);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}", "public int numIslands2(char[][] grid) {\n int res = 0;\n if (grid == null || grid.length == 0) {\n return res;\n }\n\n int nr = grid.length;\n int nc = grid[0].length;\n for (int i = 0; i < nr; i++) {\n for (int j = 0; j < nc; j++) {\n if (grid[i][j] == '1') {\n ++res;\n bfs(grid, i, j);\n }\n }\n }\n return res;\n }" ]
[ "0.7831656", "0.76969755", "0.76369005", "0.76221985", "0.7520165", "0.7469975", "0.7329765", "0.7308463", "0.72862947", "0.71264064", "0.70841694", "0.69925195", "0.68852836", "0.68556887", "0.67875034", "0.678685", "0.67771715", "0.6772747", "0.67288697", "0.6710358", "0.66825867", "0.6652317", "0.6639978", "0.6611361", "0.6584893", "0.6569503", "0.65578634", "0.65535706", "0.6533399", "0.6526544", "0.6512907", "0.6512234", "0.6511586", "0.65099686", "0.6494676", "0.6468333", "0.64311457", "0.6429556", "0.64238775", "0.64018655", "0.6401413", "0.6397089", "0.63881785", "0.6378142", "0.6377959", "0.63696057", "0.6361478", "0.63538045", "0.6328106", "0.6304372", "0.629957", "0.6291673", "0.6287425", "0.6277748", "0.62756395", "0.6258054", "0.6251914", "0.6244441", "0.6229578", "0.6214057", "0.62121165", "0.621096", "0.6202911", "0.62005883", "0.61941963", "0.6191126", "0.61903495", "0.6189888", "0.6187944", "0.61858386", "0.6170846", "0.61692387", "0.61392397", "0.61301064", "0.612334", "0.61092806", "0.6104813", "0.61037636", "0.60855603", "0.60842013", "0.60744274", "0.60512984", "0.60378104", "0.60351324", "0.6033354", "0.6032659", "0.6028154", "0.6023967", "0.602151", "0.59964925", "0.5974814", "0.5967805", "0.5953938", "0.5951003", "0.5948576", "0.5943214", "0.5942763", "0.593518", "0.5931765", "0.5922953", "0.59206504" ]
0.0
-1
methods that determines state of board (random or not)
public static void SetState (int state) { source = state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void takeTurn(int[][] boardState)\n {\n \n }", "public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }", "public S getRandomState();", "private void generateBoard(){\n\t}", "private boolean[][] setRandomBoard() {\n\t\tint size = this.boardSize;\n\t\tboolean[][] randomBoard = new boolean[size][size];\n\t\tRandom rand = new Random();\n\t\t\n\t\tfor(int i=0; i<randomBoard.length; i++)\n\t\t\tfor(int j=0; j<randomBoard[i].length; j++)\n\t\t\t\trandomBoard[i][j] = rand.nextBoolean();\n\t\t\n\t\treturn randomBoard;\n\t}", "@Test\n\tpublic void testblankBoard() {\n\t\tGameState test = new GameState();\n\t\ttest.blankBoard();\n\t\tfor (int x = 0; x < 25; x++) {\n\t\t\tassertTrue(!test.state()[x]);\n\t\t}\n\t}", "public static void randomMove(Board b){\r\n if (!b.getGameOver()){ //make sure game is not already over\r\n Random rand = new Random();\r\n int xIndex = rand.nextInt(7);\r\n int yIndex = 0;\r\n \r\n // make sure random column is not already full\r\n while (b.getGameGridCircle(xIndex,yIndex).getState() != 0) {\r\n xIndex = (xIndex + 1)%7;\r\n }\r\n //find the lowest empty slot in the chosen column\r\n //Place a circle there\r\n while(b.getGameGridCircle(xIndex, yIndex+1).getState() == 0){\r\n yIndex++;\r\n if (yIndex == b.numRows - 1) {\r\n break;\r\n }\r\n }\r\n\t //change state,turn,draw counter and refresh the board\r\n b.getGameGridCircle(xIndex,yIndex).setState(b.getTurn());\r\n b.setTurn(1);\r\n b.repaint();\r\n b.setDrawCounter(b.getDrawCounter() + 1);\r\n }\r\n }", "public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }", "private int gameState() {\n\t\t\n\t\tint gameNotOver = 0;\n\t\tint gameOverWinnerX = 1;\n\t\tint gameOverWinnerO = 2;\n\t\tint gameOverTie = 3;\n\t\t\n\t\t\n\t\t\n\t\t//Win Vertically \n\t\t// 0 3 6 , 1 4 7 , 2 5 8\n\t\t\t\t\n\t\t//Win Horizontally\n\t\t//0 1 2 , 3 4 5 , 6 7 8 \n\t\t\t\t\n\t\t//Win Diagonally\n\t\t// 0 4 8 , 2 4 6\n\t\t\t\t\n\t\t//Assuming it's an equal grid\n\t\t\t\t\n\t\tMark winningMark = null;\n\t\t\t\t\n\t\tboolean hasFoundWinner = false;\n\t\t\t\t\n\t\tint row = 0;\n\t\tint column = 0;\n\t\t\t\t\n\t\t//Horizontal Winner Test\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\tcolumn ++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcolumn = 0;\n\t\t\trow++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t// Vertical Winner Test\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\n\t\twhile (!hasFoundWinner && column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\trow = 0;\n\t\t\tcolumn++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Winner Test \"\\\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Test \"/\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = COLUMN_COUNT - 1;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn--;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If there are no moves left, and there is no winner, game ends inn a tie \n\t\t\n\t\tboolean foundNoMove = false;\n\t\tfor (int i = 0; i < movesArray.length; i++) {\n\t\t\tif (movesArray[i] == NO_MOVE) {\n\t\t\t\tfoundNoMove = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!foundNoMove && !hasFoundWinner) {\n\t\t\treturn gameOverTie;\n\t\t}\n\t\t\n\t\t// If there is no winner and there are still moves left, game is not over\n\t\t\n\t\treturn gameNotOver;\n\t\t\n\t}", "private static int evalState(GameState state){\n Move m = state.getMove();\n int counter = 0;\n\n // return directly if we encouter win or loss\n if(m.isXWin()){\n return 10000;\n }\n else if(m.isOWin()){\n return -1;\n }\n\n Vector<Integer> points = new Vector<Integer>();\n points.setSize(state.BOARD_SIZE*2+2);\n int player;\n Collections.fill(points, 1);\n int scaling = 4;\n int value = 0;\n\n for(int row = 0; row < state.BOARD_SIZE; row ++){\n for(int col = 0; col < state.BOARD_SIZE; col ++){\n player = state.at(row, col);\n\n // add points to the vector, increase by a factor for every new entry\n if(player == 1){\n points.set(row, points.get(row)*scaling);\n points.add(state.BOARD_SIZE + col, points.get(state.BOARD_SIZE - 1 + col)*scaling);\n\n // if it's in the first diagonal\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, points.get(state.BOARD_SIZE*2)*scaling);\n }\n\n // checking other diagonal\n if(counter%state.BOARD_SIZE-1 == 0 && row+col != 0){\n points.add(state.BOARD_SIZE*2 + 1, points.get(state.BOARD_SIZE*2)*scaling);\n }\n }\n // if an enemy player is encoutered null the value of the row/col\n else if(player == 2){\n points.set(row, 0);\n points.set(state.BOARD_SIZE + col, 0);\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, 0);\n }\n if(counter%state.BOARD_SIZE-1 == 0){\n points.add(state.BOARD_SIZE*2 + 1, 0);\n }\n }\n counter++;\n }\n }\n\n // if we have nulled the point we don't count it for the value of the state\n for(Integer i: points){\n if(i > 1){\n value += i;\n }\n }\n //System.err.println(\"Value: \" + value);\n return value;\n }", "public static String[][] createBoardState() {\n String[][] initialBoardState = {\n {\"Rw\", \"Nw\", \"Bw\", \"Qw\", \"Kw\", \"Bw\", \"Nw\", \"Rw\"},\n {\"Pw\", \"Pw\", \"Pw\", \"Pw\", \"Pw\", \"Pw\", \"Pw\", \"Pw\"},\n {\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"},\n {\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"},\n {\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"},\n {\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"},\n {\"Pb\", \"Pb\", \"Pb\", \"Pb\", \"Pb\", \"Pb\", \"Pb\", \"Pb\"},\n {\"Rb\", \"Nb\", \"Bb\", \"Qb\", \"Kb\", \"Bb\", \"Nb\", \"Rb\"}\n };\n\n return initialBoardState;\n }", "public void testGetCell()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(MineSweeperCell.MINE, board.getCell(1, 2));\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(MineSweeperCell.INVALID_CELL, board.getCell(-1, 2));\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(MineSweeperCell.INVALID_CELL, board.getCell(4, 2));\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(MineSweeperCell.INVALID_CELL, board.getCell(2, -1));\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(MineSweeperCell.INVALID_CELL, board.getCell(2, 4));\r\n }", "public GameBoard() {\n this.gameStarted = false;\n this.turn = 1; \n this.boardState = new char[3][3];\n this.winner = 0; \n this.isDraw = false; \n\n }", "private Position getRandomMove(TicTacToeBoard state) {\r\n\t\tArrayList<Position> availableMoves = new ArrayList<Position>();\r\n\t\tfor( int row = 0; row < TicTacToeBoard.SIZE; row++ ) {\r\n\t\t\tfor( int col = 0; col < TicTacToeBoard.SIZE; col++ ) {\r\n\t\t\t\tif( state.getState(row,col) == TicTacToeBoard.BLANK ) {\r\n\t\t\t\t\tavailableMoves.add(new Position(row,col));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (Position)availableMoves.get(rand.nextInt(availableMoves.size()));\r\n\t}", "public void randomizeState() {\n\t\t//System.out.print(\"Randomizing State: \");\n\t\tArrayList<Integer> lst = new ArrayList<Integer>();\n\t\tfor(int i = 0; i<9; i++)// adds 0-8 to list\n\t\t\tlst.add(i);\n\t\tCollections.shuffle(lst);//randomizes list\n\t\tString str=\"\";\n\t\tfor(Integer i : lst)\n\t\t\tstr += String.valueOf(i);\n\t\t//System.out.println(str);\n\t\tcurrent = new PuzzleState(str,current.getString(current.getGoalState()));\n\t\t//pathCost++;\n\t}", "public void initializeDebugBoard() {\n\t\tboolean hasNotMoved = false;\n\t\tboolean hasMoved = true;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set empty rows\n\t\tfor (int row = 0; row < 8; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\tboard[5][4] = new Piece('k', white, hasMoved, 5, 4, PieceArray.E_kingId);\n//\t\tboard[1][4] = new Piece(\"rook\", white, hasMoved, 1, 4);\n\t\tboard[2][2] = new Piece('q', black, hasMoved, 2, 2, PieceArray.A_rookId);\n//\t\tboard[3][2] = new Piece('q', black, hasMoved, 3, 2, PieceArray.H_rookId);\n\t\t\n\n\t\tboard[0][0] = new Piece('k', black, hasMoved, 0, 0, PieceArray.E_kingId);\n//\t\tboard[7][7] = new Piece('r', black, hasNotMoved, 7, 7, PieceArray.A_rookId);\n//\t\tboard[6][7] = new Piece('p', black, hasNotMoved, 6, 7, PieceArray.A_pawnId);\n//\t\tboard[6][6] = new Piece('p', black, hasNotMoved, 6, 6, PieceArray.B_pawnId);\n//\t\tboard[6][5] = new Piece('p', black, hasNotMoved, 6, 5, PieceArray.C_pawnId);\n//\t\tboard[6][4] = new Piece('p', black, hasNotMoved, 6, 4, PieceArray.D_pawnId);\n\t\n//\t\tboard[6][6] = new Piece(\"pawn\", black, hasMoved, 6, 6);\n//\t\tboard[6][7] = new Piece(\"pawn\", black, hasMoved, 6, 7);\n//\t\tboard[6][4] = new Piece(\"pawn\", black, hasMoved, 6, 4);\n//\t\t\t\n//\t\t\n//\t\tboard[4][4] = new Piece(\"pawn\", black, hasMoved, 4,4);\n//\t\tboard[3][5] = new Piece(\"rook\", white,hasMoved,3,5);\n//\t\tboard[1][7] = new Piece(\"pawn\",black,hasMoved,1,7);\n\n\t}", "public static void getInitialStates(int rows, int cols, int [][] states){\n // Create a 2d array for initial state of cells\n states = new int[rows][cols];\n Random rand = new Random();\n int random = rand.nextInt();\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (random%100 <= 100*NUM_CELLS/(rows*cols)){\n states[i][j] = 1;\n }\n else{\n states[i][j] = 0;\n }\n }\n }\n }", "public void initLogicBoard() {\n int numOfBombs = 0;\n while (numOfBombs<bombs) {\n int randX = (int) (Math.random() * (rows - 1));\n int randY = (int) (Math.random() * (cols - 1));\n if (allTiles[randX][randY].getType() != 10) {\n allTiles[randX][randY].setType(10);\n\n for (int m = randX - 1; m <= randX + 1; m++) {\n for (int n = randY - 1; n <= randY + 1; n++) {\n if ((m < rows && n < cols) && (m >= 0 && n >= 0)) {\n if (allTiles[m][n].getType() != 10)\n allTiles[m][n].setType(allTiles[m][n].getType() + 1);\n }\n }\n }\n numOfBombs++;\n\n }\n }\n }", "private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }", "public int evalBoard(){\n if (wins('o')){\n return 3;\n }\n // Return 0 if human wins\n else if (wins('b')){\n return 0;\n }\n //Return 2 if game is draw\n else if (isDraw()){\n return 2;\n }\n // Game is not a draw and no player has won. Game is still undecided.\n else {\n return 1;\n }\n }", "private void loadRandomState() {\n patternName = \"Random\";\n\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = (rand.nextInt() > 0x40000000) ? (byte)1 : (byte)0;\n\n generations = 0;\n }", "public void next(){\n\t\tboolean[][] newBoard = new boolean[rows][columns]; //create a temporary board, same size as real game board\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tnewBoard[i][j] = false; //set all to false\n\t\t\t}\n\t\t}\n\t\tint cellCounter = 0;\n\t\tfor (int i = (rows - 1); i >= 0; i--) {\n\t\t\tfor (int j = (columns - 1); j >= 0; j--) { //iterate through the game board\n\t\t\t\tfor (int k = (i - 1); k < (i + 2); k++) {\n\t\t\t\t\tfor (int m = (j - 1); m < (j + 2); m++) {//iterate around the testable element\n\t\t\t\t\t\tif (!(k == i && m == j)) {\n\t\t\t\t\t\t\tif (!((k < 0 || k > (rows - 1)) || (m < 0 || m > (columns - 1)))) { //if not out of bounds and not the original point\n\t\t\t\t\t\t\t\tif (theGrid[k][m]) {\n\t\t\t\t\t\t\t\t\tcellCounter++; //if a cell is alive at the surrounding point, increase the counter\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (cellCounter == 3 || cellCounter == 2 && theGrid[i][j]) { //if meets the criteria\n\t\t\t\t\tnewBoard[i][j] = true; //create on new board\n\t\t\t\t}\n\t\t\t\tcellCounter = 0; //reset cell counter\n\t\t\t}\n\t\t}\n\t\t//transpose onto new grid\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tif(newBoard[i][j]){ //read temp board, set temp board data on real game board\n\t\t\t\t\ttheGrid[i][j] = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttheGrid[i][j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int CheckForClear(){\n int endState = -1;\n //check top\n for (int i = 0; i < 6; i++){\n if(this.gameBoard[i] != 0){\n endState = -1;\n break;\n }\n else{\n endState = 0;\n }\n }\n //check bottom\n if (endState == -1){\n for (int i = 7; i < 13; i++){\n if (this.gameBoard[i] != 0){\n endState = -1;\n break;\n }\n else{\n endState = 1;\n }\n }\n }\n return endState;\n }", "private int getStateOfPositionFromBoard(positionTicTacToe position, List<positionTicTacToe> targetBoard)\n\t{\n\t\tint index = position.x*16+position.y*4+position.z;\n\t\treturn targetBoard.get(index).state;\n\t}", "interface Cnst {\r\n\r\n /////////////////////////////////////////////////////////////\r\n // These constants can be changed to edit the big bang ran //\r\n /////////////////////////////////////////////////////////////\r\n\r\n //full size is eight, scales the size of the board\r\n int scale = 8;\r\n\r\n //numbers of blocks in a row and a column\r\n int blocks = 10;\r\n\r\n //number of colors the game will use, between 2-8 inclusive\r\n int numOfColors = 8;\r\n\r\n //the number of turns you have to win the game\r\n int maxTurns = 25;\r\n\r\n\r\n ////////////////////////////////////////\r\n // Please do not edit these constants //\r\n ////////////////////////////////////////\r\n\r\n //the visible board width, scales with scale\r\n int boardWidth = 70 * scale;\r\n\r\n //the visible board height, scales with scale\r\n int boardHeight = 70 * scale;\r\n\r\n //cell width scales with the board and scale\r\n int cellWidth = boardWidth / blocks;\r\n\r\n //cell height scales with board and scale\r\n int cellHeight = boardHeight / blocks;\r\n\r\n //new constant for text on the board\r\n int textHeight = boardWidth / 12;\r\n\r\n //the 8 colors that can be selected by the user\r\n ArrayList<Color> colorsToChoose =\r\n new ArrayList<Color>(Arrays.asList(\r\n Color.CYAN, Color.PINK, Color.ORANGE,\r\n Color.BLUE, Color.RED, Color.GREEN,\r\n Color.MAGENTA, Color.YELLOW));\r\n}", "public Board twin() {\n short[] s1;\n short[] s2;\n if (blank_r == 0 && blank_c == 0) {\n s1 = new short[]{0, 1};\n s2 = new short[]{1, 0};\n } else {\n s1 = new short[]{0, 0};\n if (blank_r == 1 && blank_c == 0) s2 = new short[]{0, 1};\n else s2 = new short[]{1, 0};\n }\n return swapTiles1d(s1, s2);\n }", "void printBoardState(Piece[] B,Player J,int N);", "Board() {\n this.ones = -1; // 1\n this.twos = -1; // 2\n this.threes = -1; // 3\n this.fours = -1; // 4\n this.fives = -1; // 5\n this.sixes = -1; // 6\n this.threeOfAKind = -1; // 7\n this.fourOfAKind = -1; // 8\n this.smallStraight = -1;// 9\n this.longStraight = -1; // 10\n this.fullHouse = -1; // 11\n this.yahtzee = -1; // 12\n }", "public void checkPlay(int[][] boardState)\n {\n if(ai)\n {\n takeTurn(boardState);\n }\n }", "public static void stateCheckerboardConvertionTest() {\n\t\tVTicTacToe tempEnvironment = new VTicTacToe();\n\t\tint[] tempTestStates = { 0, 13, 39, 26, 17087 };\n\n\t\tint tempState;\n\t\tint[][] tempCheckerboard;\n\t\tfor (int i = 0; i < tempTestStates.length; i++) {\n\t\t\ttempCheckerboard = tempEnvironment.stateToCheckerboard(tempTestStates[i]);\n\t\t\tSystem.out.println(\"The checkerboard of \" + tempTestStates[i] + \" is: \"\n\t\t\t\t\t+ Arrays.deepToString(tempCheckerboard));\n\t\t\ttempState = tempEnvironment.checkerboardToState(tempCheckerboard);\n\t\t\tSystem.out.println(\"The state ID is \" + tempState);\n\t\t} // Of for i\n\n\t}", "public void randomize() {\n // randomize the position/number of alive and dead cells by looping through each cell\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n // get a random number(between 0 and 1)\n double randomNum = Math.random();\n // cell is live if the random number is greater than 0.7\n // (0.7 gives a greater chance of a dead cell so that the grid isn't too full)\n if (randomNum > 0.7) {\n game.grid[i][j] = true;\n } else {\n game.grid[i][j] = false;\n }\n }\n }\n // repaint so that the cells show up regardless of if the program has started or not\n repaint();\n }", "public void testFlagCell()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OFOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n board.flagCell(1, 1);\r\n assertBoard(board, \"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n board.flagCell(1, 1);\r\n assertBoard(board, \"OOOO\",\r\n \"OFOO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n board.loadBoardState(\"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n board.flagCell(1, 1);\r\n assertBoard(board, \"OOOO\",\r\n \"OMOO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n board.loadBoardState(\"OOOO\",\r\n \"OMOO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n board.flagCell(1, 1);\r\n assertBoard(board, \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n board.loadBoardState(\"OOOO\",\r\n \"O OO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n board.flagCell(1, 1);\r\n assertBoard(board, \"OOOO\",\r\n \"O OO\",\r\n \"OOOO\",\r\n \"OOOO\");\r\n }", "public char[][] getBoardState(){\n return board;\n }", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "@Test\r\n\tpublic void testDirectCheck() {\n\t\tBoard b = new Board();\r\n\t\tb.state = new Piece[][] //set up the board in the standard way\r\n\t\t\t\t{\r\n\t\t\t\t{new Rook(\"b\"), new Knight(\"b\"),new Bishop(\"b\"),new Queen(\"b\"), new King(\"b\"), new Bishop(\"b\"),\r\n\t\t\t\t\tnew Knight(\"b\"), new Rook(\"b\")},\r\n\t\t\t\t{new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),\r\n\t\t\t\t\t\tnew Pawn(\"b\")},\r\n\t\t\t\t{null,null,null,null,null,null,null,null},\r\n\t\t\t\t{null,null,null,null,null,null,null,null},\r\n\t\t\t\t{null,null,null,null,null,null,null,null},\r\n\t\t\t\t{null,null,null,null,null,new Knight(\"b\"),null,null},\r\n\t\t\t\t{new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),\r\n\t\t\t\t\tnew Pawn(\"w\")},\r\n\t\t\t\t{new Rook(\"w\"), new Knight(\"w\"),new Bishop(\"w\"),new Queen(\"w\"), new King(\"w\"), new Bishop(\"w\"),\r\n\t\t\t\t\tnew Knight(\"w\"), new Rook(\"w\")}\r\n\t\t\t\t};\r\n\t\tassertTrue(b.whiteCheck());\t\r\n\t}", "public void actionPerformed(ActionEvent evt) {\n if ( player == 0 ) { // Player O - blackstone\n if (jButton[j].getIcon().equals(B)) {\n jButton[j].setIcon(O); // value of current button read left to right and then top to bottom\n \n board[j/csize][j%csize] = 0;\n int win = 1;\n win = checkrow(board,j/csize,0);\n if ( win == 0 ) {\n win = checkcol(board,j%csize,0);\n }\n if ( win == 0 ) {\n win = checkdiag(board,0 , j/csize, j%csize);\n }\n player = 1; // switches player\n markers++;\n\n if ( win == 1 ) {\n exitAction(\"Blackstone wins!\\n\");\n }\n if ( markers == gsize ) { // if all blocks have been taken\n exitAction(\"Draw!\\n\");\n }\n } \n } else { // Player X - whitestone = 1\n if (jButton[j].getIcon().equals(B)) {\n jButton[j].setIcon(X);\n board[j/csize][j%csize] = 1;\n int win = 1;\n win = checkrow(board,j/csize,1);\n if ( win == 0 ) {\n win = checkcol(board,j%csize,1);\n }\n if ( win == 0 ) {\n win = checkdiag(board, 1, j/csize, j%csize );\n }\n player = 0;\n markers++;\n\n if ( win == 1 ) {\n exitAction(\"Whitestone wins!\\n\");\n }\n if ( markers == gsize ) {\n exitAction(\"Draw!\\n\");\n }\n } \n }\n }", "public void letSmartComputerSetup() {\n //generates a random spot for the flag\n int randomRow = (int)(Math.random() * 2);\n int randomCol = (int)(Math.random() * 10);\n\n //adjusts the flag for the proper team\n if(state.getCurrentTeamsTurn().getTEAMNUMBER() == 0) {\n randomRow += 8;\n }\n\n //adds the flag to the board\n state.setLastTappedPieceButton(Rank.FLAG);\n state.tapOnSquare(randomRow, randomCol);\n state.tapOnSquare(randomRow, randomCol);\n\n //places bombs around the flag if possible\n state.setLastTappedPieceButton(Rank.BOMB);\n if(randomRow != 0) {\n state.tapOnSquare(randomRow - 1, randomCol);\n state.tapOnSquare(randomRow - 1, randomCol);\n }\n if(randomRow != 9) {\n state.tapOnSquare(randomRow + 1, randomCol);\n state.tapOnSquare(randomRow + 1, randomCol);\n }\n if(randomCol != 0) {\n state.tapOnSquare(randomRow, randomCol -1);\n state.tapOnSquare(randomRow, randomCol -1);\n }\n if(randomCol != 9) {\n state.tapOnSquare(randomRow, randomCol + 1);\n state.tapOnSquare(randomRow, randomCol + 1);\n }\n\n //transitions the player to play phase\n state.transitionPhases();\n }", "public char[][] getBoardState(){\n\t\treturn board;\n\t}", "private void updateShuffleboard()\n {\n }", "private void restoreBoard(int[]board, boolean[] state)\n {\n int [] ids = new int[]{\n R.id.box1, R.id.box2, R.id.box3, R.id.box4, R.id.box5, R.id.box6,\n R.id.box7, R.id.box8, R.id.box9\n };\n\n for (int i = 0; i < board.length; i++)\n {\n\n ImageButton btn = (ImageButton)findViewById(ids[i]);\n if (board[i] == 1)\n {\n btn.setBackgroundResource(R.drawable.x);\n\n }\n else if (board[i] == 2)\n {\n btn.setBackgroundResource(R.drawable.o);\n\n }\n else if(board[i] ==0)\n {\n\n btn.setBackgroundResource(R.drawable.tile);\n }\n\n btn.setEnabled(state[i]);\n }\n\n\n }", "public void terrainStates(){\n \tif(statesPad.getRawButton(portButton)){terrainStates = portState;}\n \telse if(statesPad.getRawButton(chevellButton)){terrainStates = chevellState;}\n \telse if(statesPad.getRawButton(ballGrabButton)){terrainStates = ballGrabState;}\n \telse if(statesPad.getRawButton(driveStateButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(lowBarButton)){terrainStates = lowBarState;}\n \telse if(statesPad.getRawButton(roughButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(rockButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(moatButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(rampartButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(drawButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(sallyButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(statesPadDefault) || drivePad.getRawButton(defaultButton)){terrainStates = driveState;}\n \t\n \tswitch (terrainStates) {\n\t \tcase 1: \n\t \t\tport();\n\t \t\tSystem.out.println(\"HERE IN ONE\");\n\t break;\n\t \tcase 2:\t\n\t \t\tchevell();\n\t \t\tSystem.out.println(\"HERE IN TWO\");\n\t \tbreak;\n\t case 3:\n\t \troughT();\n\t \tSystem.out.println(\"HERE IN THREE\");\n\t \tbreak;\n\t case 4: \n\t \tmoat();\n\t \tSystem.out.println(\"HERE IN FOUR\");\n\t \tbreak;\n\t case 5:\n\t \trampart();\n \t\t\tSystem.out.println(\"HERE IN FIVE\");\n \t\t\tbreak;\n\t case 6: \n\t \tdrawBridge();\n \t\t\tSystem.out.println(\"HERE IN SIX\");\n \t\t\tbreak;\n\t case 7: \n\t \tsallyPort();\n \t\t\tSystem.out.println(\"HERE IN SEVEN\");\n \t\t\tbreak;\n\t case 8: \n\t \tlowBar();\n\t \tSystem.out.println(\"HERE IN EIGHT\");\n\t \tbreak;\n\t case 9: \n\t \trockWall();\n \t\t\tSystem.out.println(\"HERE IN NINE\");\n \t\t\tbreak;\n\t case 10: \n\t \tballGrab();\n\t\t\t\tSystem.out.println(\"HERE IN TEN\");\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tdrivingState();\n\t\t\t\tSystem.out.println(\"HERE IN TWELVE\");\n\t\t\t\tbreak;\n\t default: \n\t \t//reset all of the states\n\t \tportSwitch \t\t= 0;\n\t \tchevellSwitch\t= 0;\n\t \tballGrabSwitch\t= 0;\n\t \tdriveSwitch\t\t= 0;\n\t \tliftArm();\n\t \twheelArms();\n\t \tSystem.out.println(\"HERE IN DEFAULT\");\n \t}\n \tSystem.out.println(\"OUTSIDE THE SWITCH\");\n }", "public void setBeginningBoard() {\n clearBooleanBoard();\n\n figBoard[0][0] = new Rook(\"white\", 00, white[0]);\n figBoard[0][1] = new Knight(\"white\", 01, white[1]);\n figBoard[0][2] = new Bishop(\"white\", 02, white[2]);\n figBoard[0][4] = new King(\"white\", 04, white[3]);\n figBoard[0][3] = new Queen(\"white\", 03, white[4]);\n figBoard[0][5] = new Bishop(\"white\", 05, white[2]);\n figBoard[0][6] = new Knight(\"white\", 06, white[1]);\n figBoard[0][7] = new Rook(\"white\", 07, white[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[0][i] = true;\n gA.getBoard()[0][i].setRotation(180);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[1][i] = true;\n gA.getBoard()[1][i].setRotation(180);\n figBoard[1][i] = new Pawn(\"white\", 10 + i, white[8]);\n }\n\n figBoard[7][0] = new Rook(\"black\", 70, black[0]);\n figBoard[7][1] = new Knight(\"black\", 71, black[1]);\n figBoard[7][2] = new Bishop(\"black\", 72, black[2]);\n figBoard[7][4] = new King(\"black\", 74, black[3]);\n figBoard[7][3] = new Queen(\"black\", 73, black[4]);\n figBoard[7][5] = new Bishop(\"black\", 75, black[2]);\n figBoard[7][6] = new Knight(\"black\", 76, black[1]);\n figBoard[7][7] = new Rook(\"black\", 77, black[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[7][i] = true;\n gA.getBoard()[7][i].setRotation(0);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[6][i] = true;\n gA.getBoard()[6][i].setRotation(0);\n figBoard[6][i] = new Pawn(\"black\", 60 + i, black[8]);\n }\n\n clearFallenFigures();\n clearBoardBackground();\n clearStringBoard();\n showBoard(); //shows the figures\n showScore();\n setBoardClickable();\n\n if (beginner % 2 == 0)\n this.turn = 0;\n else this.turn = 1;\n\n beginner++;\n\n numberOfBlackFallen = 0;\n numberOfWhiteFallen = 0;\n fallenFiguresWhite = new ArrayList<Figure>();\n fallenFiguresBlack = new ArrayList<Figure>();\n\n showCheck();\n showTurn();\n }", "private int checkerboardToState(int[][] paraCheckerboard) {\n\t\tint resultState = 0;\n\t\tint tempExponential = 1;\n\t\tfor (int i = 0; i < SIZE; i++) {\n\t\t\tfor (int j = 0; j < SIZE; j++) {\n\t\t\t\tresultState += paraCheckerboard[i][j] * tempExponential;\n\t\t\t\ttempExponential *= SIZE;\n\t\t\t} // Of for j\n\t\t} // Of for i\n\n\t\treturn resultState;\n\t}", "private void initializeBoard() {\n\t\t\n\t}", "public Board move(int algo){\n //if the game has not been started and it is a black piece\n if (state.noMovesMade() == 0 && color == 1){\n state.increaseMoveCount();\n\n int [] arr= new int [] {1,4,5,8};\n\n int rand_int = rand.nextInt(4);\n System.out.println(\"Removed \" + color + \" Piece at index \"+ arr[rand_int] +\", \" + arr[rand_int] );\n\n state.remove(arr[rand_int],arr[rand_int]);\n\n return state;\n }\n\n //if it is white first move\n if(state.noMovesMade() == 1 && color == -1){\n state.increaseMoveCount();\n\n\n List<int []> adjPositions = state.getAdjacentSpots();\n int rand_int = rand.nextInt(adjPositions.size());\n System.out.println(\"Removed \" + color + \" Piece at index \"+ adjPositions.get(rand_int)[0] +\", \" + adjPositions.get(rand_int)[1] );\n\n state.remove(adjPositions.get(rand_int)[0],adjPositions.get(rand_int)[1]);\n return state;\n }\n\n Move action = new Move();\n if(algo == 1){\n action = alphaBetaHeurisitic();\n\n }\n else if (algo == 2){\n action = miniMaxHeurisitic();\n }\n else if (algo == 3){\n action = randomHeurisitic();\n\n }\n else if (algo == 4){\n\n }\n moveHelper(action);\n\n return state;\n }", "@Test\n public void stateExample4() {\n MarbleSolitaireModel exampleBoard =\n new MarbleSolitaireModelImpl(3, 2, 4);\n assertEquals(\" O O O\\n\"\n + \" O O O\\n\"\n + \"O O O O _ O O\\n\"\n + \"O O O O O O O\\n\"\n + \"O O O O O O O\\n\"\n + \" O O O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }", "public void updateCellState(Move move)\r\n\t{\r\n\t\tCellState color = this.grid[move.getMovedMarbleInitialPosition(0).getX()][move.getMovedMarbleInitialPosition(0).getY()];\r\n\t\t\r\n\t\tfor(int i = 0;i < move.getMovedMarblesCount();i++)\r\n\t\t{\r\n\t\t\tthis.grid[move.getMovedMarbleInitialPosition(i).getX()][move.getMovedMarbleInitialPosition(i).getY()] = CellState.EMPTY;\r\n\t\t}\r\n\t\tfor(int i = 0; i < move.getMovedMarblesFinalCount();i++)\r\n\t\t{\r\n\t\t\tif(isPositionValid(move.getMovedMarbleFinalPosition(i)))\r\n\t\t\t{\r\n\t\t\t\tthis.grid[move.getMovedMarbleFinalPosition(i).getX()][move.getMovedMarbleFinalPosition(i).getY()] = color;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(color == CellState.BLACK_MARBLE) this.blackMarblesCount --;\r\n\t\t\t\tif(color == CellState.WHITE_MARBLE) this.whiteMarblesCount --;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void stateExample2() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(7);\n assertEquals(\" _\\n\" +\n \" O O\\n\" +\n \" O O O\\n\" +\n \" O O O O\\n\" +\n \" O O O O O\\n\" +\n \" O O O O O O\\n\" +\n \"O O O O O O O\", exampleBoard.getGameState());\n }", "@Test\n public void stateExample2() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n assertEquals(\" O O O\\n\"\n + \" O O O\\n\"\n + \"O O O O O O O\\n\"\n + \"O O O _ O O O\\n\"\n + \"O O O O O O O\\n\"\n + \" O O O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }", "public void step()\n {\n\t int rows = grid.length-1;\n\t int cols = grid[0].length-1;\n\t int direction = (int) (Math.random()*3);\n\t direction--;\n\t int row = (int) (Math.random()*rows);\n\t //System.out.println(row);\n\t int col = (int) (Math.random()*cols);\n\t //System.out.println(col);\n\t if(grid[row][col] == SAND && (grid[row+1][col] == EMPTY || grid[row+1][col] == WATER)) {\n\t\t grid[row+1][col] = SAND;\n\t\t grid[row][col] = EMPTY;\n\t }\n\t if(grid[row][col] == WATER && grid[row+1][col] == EMPTY) {\n\t\t if(col != 0) {\n\t\t\t grid[row+1][col+direction] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t\t else {\n\t\t\t grid[row+1][col] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t }\n }", "public abstract Chip checkWinner();", "public void gameOfLife(int[][] board) {\n int m = board.length;\n int n = ( m > 0 ? board[0].length : 0);\n int[] dx = {-1, -1, -1, 0, 1, 1, 1, 0};\n int[] dy = {-1, 0, 1, 1, 1, 0, -1, -1};\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n int cnt = 0;\n /**\n * Count the neighbors with live status.\n */\n for (int k = 0; k < 8; k++) {\n int x = i + dx[k];\n int y = j + dy[k];\n /**\n * Notice using board[x][y] here, not board[i][j]\n * The next state is created by applying the above rules simultaneously to every cell in the current state,\n * so we concern state==1 and state==2(both states indicate live)\n */\n if (x >= 0 && x < m && y >= 0 && y < n && (board[x][y] == 1 || board[x][y] == 2)) {\n cnt++;\n }\n }\n if (board[i][j] == 1 && (cnt < 2 || cnt > 3)) {\n /**\n * From live to dead.\n */\n board[i][j] = 2;\n }\n if (board[i][j] == 0 && cnt == 3) {\n /**\n * From dead to live\n */\n board[i][j] = 3;\n }\n }\n }\n /**\n * Restore state back to 0 and 1.\n */\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n board[i][j] %= 2;\n }\n }\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public Board()\r\n\t{\r\n\t\tthis.grid = new CellState[GRID_SIZE][GRID_SIZE];\r\n\t\tthis.whiteMarblesCount = MARBLES_COUNT;\r\n\t\tthis.blackMarblesCount = MARBLES_COUNT;\r\n\t\t\r\n\t\t/**\r\n\t\t * Initializes the board with empty value\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < GRID_SIZE; indexcol++)\r\n\t\t{\r\n\t\t\tfor (int indexrow = 0; indexrow < GRID_SIZE; indexrow++)\r\n\t\t\t{\r\n\t\t\t\tthis.grid[indexrow][indexcol] = CellState.EMPTY;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Sets marbles on the board with default style\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[0][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[8][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 0; indexcol < 6; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[1][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[7][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 2; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[2][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[6][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tthis.grid[3][8] = CellState.INVALID;\r\n\t\tthis.grid[2][7] = CellState.INVALID;\r\n\t\tthis.grid[1][6] = CellState.INVALID;\r\n\t\tthis.grid[0][5] = CellState.INVALID;\r\n\t\tthis.grid[5][0] = CellState.INVALID;\r\n\t\tthis.grid[6][1] = CellState.INVALID;\r\n\t\tthis.grid[7][2] = CellState.INVALID;\r\n\t\tthis.grid[8][3] = CellState.INVALID;\r\n\t}", "private int evaluateState() {\r\n\r\n\t\t// add up score\r\n\t\t//\r\n\t\tint scoreWhite = 0;\r\n\t\tint scoreBlack = 0;\r\n\t\tfor (Piece piece : this.chessGame.getPieces()) {\r\n\t\t\tif(piece.getColor() == Piece.COLOR_BLACK){\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else if( piece.getColor() == Piece.COLOR_WHITE){\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else{\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"unknown piece color found: \"+piece.getColor());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// return evaluation result depending on who's turn it is\r\n\t\tint gameState = this.chessGame.getGameState();\r\n\t\t\r\n\t\tif( gameState == ChessGame.GAME_STATE_BLACK){\r\n\t\t\treturn scoreBlack - scoreWhite;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_WHITE){\r\n\t\t\treturn scoreWhite - scoreBlack;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_END_WHITE_WON\r\n\t\t\t\t|| gameState == ChessGame.GAME_STATE_END_BLACK_WON){\r\n\t\t\treturn Integer.MIN_VALUE + 1;\r\n\t\t\r\n\t\t}else{\r\n\t\t\tthrow new IllegalStateException(\"unknown game state: \"+gameState);\r\n\t\t}\r\n\t}", "public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.green);\n }\n if (strBoard[i][j].equals(\"possible kill\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.red);\n }\n if (booleanBoard[i][j]) {\n if (figBoard[i][j].getColor().equals(\"white\")) {\n gA.getBoard()[i][j].setRotation(180);\n } else {\n gA.getBoard()[i][j].setRotation(0);\n }\n gA.getBoard()[i][j].setImageResource(figBoard[i][j].getImageResource());\n } else {\n gA.getBoard()[i][j].setImageResource(0);\n }\n }\n }\n }", "@Test\n public void stateExample3() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl(2, 4);\n assertEquals(\" O O O\\n\"\n + \" O O O\\n\"\n + \"O O O O _ O O\\n\"\n + \"O O O O O O O\\n\"\n + \"O O O O O O O\\n\"\n + \" O O O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }", "public boolean computerGuess()\r\n\t{\r\n\t\tboolean isWhite;\r\n\t\tint randomBool = (int) (Math.random()*50);\r\n\t\tif(randomBool<25)\r\n\t\t\tisWhite = true;\r\n\t\telse\r\n\t\t\tisWhite = false;\r\n\t\twhile(newGame.containsColor(isWhite) == false)\r\n\t\t{\r\n\t\t\trandomBool = (int) (Math.random()*50);\r\n\t\t\tif(randomBool<25)\r\n\t\t\t\tisWhite = true;\r\n\t\t\telse\r\n\t\t\t\tisWhite = false;\r\n\t\t}\r\n\t\tint randomPanel = (int) (Math.random()*newGame.getUserHandLength());\r\n\t\t//System.out.println(randomPanel);\r\n\t\tint randomGuess = (int) (Math.random()*12);\r\n\t\tif(newGame.getCompHand().contains(new Panel(isWhite,randomGuess,false)))\r\n\t\t{\r\n\t\t\tif(newGame.getUserHand().getPanel(randomPanel).compareTo(new Panel(isWhite,randomGuess,false)) == 0)\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void winCondition(){\n if(cleared==(int)grid.clearedToWin){\n winGame();\n }\n }", "public void boardSetUp(){\n\t}", "public boolean win() {\r\n\t\tfor (int n = 0; n < 3; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n + 1][m] == board[n][m] && board[n + 2][m] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n + 3][m] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 1][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 2][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 3][m].setText(\"X\");\r\n\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\r\n\t\t\t\t\t\treturn true;\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\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 4; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n][m + 1] == board[n][m] && board[n][m + 2] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n][m + 3] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n][m + 1].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n][m + 2].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n][m + 3].setText(\"X\");\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\r\n\t\t\t\t\t\treturn true;\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\tfor (int n = 0; n < 3; n++) {\r\n\t\t\tfor (int m = 0; m < 4; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n + 1][m + 1] == board[n][m] && board[n + 2][m + 2] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n + 3][m + 3] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 1][m + 1].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 2][m + 2].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 3][m + 3].setText(\"X\");\r\n\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\t\t\t\t\t\treturn true;\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\tfor (int n = 3; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 4; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n - 1][m + 1] == board[n][m] && board[n - 2][m + 2] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n - 3][m + 3] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n - 1][m + 1].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n - 2][m + 2].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n - 3][m + 3].setText(\"X\");\r\n\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\t\t\t\t\t\treturn true;\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\treturn false;\r\n\r\n\t}", "@Test\n public void stateExample4() {\n MarbleSolitaireModel exampleBoard =\n new TriangleSolitaireModelImpl(7, 6, 6);\n assertEquals(\" O\\n\" +\n \" O O\\n\" +\n \" O O O\\n\" +\n \" O O O O\\n\" +\n \" O O O O O\\n\" +\n \" O O O O O O\\n\" +\n \"O O O O O O _\", exampleBoard.getGameState());\n }", "public String computerMove() {\n\t\t// Look to win in a row\n\t\tfor (int r = 0; r < 3; r++) {\n\t\t\tif (rowSum[r] == -2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to win in a col\n\t\tfor (int c = 0; c < 3; c++) {\n\t\t\tif (colSum[c] == -2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to win a diag\n\t\tfor (int d = 0; d < 2; d++) {\n\t\t\tif (diagSum[d] == -2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tint c = d == 0 ? r : 2 - r;\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to block a row\n\t\tfor (int r = 0; r < 3; r++) {\n\t\t\tif (rowSum[r] == 2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to block a col\n\t\tfor (int c = 0; c < 3; c++) {\n\t\t\tif (colSum[c] == 2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to block a diag\n\t\tfor (int d = 0; d < 2; d++) {\n\t\t\tif (diagSum[d] == 2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tint c = d == 0 ? r : 2 - r;\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Find the non-full row and col w/ least val\n\t\tint bestR = -1;\n\t\tint bestC = -1;\n\t\tint minSum = 10;\n\t\tfor (int r = 0; r < 3; r++) {\n\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\tint sum = rowSum[r] + colSum[c];\n\t\t\t\t\tif (sum < minSum) {\n\t\t\t\t\t\tminSum = sum;\n\t\t\t\t\t\tbestR = r;\n\t\t\t\t\t\tbestC = c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn done(bestR, bestC);\n\t}", "public static boolean aischiesst(int boardsize, Object myGrid[][]){\r\n\r\n\r\n// \ttry {\r\n//\t\t\tTimeUnit.SECONDS.sleep(1);\r\n//\t\t\tSystem.out.println(\"ich schlafe.\");\r\n//\t\t} catch (InterruptedException e) {\r\n//\t\t\t// TODO Auto-generated catch block\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\r\n\r\n int size = boardsize;\r\n int rsize = size ;\r\n //-----------------------------------------------------------------------------------------------\r\n if(hit==0 && search==0) {\r\n //schusskoordinaten\r\n do {\r\n random1 = (int) (Math.random() * rsize + 0);\r\n random2 = (int) (Math.random() * rsize + 0);\r\n }while(myGrid[random1][random2].equals(20) || myGrid[random1][random2].equals(21));\r\n\r\n\r\n\r\n if(myGrid[random1][random2].equals(2) ||myGrid[random1][random2].equals(3)\r\n || myGrid[random1][random2].equals(4) || myGrid[random1][random2].equals(5)\r\n || myGrid[random1][random2].equals(6) || myGrid[random1][random2].equals(7)){\r\n\r\n hit=1;\r\n search=1;\r\n schiffstreffer=1;\r\n ytreffer=random1;\r\n xtreffer=random2;\r\n counter=1;\r\n\r\n if(myGrid[random1][random2].equals(2)){\r\n schifflänge=2;\r\n }\r\n if(myGrid[random1][random2].equals(3)){\r\n schifflänge=3;\r\n }\r\n if(myGrid[random1][random2].equals(4)){\r\n schifflänge=4;\r\n }\r\n if(myGrid[random1][random2].equals(5)){\r\n schifflänge=5;\r\n }\r\n if(myGrid[random1][random2].equals(6)){\r\n schifflänge=6;\r\n }\r\n if(myGrid[random1][random2].equals(7)){\r\n schifflänge=7;\r\n }\r\n myGrid[random1][random2]=21;\r\n return true;\r\n }\r\n if(myGrid[random1][random2].equals(0) || myGrid[random1][random2].equals(9) || myGrid[random1][random2].equals(20)){\r\n myGrid[random1][random2]=20;\r\n return false;\r\n }\r\n }\r\n //------------------------------------------------------------------------------------------------\r\n //zweiter Treffer\r\n //------------------------------------------------------------------------------------------------\r\n if(hit==1 && search==1 && schiffstreffer==1 && above==0){\r\n if(schiffstreffer==1){\r\n //-----über ersten Treffer schießen-------------------------------------------------------\r\n if ( ytreffer- 1 >= 0){\r\n outoffield=0;\r\n if(myGrid[ytreffer-1][xtreffer].equals(0) || myGrid[ytreffer-1][xtreffer].equals(9)\r\n || myGrid[ytreffer-1][xtreffer].equals(20)){\r\n hit=0;\r\n above=1;\r\n myGrid[ytreffer-1][xtreffer]=20;\r\n return false;\r\n }\r\n if(myGrid[ytreffer-1][xtreffer].equals(schifflänge)){\r\n hit=1;\r\n schiffstreffer=2;\r\n above=1;\r\n vertikal=1;\r\n counter++;\r\n myGrid[ytreffer-1][xtreffer]=21;\r\n\r\n if(schifflänge==counter){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n return true;\r\n }\r\n }\r\n else{\r\n above=1;\r\n outoffield=1;\r\n hit=0;\r\n return false;\r\n\r\n }\r\n\r\n }\r\n }\r\n //------------------------------------------------------------------------------------------------\r\n if(hit==0 && search==1 && schiffstreffer==1 && above==1 && below==0 && left==0 && right==0){\r\n //----unter ersten Treffer schießen-----------------------------------------------------------\r\n if(ytreffer+1 <= size-1){\r\n outoffield=0;\r\n if(myGrid[ytreffer+1][xtreffer].equals(0) || myGrid[ytreffer+1][xtreffer].equals(9)\r\n || myGrid[ytreffer+1][xtreffer].equals(20)){\r\n hit=0;\r\n below=1;\r\n myGrid[ytreffer+1][xtreffer]=20;\r\n return false;\r\n }\r\n if(myGrid[ytreffer+1][xtreffer].equals(schifflänge)){\r\n hit=1;\r\n schiffstreffer=2;\r\n below=1;\r\n vertikal=1;\r\n counter++;\r\n myGrid[ytreffer+1][xtreffer]=21;\r\n\r\n if(schifflänge==counter){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n return true;\r\n }\r\n\r\n }\r\n else{\r\n below=1;\r\n outoffield=1;\r\n hit=0;\r\n return false;\r\n\r\n }\r\n }\r\n //--------------------------------------------------------------------------------------------------\r\n if(hit==0 && search==1 && schiffstreffer==1 && above==1 && below==1 && left==0 && right ==0){\r\n //----links von ersten treffer schießen---------------------------------------------------------\r\n if(xtreffer-1 >= 0){\r\n outoffield=0;\r\n if(myGrid[ytreffer][xtreffer-1].equals(0) || myGrid[ytreffer][xtreffer-1].equals(9)\r\n || myGrid[ytreffer][xtreffer-1].equals(20)){\r\n hit=0;\r\n left=1;\r\n myGrid[ytreffer][xtreffer-1]=20;\r\n return false;\r\n\r\n }\r\n if(myGrid[ytreffer][xtreffer-1].equals(schifflänge)){\r\n hit=1;\r\n schiffstreffer=2;\r\n left=1;\r\n horizontal=1;\r\n counter++;\r\n myGrid[ytreffer][xtreffer-1]=21;\r\n\r\n if(schifflänge==counter){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n return true;\r\n }\r\n\r\n }\r\n else{\r\n left=1;\r\n outoffield=1;\r\n hit=0;\r\n return false;\r\n\r\n }\r\n\r\n }\r\n //----------------------------------------------------------------------------------------------------\r\n if(hit==0 && search==1 && schiffstreffer==1 && above==1 && below==1 && left==1 && right ==0){\r\n //----rechts von ersten treffer schießen---------------------------------------------------------\r\n if(xtreffer+1 <= size-1){\r\n outoffield=0;\r\n if(myGrid[ytreffer][xtreffer+1].equals(0) || myGrid[ytreffer][xtreffer+1].equals(9)\r\n || myGrid[ytreffer][xtreffer+1].equals(20)){\r\n hit=0;\r\n right=1;\r\n myGrid[ytreffer][xtreffer+1]=20;\r\n return false;\r\n }\r\n if(myGrid[ytreffer][xtreffer+1].equals(schifflänge)){\r\n hit=1;\r\n schiffstreffer=2;\r\n right=1;\r\n horizontal=1;\r\n counter++;\r\n myGrid[ytreffer][xtreffer+1]=21;\r\n\r\n if(schifflänge==counter){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n return true;\r\n }\r\n\r\n }\r\n else{\r\n right=1;\r\n outoffield=1;\r\n hit=0;\r\n return false;\r\n\r\n }\r\n\r\n }\r\n //------------------------------------------------------------------------------------------------------\r\n //weitere Treffer\r\n //------------------------------------------------------------------------------------------------------\r\n if(vertikal==1){\r\n //nach oben schießen\r\n if(above==1 && below==0){\r\n while(ytreffer-counter >= 0 && abbruch==0){\r\n if(myGrid[ytreffer-counter][xtreffer].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer-counter][xtreffer]=21;\r\n counter++;\r\n if(schifflänge==schiffstreffer){ //???????????????????????????????????????\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n if(myGrid[ytreffer-counter][xtreffer].equals(0) || myGrid[ytreffer-counter][xtreffer].equals(9)\r\n || myGrid[ytreffer-counter][xtreffer].equals(20)){\r\n abbruch=1;\r\n myGrid[ytreffer-counter][xtreffer]=20;\r\n return false;\r\n }\r\n }\r\n if(ytreffer-counter < 0){\r\n abbruch=1;\r\n }\r\n while(schifflänge!=schiffstreffer && abbruch==1){\r\n if(myGrid[ytreffer+zähler][xtreffer].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer+zähler][xtreffer]=21;\r\n zähler++;\r\n if(schifflänge==schiffstreffer){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n }\r\n\r\n }\r\n //nach unten schiessen\r\n if(above==1 && below==1 ){\r\n while(ytreffer+counter <= size-1 && abbruch==0){\r\n if(myGrid[ytreffer+counter][xtreffer].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer+counter][xtreffer]=21;\r\n counter++;\r\n if(schifflänge==schiffstreffer){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n if(myGrid[ytreffer+counter][xtreffer].equals(0) || myGrid[ytreffer-counter][xtreffer].equals(9)\r\n || myGrid[ytreffer+counter][xtreffer].equals(20)){\r\n abbruch=1;\r\n myGrid[ytreffer+counter][xtreffer]=20;\r\n return false;\r\n }\r\n\r\n }\r\n if(ytreffer+counter > size-1){\r\n abbruch=1;\r\n }\r\n while(schifflänge!=schiffstreffer && abbruch==1){\r\n if(myGrid[ytreffer-zähler][xtreffer].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer-zähler][xtreffer]=21;\r\n zähler++;\r\n if(schifflänge==schiffstreffer){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n if(horizontal==1){\r\n //nach links schiessen\r\n if(above==1 && below==1 && left==1 && right==0){\r\n while(xtreffer-counter >=0 && abbruch==0){\r\n if(myGrid[ytreffer][xtreffer-counter].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer][xtreffer-counter]=21;\r\n counter++;\r\n if(schifflänge==schiffstreffer){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n if(myGrid[ytreffer][xtreffer-counter].equals(0) || myGrid[ytreffer][xtreffer-counter].equals(9)\r\n || myGrid[ytreffer][xtreffer-counter].equals(20)){\r\n abbruch=1;\r\n myGrid[ytreffer][xtreffer-counter]=20;\r\n return false;\r\n }\r\n }\r\n if(xtreffer-counter < 0){\r\n abbruch=1;\r\n }\r\n while(schifflänge!=schiffstreffer && abbruch==1){\r\n if(myGrid[ytreffer][xtreffer+zähler].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer][xtreffer+zähler]=21;\r\n zähler++;\r\n if(schifflänge==schiffstreffer){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n //nach rechts schiessen\r\n if(above==1 && below==1 && left==1 && right==1){\r\n while(xtreffer+counter <=size-1 && abbruch==0){\r\n if(myGrid[ytreffer][xtreffer+counter].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer][xtreffer+counter]=21;\r\n counter++;\r\n if(schifflänge==schiffstreffer){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n if(myGrid[ytreffer][xtreffer+counter].equals(0) || myGrid[ytreffer][xtreffer+counter].equals(9)\r\n || myGrid[ytreffer][xtreffer+counter].equals(20)){\r\n abbruch=1;\r\n myGrid[ytreffer][xtreffer+counter]=20;\r\n return false;\r\n }\r\n }\r\n if(xtreffer+counter > size-1){\r\n abbruch=1;\r\n }\r\n while(schifflänge!=schiffstreffer && abbruch==1){\r\n if(myGrid[ytreffer][xtreffer-zähler].equals(schifflänge)){\r\n schiffstreffer++;\r\n myGrid[ytreffer][xtreffer-zähler]=21;\r\n zähler++;\r\n if(schifflänge==schiffstreffer){\r\n destroyed=1;\r\n search=0;\r\n hit=0;\r\n above=0;\r\n below=0;\r\n right=0;\r\n left=0;\r\n vertikal=0;\r\n horizontal=0;\r\n zähler=1;\r\n abbruch=0;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public static boolean fullBoard(){\r\n if(numTurns==42){\r\n return true; //determines if the outcome of the game is a draw\r\n }\r\n return false;\r\n }", "public void showBoardState() {\n System.out.print(\" \");\n //top row X axis\n for(int i = 0; i < boardSize; i++){\n System.out.print(\" \" + i + \" \");\n }\n System.out.println();\n for (int i = 0; i < boardSize; i++) {\n //conversion 0-9 to char for display as Y axis\n System.out.print(\" \" + (char)(i + 'A') + \" \");\n for (int j = 0; j < boardSize; j++) {\n System.out.print(\" \" + board[i][j] + \" \");\n }\n System.out.println();\n\n }\n System.out.println();\n }", "public void testRevealBoard()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"OOOO\",\r\n \"OOO+\");\r\n board.revealBoard();\r\n assertBoard(board, \" \",\r\n \" \",\r\n \" 11\",\r\n \" 1*\");\r\n }", "public int getBoardState(boolean whiteTeamMoving) {\n\t\tint result = 0;\n\t\tboolean moves = doMovesExist(whiteTeamMoving);\n\n\t\tresult |= moves ? 0 : 1;\n\t\tresult |= isWhiteCheck() ? 1<<1 : 0;\n\t\tresult |= isBlackCheck() ? 1<<2 : 0;\n\t\tresult |= result == 1 ? 0 : 1<<3;\n\n\t\treturn result;\n\t}", "public boolean CheckVictory()\n {\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(i, 0),\n getCell(i, 1),\n getCell(i, 2),\n getCell(i, 3),\n getCell(i, 4),\n getCell(i, 5) )){\n Winner=getCell(i, 2);\n return true;\n }\n }\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(0,i),\n getCell(1,i),\n getCell(2,i),\n getCell(3,i),\n getCell(4,i),\n getCell(5,i) )){\n Winner=getCell(2, i);\n return true;\n }\n }\n CellType[] arrTypes={getCell(0, 0),getCell(1, 1),getCell(2, 2),getCell(3, 3),\n getCell(4, 4),getCell(5, 5)};\n\n \n if(isFiveAligned(arrTypes))\n {\n Winner=arrTypes[2];\n return true;\n }\n\n CellType[] REVERSE_arrTypes={getCell(0, 5),getCell(1, 4),getCell(2, 3),getCell(3, 2),\n getCell(4, 1),getCell(5, 0)};\n\n \n\n if(isFiveAligned(REVERSE_arrTypes))\n {\n Winner=REVERSE_arrTypes[2]; \n return true;\n }\n\n\n if(isFiveAligned(new CellType[]{getCell(0, 1),\n getCell(1, 2),\n getCell(2, 3),\n getCell(3, 4),\n getCell(4, 5),\n CellType.None\n })) {\n Winner=getCell(3, 4);\n return true;\n }\n \n if(isFiveAligned(new CellType[]{getCell(1, 0),\n getCell(2, 1),\n getCell(3, 2),\n getCell(4, 3),\n getCell(5, 4),\n CellType.None\n })) {\n Winner=getCell(4, 3);\n return true;\n }\n\n if(isFiveAligned(new CellType[]{\n getCell(4, 0),\n getCell(3, 1),\n getCell(2, 2),\n getCell(1, 3),\n getCell(0, 4),\n CellType.None\n \n })){\n Winner=getCell(2, 2);\n return true;}\n\n if(isFiveAligned(new CellType[]{\n getCell(5, 1),\n getCell(4, 2),\n getCell(3, 3),\n getCell(2, 4),\n getCell(1, 5),\n CellType.None\n \n })){\n Winner=getCell(3, 3);\n return true;}\n\n \n \n\n\n \n\n return false;\n }", "boolean checkWin(Tile initialTile);", "private boolean shouldClearBoard() {\n return rnd.nextInt(3) == 2 || isMoreThanMoles(2) || (rnd.nextBoolean() && isMoreThanMoles(1));\n }", "private void checkWinningMove(TicTacToeElement element,int x,int y) {\n int logicalSize = boardProperties.getBoardLength()-1;\r\n // Check column (only the one we just played)\r\n for(int i=0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[x][i] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n\r\n }\r\n // Check row (only the one we just played)\r\n for(int i=0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][y] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // Check diagonal\r\n // normal diagonal\r\n for(int i= 0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][i] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // anti diagonal\r\n for(int i= 0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][logicalSize-i] != element.getValue()){\r\n break;\r\n }\r\n //Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // check draw\r\n if(gameState.getMoveCount() == Math.pow(logicalSize,2)-1){\r\n gameState.setDraw(true);\r\n }\r\n\r\n }", "public IGameAlgo.GameState getGameState (GameBoard.GameMove move){\n\t\t/*\n\t\t * If last move made by computer,check if computer wins.\n\t\t */\n\t\tif(this.board[lastMove.getRow()][lastMove.getColumn()]==BoardSigns.COMPUTER.getSign()) {\n\t\t\t if(\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[0][1] == BoardSigns.COMPUTER.getSign() && board[0][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[1][0] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[1][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[2][0] == BoardSigns.COMPUTER.getSign() && board[2][1] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[1][0] == BoardSigns.COMPUTER.getSign() && board[2][0] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][1] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][1] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.COMPUTER.getSign() && board[1][2] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][0] == BoardSigns.COMPUTER.getSign())\n\t\t )\n\t\t\t\t return GameState.PLAYER_LOST;\t\t\t\t\t\t \n\t\t}\n\t\t/*\n\t\t * If last move made by player,check if player wins.\n\t\t */\n\t\telse {\n\t\t\t if(\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[0][1] == BoardSigns.PLAYER.getSign() && board[0][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[1][0] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[1][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[2][0] == BoardSigns.PLAYER.getSign() && board[2][1] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[1][0] == BoardSigns.PLAYER.getSign() && board[2][0] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][1] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][1] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.PLAYER.getSign() && board[1][2] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][0] == BoardSigns.PLAYER.getSign())\n\t\t )\n\t\t\t\t return GameState.PLAYER_WON;\t\n\t\t}\n\t\t/*\n\t\t * No one wins,check if in progress or game ends with tie.\n\t\t */\n\t\t\n\t\t //check if exist empty spots. \n\t\t\tfor(int i=0;i<3;i++)\n\t\t\tfor(int j=0;j<3;j++)\n\t\t\t\tif(board[i][j]==TicTacTow.BoardSigns.BLANK.getSign()) \n\t\t\t\t return GameState.IN_PROGRESS;\n\t\t\treturn GameState.TIE;\t\t\t\n\t}", "public Board randomBoard() {\n int[][] board = new int[tileLength][tileLength];\n\n //Random scramble algorithm\n\n //Create solved nxn board\n for (int i = 0; i <tileLength*tileLength ; i++) {\n board[i / tileLength][i % tileLength] = (i + 1) % (tileLength*tileLength);\n }\n\n Board b = new Board(board);\n\n //Perform 50 random moves on the board\n Random r = new Random();\n\n int parity = r.nextInt(2);\n\n for (int i = 0; i < 50 + parity; i++) {\n ArrayList<Board> children = b.getSuccessors();\n children.trimToSize();\n int count = children.size();\n b = children.get(r.nextInt(count));\n\n }\n\n b.setParent(null);\n b.setGScore(0);\n\n return b;\n }", "public static LocNode intialState() {\n\n\t \n\t char[][] newMatrix =copyMatrix(matrix);\n\t \n\t \n\n\t \n\twhile(true) {\n\t\t\t\n\t\t\t\n\t\tint i=getRandomIndex(size);\n\t\tint j=getRandomIndex(size);\n\t\t\n\t if(newMatrix[i][j]=='-') {\n\t \t\n\t \n\t \t newMatrix[i][j]='c' ;\n\t \t \n\t \t \n\t \t updateVisibility(i, j, newMatrix);\n\t \t \n\t \t\n\t \t LocNode intialState= new LocNode(newMatrix, calculateOpjectiveFunction(newMatrix));\n\t \t \n\t \t\n\t \t return intialState;\n\t }\n\t \n\t }\n }", "public void testIsGameLost()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O*OO\",\r\n \"OOOO\");\r\n assertEquals(true, board.isGameLost());\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(false, board.isGameLost());\r\n }", "public static String[][] getBoardState() {\n return boardState;\n }", "@Override\n public ArrayList<AState> getAllPossibleStates(AState state){\n MazeState s = (MazeState)state;\n ArrayList<AState> moves = new ArrayList<AState> ();\n\n\n int row = s.getState().getRowIndex();\n int col = s.getState().getColumnIndex();\n int [][] matrix = mySearchableMaze.getMazeMatrix();\n\n\n if(row+1 < matrix.length){\n if( matrix[row+1][col]==0 ){\n moves.add(new MazeState(new Position(row+1,col),false,s.getCost()+1));\n\n }\n }\n if(row-1 >= 0 ){\n if( matrix[row-1][col]==0){\n moves.add(new MazeState(new Position(row-1,col),false,s.getCost()+1));\n\n }\n }\n if(col+1 < matrix[0].length ){\n if( matrix[row][col+1]==0 ){\n moves.add(new MazeState(new Position(row,col+1),false,s.getCost()+1));\n\n }\n }\n if(col-1 >= 0 ){\n if( matrix[row][col-1]==0 ){\n moves.add(new MazeState(new Position(row,col-1),false,s.getCost()+1));\n }\n }\n return moves;\n }", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "@Override\n public IMove doMove(IGameState state) {\n\n //Find macroboard to play in\n for (int[] move : preferredMoves)\n {\n if(state.getField().getMacroboard()[move[0]][move[1]].equals(IField.AVAILABLE_FIELD))\n {\n \n Random rnd = new Random();\n //find move to play\n for (int[] selectedMove : preferredMoves)\n {\n \n int x = move[0]*3 + selectedMove[0];\n int y = move[1]*3 + selectedMove[1];\n if(!state.getField().getBoard()[x][y].contains(IField.EMPTY_FIELD)\n && !state.getField().getBoard()[x][y].contains(IField.AVAILABLE_FIELD))\n {\n try\n {\n x = x + (rnd.nextInt(selectedMove[0] % 2 + 1));\n \n \n } catch (Exception e)\n {\n \n }\n try\n {\n y = y - (rnd.nextInt(selectedMove[0] % 2 - 1));\n \n } catch (Exception e)\n {\n \n }\n try\n {\n x = x - (rnd.nextInt(selectedMove[0] % 2 -1));\n \n \n } catch (Exception e)\n {\n \n }\n \n \n \n \n }\n if(state.getField().getBoard()[x][y].equals(IField.EMPTY_FIELD))\n {\n \n return new Move(x,y);\n }\n }\n }\n }\n\n //NOTE: Something failed, just take the first available move I guess!\n return state.getField().getAvailableMoves().get(0);\n }", "public TicTacToe() {\n resetBoard();\n }", "public int evaluate(PentagoBoardState pbs) {\n PentagoBoardState.Piece[][] pieces = pbs.getBoard();\n\n\n int whitescore =0; //keep track of white's total score\n int blackscore = 0;//keep track of black's total score\n\n //Check rows\n for (int x = 0; x <6 ; x++) {\n int countWHori = 0;\n int countBHori = 0;\n\n int blacks = 0;\n int whites = 0;\n\n\n for (int y = 0; y <5 ; y++) {\n //Count how many black and white pieces\n if (pieces[x][y].ordinal() == 0 ) {\n\n //countBHori = countBHori + countvalue;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1) {\n\n //countWHori = countWHori +countvalue;\n whites++;\n }\n\n //Check for consecutive\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 0 ) {\n\n countBHori = countBHori +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 2 ) {\n\n countBHori = countBHori + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x][y+1].ordinal() == 0 ) {\n\n countBHori = countBHori + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 1 ) {\n\n countWHori = countWHori +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 2 ) {\n\n countWHori = countWHori + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x][y+1].ordinal() == 1 ) {\n\n countWHori = countWHori + blankspaceconsec;\n }\n\n //Check for disjoint and joint set If * B B W * * then disjoint and * B B * B * Then joint set for B * B\n if (y!=4){\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 0 && pieces[x][y+2].ordinal() == 1){\n countBHori = countBHori +disjointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 1 && pieces[x][y+2].ordinal() == 0){\n countWHori = countWHori +disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 2 && pieces[x][y+2].ordinal() == 0){\n countBHori = countBHori +jointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 2 && pieces[x][y+2].ordinal() == 1){\n countWHori = countWHori +jointset;\n }\n }\n }\n //check if unwinnable\n if (blacks == 4 && whites==2){\n countBHori += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWHori += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countWHori += unwinnable;\n countBHori += unwinnable;\n }\n\n\n //Run value for row in evaluation scheme and add to total score\n int valuew = consecutivevalue(countWHori);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBHori);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec hori \" + valueb + \"White consec hori \" + valuew);\n\n }\n\n //Check Verticals\n for (int y = 0; y <6 ; y++) {\n int countWvert = 0;\n int countBvert = 0;\n int blacks = 0;\n int whites = 0;\n\n\n for (int x = 0; x <5 ; x++) {\n if (pieces[x][y].ordinal() == 0) {\n\n //countBvert = countBvert +1;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1) {\n\n //countWvert = countWvert +1;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 0 ) {\n\n countBvert = countBvert +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 2 ) {\n\n countBvert = countBvert + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 0 ) {\n\n countBvert = countBvert + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 1 ) {\n\n countWvert = countWvert +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 2 ) {\n\n countWvert = countWvert + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 1 ) {\n\n countWvert = countWvert + blankspaceconsec;\n }\n\n if (x!=4){\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 1){\n countBvert = countBvert +disjointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 0){\n countWvert = countWvert +disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 0){\n countBvert = countBvert +jointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 1){\n countWvert = countWvert +jointset;\n }\n }\n }\n\n if (blacks == 4 && whites==2){\n countBvert += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBvert += unwinnable;\n countWvert += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWvert += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBvert + \"White consec \" + countWvert);\n int valuew = consecutivevalue(countWvert);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBvert);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec VERT \" + valueb + \"White consec hori \" + valuew);\n }\n\n //S West N EAST Top\n for (int a = 1; a <6 ; a++) { //loop through all diagonal lines\n int countWdiagSoNe = 0;\n int countBdiagSoNe = 0;\n int x=0;\n int blacks = 0;\n int whites = 0;\n\n\n for (int y = a; y !=0 ; y--) { //loop through one diagonal line\n\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y-1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n\n //countBdiagSoNe = countBdiagSoNe +2;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1 ) {\n\n //countWdiagSoNe = countWdiagSoNe +2;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n // check for joint and disjoint set at these x y coordinates by looking 2 pieces ahead\n if (x==0 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==1 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==0 && y==5){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==1 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==3 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n\n x++;\n\n\n }\n if (blacks == 4 && whites==2){\n countBdiagSoNe += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBdiagSoNe += unwinnable;\n countWdiagSoNe += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n if (a==4 && blacks == 4 && whites==1){\n countBdiagSoNe += unwinnable;\n }\n if (a==4 && blacks == 1 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagSoNe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBdiagSoNe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagSoNe + \"White consec hori \" + valuew + \" \" + countWdiagSoNe);\n }\n //S West N EAST Bot\n for (int a = 1; a <5 ; a++) {\n int countWdiagSoNe = 0;\n int countBdiagSoNe = 0;\n int y=5;\n int blacks = 0;\n int whites = 0;\n\n for (int x = a; x <5 ; x++) {\n\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y-1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n\n //countBdiagSoNe = countBdiagSoNe +\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1 ) {\n\n //countWdiagSoNe = countWdiagSoNe +2;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n if (x==1 && y==5){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==3 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n //System.out.println(x + \" y:\" + y +\" Black consec DIAGOMAAL \" + countBdiagSoNe + \"White consec hori \" + countWdiagSoNe);\n y--;\n\n\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagSoNe += unwinnable;\n }\n /*if (blacks == 3 && whites==3){\n countBdiagSoNe += unwinnable;\n countWdiagSoNe += unwinnable;\n }*/\n if (a==1&& blacks == 1 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagSoNe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBdiagSoNe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagSoNe + \"White consec hori \" + valuew + \" \" + countWdiagSoNe);\n }\n\n //NorthWest S EAST Left\n for (int a = 0; a <5 ; a++) {\n int countWdiagNoSe = 0;\n int countBdiagNoSe = 0;\n int y=0;\n int blacks = 0;\n int whites = 0;\n\n for (int x = a; x <5 ; x++) {\n //System.out.println(pbs+\"x \" + x+ \" y \" +y);\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y+1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n blacks++;\n //countBdiagNoSe = countBdiagNoSe +2;\n }\n if (pieces[x][y].ordinal() == 1) {\n whites++;\n //countWdiagNoSe = countWdiagNoSe +2;\n }\n\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countWdiagNoSe= countWdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe + blankspaceconsec;\n }\n\n if (x==0 && y==0){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==3 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==0){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==3 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n y++;\n\n\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n if (blacks == 4 && whites==2){\n countBdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagNoSe += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBdiagNoSe += unwinnable;\n countWdiagNoSe += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 1 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n\n int valuew = consecutivevalue(countWdiagNoSe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue( countBdiagNoSe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagNoSe + \"White consec hori \" + valuew + \" \" + countWdiagNoSe);\n }\n //NorthWest S EAST Right\n for (int a = 1; a <5 ; a++) {\n int countWdiagNoSe = 0;\n int countBdiagNoSe = 0;\n int x=0;\n int blacks = 0;\n int whites = 0;\n\n for (int y = a; y <5 ; y++) {\n //System.out.println(\"x \" + x+ \" y \" +y);\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y+1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0 ) {\n blacks++;\n //countBdiagNoSe = countBdiagNoSe +2;\n }\n if (pieces[x][y].ordinal() == 1) {\n whites++;\n //countWdiagNoSe = countWdiagNoSe +2;\n }\n\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countWdiagNoSe= countWdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe + blankspaceconsec;\n }\n\n if (x==0 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n x++;\n\n\n }\n if (a==1 && blacks == 1 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagNoSe += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagNoSe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue( countBdiagNoSe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagNoSe + \"White consec hori \" + valuew + \" \" + countWdiagNoSe);\n }\n\n\n\n\n\n //System.out.println(\"Black consec score \" + blackscore +\" \" + \"White consec scpre \" + whitescore);\n //System.out.println(\"max player is \" + maxplayer + \"My colour is \" + mycolour);\n int i = -123456789;\n if (mycolour == 0){\n //System.out.println(blackscore-whitescore +\" I am black\");\n\n\n i= blackscore-whitescore;\n return i;\n\n }\n else {\n //System.out.println(whitescore-blackscore +\" I am white\");\n i= whitescore-blackscore;\n return i;\n }\n /*\n if(i>0 && i<1000){\n return 100; //i*2;\n }\n else if(i>=1000 && i<10000){\n return 1000; //i*10;\n }\n else if(i>=10000 && i<100000){\n return 10000; //i*50;\n }\n else if(i>=100000){\n return 100000;//i*500;\n }\n else if(i<=0 && i>-100){\n return -100; //i*2;\n }\n else if(i<=-100 && i>-1000){\n return -1000; //i*10;\n }\n else if(i<=-1000 && i>-10000){\n return -10000; //i*50;\n }\n else if(i<=0 && i>-100000){\n return -100000;//i*500;\n }\n\n */\n\n\n }", "public static void main(String[] args){\n Board b1 = new Board(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 0}});\n assert b1.dimension() == 3;\n\n assert b1.hamming() == 0 : \"b1 hamming is: \" + b1.hamming();\n assert b1.manhattan() == 0;\n assert b1.isGoal();\n\n Board b2 = new Board(new int[][]{{5, 2, 3}, {4, 1, 6}, {7, 8, 0}});\n assert b2.hamming() == 2;\n assert b2.manhattan() == 4;\n assert !b2.isGoal();\n assert !b1.equals(b2);\n\n Board b3 = new Board(new int[][]{{4, 2, 3}, {5, 1, 6}, {7, 8, 0}});\n assert b3.twin().equals(b2);\n\n Board b4 = new Board(new int[][]{{4, 2, 3}, {5, 0, 6}, {7, 8, 1}});\n for (Board board: b4.neighbors() ){\n System.out.println(board);\n }\n\n Board b5 = new Board(new int[][]{{0, 1, 3}, {4, 2, 5}, {7, 8, 6}});\n assert b5.manhattan() == 4;\n\n Board b6 = new Board(new int[][]{{5, 8, 7}, {1, 4, 6}, {3, 0, 2}});\n assert b6.manhattan() == 17;\n }", "public void showBoard(){\n }", "@Test\n public void stateExample1() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl();\n assertEquals(\" _\\n\" +\n \" O O\\n\" +\n \" O O O\\n\" +\n \" O O O O\\n\" +\n \"O O O O O\", exampleBoard.getGameState());\n }", "public void updateGame(Seed theSeed, int rowSelected, int columnSelected) {\n \n if (hasWon(theSeed, rowSelected, columnSelected)) { // check for win\n currentState = (theSeed == Seed.CROSS) ? GameState.CROSS_WIN : GameState.NOUGHT_WIN;\n \n } else if (isDraw()) { // checks for draw\n currentState = GameState.DRAW;\n }\n // Otherwise, no change to current state (still GameState.PLAYING).\n }", "private GamePiece[][] initBoard(int rows, int cols, Random rand) {\n gameBoard = new GamePiece[rows][cols];\n curPlayerRow = 0;\n curPlayerCol = 0;\n for(int i = 0; i < rows; i++){\n for(int j = 0; j < cols; j++){\n gameBoard[i][j] = new EmptyPiece();\n }\n }\n gameBoard[0][0] = new PlayerPiece(INIT_PLAYER_POINTS);\n curTrollRow = getRandTrollRow(rand, rows);\n curTrollCol = getRandTrollCol(rand, cols);\n while(curTrollRow == 7 && curTrollCol == 9){\n curTrollRow = getRandTrollRow(rand, rows);\n curTrollCol = getRandTrollCol(rand, cols);\n }\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n gameBoard[7][9] = new TreasurePiece(TREASURE_POINTS);\n return gameBoard;\n }", "public void populateRandomly(final EVGameState state)\n \t{\n \t\tfor (int i = 0; i < 6; i++) {\n \t\t\tfinal int width = MathUtils.getRandomIntBetween(32, 128);\n \t\t\tfinal int height = MathUtils.getRandomIntBetween(24, 72);\n \t\t\tfinal Point3D origin = getRandomSolarPoint(Math.max(width, height));\n \t\t\tfinal SolarSystem tSolar = SolarSystem.randomSolarSystem(width, height, origin, state);\n \t\t\taddSolarSystem(tSolar);\n \t\t}\n\t\tfor (int i = 0; i < 10; i++) {\n \t\t\tfinal SolarSystem ss1 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tfinal SolarSystem ss2 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tif (ss1.equals(ss2)) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tfinal Portal portal1 = new Portal(state.getNextPropID(), state.getNullPlayer(), ss1.getWormholeLocation(), ss1, ss2);\n \t\t\tfinal Portal portal2 = new Portal(state.getNextPropID() + 1, state.getNullPlayer(), ss2.getWormholeLocation(), ss2,\n \t\t\t\t\tss1);\n \t\t\tfinal Wormhole tempWorhmhole = new Wormhole(portal1, portal2, ss1.getPoint3D().distanceTo(ss2.getPoint3D()), state);\n \t\t\taddWormhole(tempWorhmhole, state);\n \t\t}\n \t}", "private static boolean isValidBoard(byte[][] board) {\n for(int columnIndex = 0; columnIndex < board.length; columnIndex++) {\n for(int rowIndex = 0; rowIndex < board[columnIndex].length; rowIndex++) {\n byte value = board[columnIndex][rowIndex];\n if((value != IBoardState.symbolOfInactiveCell) && (value != IBoardState.symbolOfEmptyCell) && (value != IBoardState.symbolOfFirstPlayer) && (value != IBoardState.symbolOfSecondPlayer)) {\n return false;\n }\n }\n }\n return true;\n }", "private int Rand_Move() {\n\t\tRandom r = new Random();\n\t\tint move = NO_MOVE;\n\t\tdo{\n\t\t\tmove = r.nextInt(9);\n\t\t}while(square_empty[move] == false);\n\t\treturn move;\n\t}", "public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }", "public interface BoardGameBrain {\n\n void init(Board board);\n\n boolean playerHasWon();\n\n boolean draw();\n\n boolean isWinningMinorDiagonal();\n boolean isWinningMajorDiaogonal();\n boolean isWinningRow();\n boolean isWinningColumn();\n}", "public abstract void createBoard();", "public void step()\n { \n //Remember, you need to access both row and column to specify a spot in the array\n //The scalar refers to how big the value could be\n //int someRandom = (int) (Math.random() * scalar)\n //remember that you need to watch for the edges of the array\n\t int randomRow = (int)(Math.random() * grid.length - 1);\n\t int randomCol = (int)(Math.random() * grid[0].length - 1);\n\t int randomDirection = (int)(Math.random() * 3);\n\t int randomDirectionFire = (int)(Math.random() * 4);\n\t int randomSpread = (int)(Math.random() * 100);\n\t int randomTelRow = (int)(Math.random() * grid.length);\n\t int randomTelCol = (int)(Math.random() * grid[0].length);\n\t \n\t //Sand\n\t if(grid[randomRow][randomCol] == SAND && (grid[randomRow + 1][randomCol] == EMPTY || grid[randomRow + 1][randomCol] == WATER))\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\n\t }\n\t //Water\n\t if(grid[randomRow][randomCol] == WATER && randomCol - 1 >= 0)\n\t {\n\t\t if(randomDirection == 1 && grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t //Helium\n\t if(grid[randomRow][randomCol] == HELIUM && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow - 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else if(randomDirection == 1 && grid[randomRow - 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Bounce\n\t if(grid[randomRow][randomCol] == BOUNCE)\n\t { \t\n\t\t if(randomRow + 1 >= grid[0].length - 1 || randomRow + 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = true;\n\t\t }\n\t\t else if(randomRow - 1 < 0 || randomRow - 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = false;\n\t\t }\n\t\t \n\t\t if(hitEdge[randomCol] == true)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Virus\n\t if(grid[randomRow][randomCol] == VIRUS && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t \n\t\t\t int temp = grid[randomRow + 1][randomCol];\n\t\t\t //VIRUS takeover\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = VIRUS;\n\t\t\t }\n\t\t\t //TEMP takeover\n\t\t\t grid[randomRow][randomCol] = temp;\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = temp;\n\t\t\t }\n\t }\n\t \n\t //Fire\n\t if(grid[randomRow][randomCol] == FIRE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t { \n\t\t if(randomDirectionFire == 1)\n\t\t {\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol - 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 3)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol + 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t \n\t\t //Fire Eats Vine\n\t\t if(grid[randomRow - 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = FIRE;\n\t\t }\n\t\t \n\t\t //Fire Blows Up Helium\n\t\t if(grid[randomRow - 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t //Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t }\n\t \n\t //Vine\n\t if(grid[randomRow][randomCol] == VINE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t { \n\t\t\t if(randomSpread == 1)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t }\n\t\t }\n\t\t else if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t if(randomSpread >= 90)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t\t grid[randomRow][randomCol + 1] = VINE;\n\t\t\t\t grid[randomRow][randomCol - 1] = VINE;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //Teleport\n\t if(grid[randomRow][randomCol] == TELEPORT && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t grid[randomTelRow][randomTelCol] = TELEPORT;\n\t\t grid[randomRow][randomCol] = EMPTY;\n\t }\n\t \n\t //Laser\n\t if(grid[randomRow][randomCol] == LASER && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(randomDirectionLaser == 1 && randomRow - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = LASER;\n\t\t\t grid[randomRow - 4][randomCol] = EMPTY;\n\t\t\t if(randomRow + 1 == grid.length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = LASER;\n\t\t\t grid[randomRow + 4][randomCol] = EMPTY;\n\t\t\t if(randomRow - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 3 && randomCol - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = LASER;\n\t\t\t grid[randomRow][randomCol - 4] = EMPTY;\n\t\t\t if(randomCol + 1 == grid[0].length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = LASER;\n\t\t\t grid[randomRow][randomCol + 4] = EMPTY;\n\t\t\t if(randomCol - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t }\n }", "public String getStateOfBoard()\n {\n // This function is used to print state of the board. such as number of coins present on the board\n String str=\"\";\n str += \"Black_Coins Count:\"+this.gameController.getCoinsCount(CoinType.BLACK) +\" Red_Coins Count:\"+this.gameController.getCoinsCount(CoinType.RED);\n return str;\n }", "private static String gameStatus(char[][] board){\n\t\t\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\t// check horizontal lines && vertical lines for player x\n\t\t\tif ((board[i][0] == 'X' && board[i][1] == 'X' && board[i][2] == 'X') || \n\t\t\t\t\t(board[0][i] == 'X' && board[1][i] == 'X' && board[2][i] == 'X')){\n\t\t\t\twinner = 'X';\n\t\t\t\treturn \"true\";\n\t\t\t}\n\t\t}\n\t\t//check diags for x\n\t\tif ((board[0][0] == 'X' && board[1][1] == 'X' && board[2][2] == 'X') || \n\t\t\t\t(board[0][2] == 'X' && board[1][1] == 'X' && board[2][0] == 'X')){\n\t\t\twinner = 'X';\n\t\t\treturn \"true\";\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < 3 ; i++) {\n\t\t\t// check horizontal and vertical lines for player o\n\t\t\tif ((board[i][0] == 'O' && board[i][1] == 'O' && board[i][2] == 'O') || \n\t\t\t\t\t(board[0][i] == 'O' && board[1][i] == 'O' && board[2][i] == 'O')){\n\t\t\t\twinner = 'O';\n\t\t\t\treturn \"true\";\n\t\t\t}\n\t\t}\n\t\t//check diags for o\n\t\tif ((board[0][0] == 'O' && board[1][1] == 'O' && board[2][2] == 'O') || \n\t\t\t\t(board[0][2] == 'O' && board[1][1] == 'O' && board[2][0] == 'O')){\n\t\t\twinner = 'O';\n\t\t\treturn \"true\";\n\t\t}\n\n\t\t// check for tie\n\t\tint emptyCells = 9;\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\tfor (int j = 0; j < 3; j++){\n\t\t\t\tif (board[i][j]!='\\0') emptyCells -= 1;\t\t\n\t\t\t}\n\t\t}\n\t\t// if all cells are filled, game is over with a tie\n\t\tif (emptyCells == 0) return \"tie\";\n\n\t\t// otherwise game is not over and return false\n\t\t//printBoard(board);\n\n\t\treturn \"false\";\n\t}", "private TileState getStateOf(long pos) {\r\n\t\tif ((pos & darkTiles) != 0L) {\r\n return TileState.DARK;\r\n } else if ((pos & lightTiles) != 0L) {\r\n return TileState.LIGHT;\r\n } else {\r\n return TileState.EMPTY;\r\n }\r\n\t}", "public void setTestBoard() {\n\n /*game.setNode(new NodeImp(\"2,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"2,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"3,2\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"3,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));\n\n game.setNode(new NodeImp(\"4,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"5,5\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));*/\n\n }", "public static int checkForWin(BitSet state, BitSet theirBoard) {\n \n BitSet[] myWins = Shifts.doShifts(state, 5, true);\n BitSet[] theirWins = Shifts.doShifts(theirBoard, 5, true);\n\n\n boolean iWon = !myWins[0].isEmpty() || !myWins[1].isEmpty() || !myWins[2].isEmpty() || !myWins[3].isEmpty();\n boolean theyWon = !theirWins[0].isEmpty() || !theirWins[1].isEmpty() || !theirWins[2].isEmpty() || !theirWins[3].isEmpty();\n \n if (iWon && theyWon) {\n //draw, we both have a win\n return 0;\n }\n else if (iWon) {\n return 3000; \n }\n else if (theyWon){\n return -3000;\n }\n else {\n return 13;\n }\n }", "private static boolean isWin()\n {\n boolean win = true;\n for(Ship[] k:map)\n {\n for(Ship o:k)\n {\n if(o.getState()==1)\n win=false;\n }\n }\n return win;\n }", "public abstract void randomMoves();" ]
[ "0.68925774", "0.6865234", "0.67012715", "0.6644733", "0.6642271", "0.6593003", "0.65903074", "0.6575017", "0.65453386", "0.6536116", "0.6503334", "0.6500399", "0.6484959", "0.6454841", "0.64447993", "0.6443566", "0.6440644", "0.6410966", "0.640561", "0.639737", "0.63703114", "0.6357842", "0.63527536", "0.63450015", "0.63359284", "0.632632", "0.6319738", "0.63158286", "0.6300874", "0.62965244", "0.6284103", "0.6270918", "0.62687606", "0.6242971", "0.6240921", "0.623557", "0.62339044", "0.623367", "0.62319005", "0.6217333", "0.62096334", "0.6190911", "0.61858165", "0.61785036", "0.6175611", "0.6174504", "0.61716753", "0.6161146", "0.61500347", "0.6149617", "0.61466646", "0.6144784", "0.61381197", "0.6134496", "0.61281914", "0.6125857", "0.6124935", "0.6123192", "0.6120892", "0.6109503", "0.61091745", "0.6098785", "0.60979855", "0.60959554", "0.6089973", "0.6087927", "0.60865617", "0.6080388", "0.6076951", "0.60741323", "0.60708344", "0.6070752", "0.6067896", "0.6066358", "0.6065875", "0.60657215", "0.6065341", "0.60620517", "0.6058853", "0.60562974", "0.60498935", "0.60488707", "0.60397077", "0.6030919", "0.60258996", "0.6024916", "0.60227007", "0.60216546", "0.60196966", "0.6017153", "0.60154855", "0.60153705", "0.60150003", "0.60129654", "0.6011035", "0.60067916", "0.60058135", "0.60019577", "0.59914565", "0.59914213", "0.59899783" ]
0.0
-1
Gets the employee details.
@GetMapping(value="/employes") public List<Employee> getEmployeeDetails(){ List<Employee> employeeList = employeeService.fetchEmployeeDetails(); return employeeList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "public List<Employee> getAllEmployeeDetail() {\n\t\treturn dao.getAllEmployeeDetail();\n\t}", "public Employeedetails getEmployeeDetailByName(String employeeId);", "@Override\n\tpublic EmployeeBean getEmployeeDetails(Integer id) throws Exception {\n\t\treturn employeeDao.getEmployeeDetails(id);\n\t}", "public String getEmployeeDetails(int employeeId) {\n\treturn employeeService.getEmployeeDetails(employeeId).toString(); \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 }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "public List<EmployeeDetails> getEmployeeDetails();", "@Override\n\tpublic List<Empdetails> getemplist() {\n\t\treturn empDAO.getemplist();\n\t}", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.GET)\r\n\tpublic Employee getEmployeedetails(@PathVariable int empId) throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.getEmployee(empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(204, e.getMessage());\r\n\t\t}\r\n\t}", "public Employee getEmployeeDetailById(int id) {\n\t\treturn dao.getEmployeeDetailById(id);\n\t}", "@Override\n\tpublic Empdetails getemp(int empid) {\n\t\treturn empDAO.getemp(empid);\n\t}", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n if (employeelistBuilder_ == null) {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n } else {\n return employeelistBuilder_.getMessage();\n }\n }", "public jkt.hms.masters.business.MasEmployee getEmployee () {\n\t\treturn employee;\n\t}", "public Employee getEmployee() {\n return employee;\n }", "public HourlyEmployee getEmployee() {\n\t\treturn employee;\n\t}", "public String getEmployeeName() {\n return employeeName;\n }", "@GetMapping(value=\"/employes/{Id}\")\n\tpublic Employee getEmployeeDetailsByEmployeeId(@PathVariable Long Id){\n\t\t\n\t\tEmployee employee = employeeService.fetchEmployeeDetailsByEmployeeId(Id);\n\t\t\n\t\treturn employee;\n\t\t}", "public String getEmployees(){\n return employees;\n }", "public String getEmployeeMangerDetails(Employeedetails employeedetails);", "public String getEmployeeId() {\n return employeeId;\n }", "public String getEmployeeId() {\n return employeeId;\n }", "public Map<String, Person> getEmployees() {\n return employees;\n }", "public Employeedetails getEmployee(Employeedetails employeeDetail,\n\t\t\tConnection connection) {\n\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tString employeeId = employeeDetail.getEmployeeId();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tString squery = \"select * from employeeregister where employeeid ='\"\n\t\t\t\t\t+ employeeId + \"';\";\n\t\t\trs = statement.executeQuery(squery);\n\t\t\tif (rs.next()) {\n\t\t\t\t/*\n\t\t\t\t * return \"<h2>Details of Employee # \" + employeeId + \" </h2><p><h3>Employee\n\t\t\t\t * name: \" + rs.getString(2) + \"</h3>\";\n\t\t\t\t */\n\t\t\t\temployeeDetail.setEmployeeName(rs.getString(2));\n\n\t\t\t} else {\n\t\t\t\temployeeDetail.setEmployeeName(\"0\");\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn employeeDetail;\n\n\t}", "@RequestMapping(value = \"/listEmployees\", method = RequestMethod.GET)\r\n\tpublic Employee employees() {\r\n System.out.println(\"---BEGIN\");\r\n List<Employee> allEmployees = employeeData.findAll();\r\n \r\n System.out.println(\"size of emp == \"+allEmployees.size());\r\n System.out.println(\"---END\");\r\n Employee oneEmployee = allEmployees.get(0);\r\n\t\treturn oneEmployee;\r\n }", "EmployeeDetail getById(long identifier) throws DBException;", "public Employee getByID(int empId) {\n\t\tEmployee e = employees.get(empId);\n\t\tSystem.out.println(e);\n\t\treturn e;\n\t}", "@Override\n\tpublic List<Employee> getEmpList() throws EmpException {\n\t\treturn dao.getEmpList();\n\t}", "List<Employee> allEmpInfo();", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "public Employee viewInformation(int id) {\n\t\tEmployee employee = new Employee(); \n\t\ttry{ \n\n\t\t\tString sql = \"select * from employees where id = \"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\n\t\t\tresultSet.next();\n\t\t\temployee.setId(resultSet.getInt(\"employee_id\"));\n\t\t\temployee.setUsername(resultSet.getString(\"username\"));\n\t\t\temployee.setPassword(resultSet.getString(\"password\"));\n\t\t\temployee.setFirstName(resultSet.getString(\"first_name\"));\n\t\t\temployee.setLastName(resultSet.getString(\"last_name\"));\n\t\t\temployee.setEmail(resultSet.getString(\"email\"));\n\t\t\t\n\t\t\treturn employee;\n\t\t\t \n\t\t}catch(Exception e){System.out.println(e);} \n\t\treturn null; \t\t\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "@Override\r\n\t\r\n\tpublic List<Employee> getAllDetails()\r\n\t{\r\n\t\t\r\n\t\tList<Employee> empList =hibernateTemplate.loadAll(Employee.class);\r\n\t\t\r\n\t\treturn empList;\r\n\t}", "public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}", "public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic List<EmployeeBean> getEmployeeList() throws Exception {\n\t\treturn employeeDao.getEmployeeList();\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"shiyong@cs.sunysb.edu\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "public ViewObjectImpl getEmployees() {\n return (ViewObjectImpl)findViewObject(\"Employees\");\n }", "public String getEmployeeAddress() {\r\n\r\n\t\treturn employeeAddress;\r\n\t}", "public String getEmpID() {\r\n return empID;\r\n }", "public String getEmployeeName();", "java.lang.String getEmployeeName();", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\tList<Employee> employee = new ArrayList<>();\n\t\tlogger.info(\"Getting all employee\");\n\t\ttry {\n\t\t\temployee = employeeDao.getAllEmployee();\n\t\t\tlogger.info(\"Getting all employee = {}\",employee.toString());\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn employee;\n\t}", "public long getEmployeeId() {\n return employeeId;\n }", "public void empDetails() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "@Override\n\tpublic ArrayList<Employee> getEmpList() throws HrExceptions {\n\t\tSystem.out.println(\"In getEmpList() of Dao\");\n\t\treturn null;\n\t}", "public Employee myInfo(String username) {\r\n\t\tEmployee e = SQLUtilityEmployees.getEmployeeByUsername(username);\r\n\t\tSystem.out.println(e);\r\n\t\treturn e;\r\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "public String getEmployeeNum() {\n return employeeNum;\n }", "private String getEmployees() {\n\n String uri = new String(\"http://\" + mRESTServer.getHost() +\n mRESTServer.getContextPath());\n try {\n String result = restTemplate.getForObject(uri, String.class);\n\n System.out.println(result);\n return result+\": (\"+uri+\")\";\n\n } catch (HttpClientErrorException e) {\n /**\n *\n * If we get a HTTP Exception display the error message\n */\n log.error(\"error: \" + e.getResponseBodyAsString());\n\n ObjectMapper mapper = new ObjectMapper();\n ErrorHolder eh = null;\n try {\n eh = mapper.readValue(e.getResponseBodyAsString(), ErrorHolder.class);\n } catch (IOException ignored) {\n }\n\n log.error(\"error: \" + eh.getErrorMessage());\n\n } catch (Exception e) {\n log.error(\"error: \" + e.getMessage());\n\n }\n\n return null;\n }", "@Override\n\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}", "public int getEmployeeId() {\n return employeeId_;\n }", "public int getEmployeeId() {\n return employeeId_;\n }", "public int getEmployeeID() {\r\n return employeeID;\r\n }", "@Override\n\tpublic List<Booking> getDetails(String empid) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"from Booking where employeeId=\"+empid);\n\t\treturn query.list();\n\t}", "public Employee getHRhead();", "public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}", "public String getEmployee(String empID) throws JsonParseException,\n\t\t\tJsonMappingException, IOException;", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", salary=\" + salary + \", designation=\" + designation\r\n\t\t\t\t+ \", department=\" + department + \", address=\" + address + \"]\";\r\n\t}", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic List<EmployeeReferalResponseModel> getEmployeeDetails(String referance_email) throws CustomException {\n\n\t\tif (!UserUtility.isValidEmail(referance_email)) {\n\t\t\tthrow new CustomException(204, \"Invalid email id\");\n\t\t}\n\t\tList<EmployeeReferal> employeeReferal = employeeReferalRepository.findByEmployeeEmail(referance_email);\n\n\t\tif (Objects.isNull(employeeReferal) || employeeReferal.isEmpty()) {\n\t\t\tthrow new CustomException(500, \"Reference user does not exists\");\n\t\t}\n\t\treturn conversionUtility.convertTOGetEmployees(employeeReferal);\n\t}", "@Override\n\tpublic EmployeeBean getEmployee(int employeeId) {\n\t\tLOGGER.info(\"starts getEmployee method\");\n\t\tLOGGER.info(\"Ends getEmployee method\");\n\t\treturn adminEmployeeDao.getEmployee(employeeId);\n\t}", "@Then(\"List Employee specific details\")\r\n\tpublic void list_Employee_specific_details() {\n\t\trestTester.getSpecificEmployeeIdRecord(generatedEmployeeId);\r\n\t\tSystem.out.println(restTester.returnResponseAsString());\r\n\t\tassertTrue(restTester.returnResponseAsString().contains(\"false\"));\r\n\t}", "public Employee[] getEmployeesList() {\n\t\treturn employees;\n\t}", "@GetMapping(\"/my-info\")\n\t@Secured({Roles.ADMIN, Roles.BOSS, Roles.WORKER})\n\tpublic ResponseEntity<EmployeeDto> getMyInfo() {\n\t\tLogStepIn();\n\n\t\t// Gets the currently logged in user's name\n\t\tString username = SecurityContextHolder.getContext().getAuthentication().getName();\n\n\t\tEmployee employee = userRepository.findByName(username).getEmployee();\n\t\treturn LogStepOut(ResponseEntity.ok(toDto(employee)));\n\t}", "public SummitEntityImpl getEmpEO() {\r\n return (SummitEntityImpl)getEntity(1);\r\n }", "@Override\r\n\tpublic List<Employe> getEmployes() {\n\t\treturn dao.getEmployes();\r\n\t}", "public String toString() {\n return \"Employee Id:\" + id + \" Employee Name: \" + name+ \"Employee Address:\" + address + \"Employee Salary:\" + salary;\n }", "@RequestMapping(path = \"/employee\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<Employee> displayEmployee() {\r\n\t\treturn er.findAll();\r\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}", "public Employee getEmployee(String employeeID) {\n\n\t\tEmployee employee = new Employee();\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE E.ID = \\'\" + employeeID + \"\\' AND P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\trs.next();\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employee;\n\t}", "public List<Employee> list() {\n\t\t\treturn employees;\n\t\t}", "@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn template.loadAll(EmpContactDetail.class);\n\t}", "public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }", "public Long getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "public void getByIdemployee(int id){\n\t\tEmployeeDTO employee = getJerseyClient().resource(getBaseUrl() + \"/employee/\"+id).get(EmployeeDTO.class);\n\t\tSystem.out.println(\"Nombre: \"+employee.getName());\n\t\tSystem.out.println(\"Apellido: \"+employee.getSurname());\n\t\tSystem.out.println(\"Direccion: \"+employee.getAddress());\n\t\tSystem.out.println(\"RUC: \"+employee.getRUC());\n\t\tSystem.out.println(\"Telefono: \"+employee.getCellphone());\n\t}", "public int getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchemployee\")\n\tpublic ModelAndView getEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"ShowEmployeeDetails.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "@Override\n\tpublic Employee getEmployeeById(int emp_id) {\n\t\tlog.debug(\"EmplyeeService.getEmployeeById(int emp_id) return Employee object with id\" + emp_id);\n\t\treturn repositary.findById(emp_id);\n\t}", "public Map<Integer, Employee> getEmployeemap(){\r\n\t\treturn employee;\r\n\t}", "public int getEmployeeId() {\n\t\treturn employeeId;\n\t}", "public List<Employee> getEmployeesOnly() {\n\t\treturn edao.listEmployeOnly();\n\t}", "public void getEmployee() {\r\n //what needs to be returned?\r\n }", "public Employee getEmployeeById(Long employeeId) {\n return employeeRepository.findEmployeeById(employeeId);\n }", "public String getempID() {\n\t\treturn _empID;\n\t}", "public int getEmployeeNumber() {\r\n return employeeNumber;\r\n }", "@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}", "public long getEmployeeId() {\n\t\treturn employeeId;\n\t}", "@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}" ]
[ "0.79035574", "0.76193917", "0.7588068", "0.7512314", "0.7427224", "0.73315096", "0.7320529", "0.7320529", "0.7273256", "0.7271781", "0.72667855", "0.72198725", "0.7202375", "0.7156523", "0.7154912", "0.7154912", "0.7123293", "0.7057877", "0.7044644", "0.70254576", "0.7012964", "0.7007416", "0.7002835", "0.6998145", "0.69917005", "0.6972174", "0.6972174", "0.68335", "0.6812016", "0.67932385", "0.6784828", "0.6783623", "0.6780473", "0.6775882", "0.6766759", "0.67613995", "0.67498493", "0.6742607", "0.6739955", "0.6739038", "0.67300797", "0.6727298", "0.6725101", "0.67205495", "0.6709707", "0.6694713", "0.6665919", "0.6663299", "0.66544133", "0.6651801", "0.6649643", "0.66484547", "0.66324496", "0.662495", "0.6623501", "0.66189337", "0.6616579", "0.6581079", "0.6580953", "0.6570172", "0.65632325", "0.6547874", "0.6544596", "0.6541037", "0.6540249", "0.6539154", "0.65390253", "0.6538817", "0.65387696", "0.65376395", "0.65279084", "0.6526709", "0.6523744", "0.65222436", "0.65212935", "0.6520135", "0.65186244", "0.651703", "0.651144", "0.65085536", "0.65029836", "0.6499364", "0.64781165", "0.6477948", "0.647646", "0.6476384", "0.64725304", "0.647021", "0.646743", "0.64658064", "0.6465635", "0.6459188", "0.645746", "0.64481527", "0.6447385", "0.6442709", "0.6440168", "0.6439697", "0.6431676", "0.6423692" ]
0.78201
1
Creates the employee deatils.
@PostMapping(value="/employes") public void createEmployeeDeatils(@RequestBody Employee employee){ employeeService.saveEmployeeDetails(employee); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "@Override\n public void seedData() throws EmployeeCreationException, DepartmentCreationException {\n\n }", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "private void DataCreator() {\n\t\t// Creation of employees\n\t\tEmployee emp1 = new Employee(\"Akos\", \"Toth\", true);\n\t\tEmployee emp2 = new Employee(\"Gabor\", \"Kovacs\", true);\n\t\tEmployee emp3 = new Employee(\"Adam\", \"Ciceri\", true);\n\n\t\tempRep.save(emp1);\n\t\tempRep.save(emp2);\n\t\tempRep.save(emp3);\n\t\tLOGGER.info(\"TEST DATA: Employees saved!\");\n\n\t\t// creation of tasks\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\n\t\ttry {\n\t\t\tTaskStates task1State = new TaskStates(\"CLOSED\");\n\t\t\tProjectTask task1 = new ProjectTask(\n\t\t\t\t\t\"Modelling of system\",\n\t\t\t\t\t\"Engineering Systems Analyst\",\n\t\t\t\t\t\"Engineering Systems Analyst Dorking Surrey Salary ****K Our client is located in Dorking, Surrey and are looking for Engineering Systems Analyst our client provides specialist software development Keywords Mathematical Modelling, Risk Analysis, System Modelling, Optimisation, MISER, PIONEEER Engineering Systems Analyst Dorking Surrey Salary ****K\",\n\t\t\t\t\ttask1State,\n\t\t\t\t\tsdf.parse(\"20-01-2015\"),\n\t\t\t\t\tsdf.parse(\"25-01-2015\"),\n\t\t\t\t\t0.9);\n\t\t\tTaskStates task2State = new TaskStates(\"OPEN\");\n\t\t\tProjectTask task2 = new ProjectTask(\n\t\t\t\t\t\"Material performance design\",\n\t\t\t\t\t\"Stress Engineer Glasgow\",\n\t\t\t\t\t\"Stress Engineer Glasgow Salary **** to **** We re currently looking for talented engineers to join our growing Glasgow team at a variety of levels. The roles are ideally suited to high calibre engineering graduates with any level of appropriate experience, so that we can give you the opportunity to use your technical skills to provide high quality input to our aerospace projects, spanning both aerostructures and aeroengines. In return, you can expect good career opportunities and the chance for advancement and personal and professional development, support while you gain Chartership and some opportunities to possibly travel or work in other offices, in or outside of the UK. The Requirements You will need to have a good engineering degree that includes structural analysis (such as aeronautical, mechanical, automotive, civil) with some experience in a professional engineering environment relevant to (but not limited to) the aerospace sector. You will need to demonstrate experience in at least one or more of the following areas: Structural/stress analysis Composite stress analysis (any industry) Linear and nonlinear finite element analysis Fatigue and damage tolerance Structural dynamics Thermal analysis Aerostructures experience You will also be expected to demonstrate the following qualities: A strong desire to progress quickly to a position of leadership Professional approach Strong communication skills, written and verbal Commercial awareness Team working, being comfortable working in international teams and self managing PLEASE NOTE SECURITY CLEARANCE IS REQUIRED FOR THIS ROLE Stress Engineer Glasgow Salary **** to ****\",\n\t\t\t\t\ttask2State,\n\t\t\t\t\tsdf.parse(\"20-06-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\t\t\tTaskStates task3State = new TaskStates(\"IN_PROGRESS\");\n\t\t\tProjectTask task3 = new ProjectTask(\n\t\t\t\t\t\"Implementation embedded system\",\n\t\t\t\t\t\"CNC Programmer\",\n\t\t\t\t\t\"Working within a small but busy sub contract ISO accredited sub contract machine shop. Must be able to programme straight from drawings programming and operating a Bridgeport VMC or a Haas VMC with Heidenhain controls. Machining 1 off,s to small batch work. Hours of work are Mon Thurs 8am 5.00pm and 3.00pm finish on a Friday\",\n\t\t\t\t\ttask3State,\n\t\t\t\t\tsdf.parse(\"20-03-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\n\t\t\ttaskStatesRep.save(task1State);\n\t\t\ttaskStatesRep.save(task2State);\n\t\t\ttaskStatesRep.save(task3State);\n\t\t\t\n\t\t\tprjTaskRep.save(task1);\n\t\t\tprjTaskRep.save(task2);\n\t\t\tprjTaskRep.save(task3);\n\t\t\tLOGGER.info(\"TEST DATA: Tasks and task statuses saved!\");\n\t\t\t\n\t\t\t// creation of project\n\t\t\tProject prj1 = new Project(\"Building modernization\", sdf.parse(\"01-01-2015\"), sdf.parse(\"01-09-2015\"), 0.9, 0.1, true);\n\t\t\tTaskSet tskSet1 = prj1.assignTaskToEmployee(emp1, task1);\n\t\t\tTaskSet tskSet2 = prj1.assignTaskToEmployee(emp2, task2);\n\t\t\tTaskSet tskSet3 = prj1.assignTaskToEmployee(emp3, task3);\n\t\n\t\t\ttaskSetRep.save(tskSet1);\n\t\t\ttaskSetRep.save(tskSet2);\n\t\t\ttaskSetRep.save(tskSet3);\n\t\t\tLOGGER.info(\"TEST DATA: Task sets are saved!\");\n\t\n\t\t\tprjRep.save(prj1);\n\t\t\tLOGGER.info(\"TEST DATA: Projects are saved!\");\n\t\t\t\n\t\t\t//creation of Performance statistics\n\t\t\tPerfStat emp1PerfStat = new PerfStat(prj1, emp1, 10, 5, 0, 100);\n\t\t\tPerfStat emp2PerfStat = new PerfStat(prj1, emp2, 5, 15, 6, 170);\n\t\t\tPerfStat emp3PerfStat = new PerfStat(prj1, emp3, 0, 6, 3, 20);\n\t\t\t\n\t\t\tperfStatRep.save(emp1PerfStat);\n\t\t\tperfStatRep.save(emp2PerfStat);\n\t\t\tperfStatRep.save(emp3PerfStat);\n\t\t\tLOGGER.info(\"TEST DATA: Project and employee assignments are saved!\");\n\n\t\t\t\n\t\t\tLOGGER.info(\"TEST DATA: Upload of TEST employee, task and project data is FINISHED!\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public static void createEmployees() {\n Connection con = getConnection();\n\n String createString;\n createString = \"create table Employees (\" +\n \"Employee_ID INTEGER, \" +\n \"Name VARCHAR(30))\";\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(createString);\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Employees Table Created\");\n }", "@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}", "public Manager(Employee[] employees, String name, String jobTitle, int level, String dept) {\n\t\tsuper(name, jobTitle, level, dept);\n\t\tthis.employees = employees;\n\t}", "public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }", "@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }", "Employee() {\n\t}", "public Department(int departmentID, String departmentName, Manager departmentManager, ArrayList<Employee> listOfEmployees1) {\n this.departmentID = departmentID;\n this.departmentName = departmentName;\n this.departmentManager = departmentManager;\n this.listOfEmployees = listOfEmployees1;\n }", "public void createDepartament(int id, String denumire, int numarRaioane) {\n\t\tif (departamentOperations.checkDepartament(id) == true)\n\t\t\tSystem.out.println(\"Departament existent!\");\n\t\tDepartament newDepartament = new Departament(id, denumire, numarRaioane);\n\t\tList<Departament> list = departamentOperations.getAllDepartamente();\n\t\tdepartamentOperations.addDepartament(newDepartament);\n\t\tdepartamentOperations.printListOfDepartamente(list);\n\t}", "public static Department createScenarioDepartmentA() {\n\t\t\t//Establish all the employees\n\t\t\tManager managerA = new Manager(\"Manager A\");\n\t\t\tManager managerB = new Manager(\"Manager B\");\n\t\t\tEmployee developerA = new Developer(\"Developer A\");\n\t\t\tEmployee qaTesterA = new QATester(\"QATester A\");\n\n\t\t\t//Set up reporting employee hierarchy\n\t\t\tmanagerA.addReportingEmployee(managerB);\n\t\t\tmanagerB.addReportingEmployee(developerA);\n\t\t\tmanagerB.addReportingEmployee(qaTesterA);\n\t\t\t\n\t\t\t//Establish Departments, with head managers\n\t\t\tDepartment departmentA = new Department(managerA);\n\t\t\t\n\t\t\treturn departmentA;\n\t\t}", "public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}", "public static Department createScenarioDepartmentC() {\n\t\t\t//Establish all the employees\n\t\t\tManager managerE = new Manager(\"Manager E\");\n\t\t\tEmployee developerB = new Developer(\"Developer B\");\n\n\t\t\t//Set up reporting employee hierarchy\n\t\t\tmanagerE.addReportingEmployee(developerB);\n\t\t\t\n\t\t\t//Establish Departments, with head managers\n\t\t\tDepartment departmentC = new Department(managerE);\n\t\t\t\n\t\t\treturn departmentC;\n\t\t}", "@Override\n\tpublic void deleteEmployee() {\n\n\t}", "public void create(Employee employee, Company company, IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }", "@Test\n public void createEmployeeCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n assertFalse(employeeResource.createEmployee(new Employee(\"notdummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1)));\n\n //removing test data after tests to avoid clutter in database\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }", "public Employee(){\n this.employeeName = new String();\n this.employeeSalary = null;\n this.employeeProjectList = new ArrayList<String>();\n this.employeeDepartmentLead = new String();\n }", "public static void generarEmpleados() {\r\n\t\tEmpleado e1 = new Empleado(100,\"34600001\",\"Oscar Ugarte\",new Date(), 20000.00, 2);\r\n\t\tEmpleado e2 = new Empleado(101,\"34600002\",\"Maria Perez\",new Date(), 25000.00, 4);\r\n\t\tEmpleado e3 = new Empleado(102,\"34600003\",\"Marcos Torres\",new Date(), 30000.00, 2);\r\n\t\tEmpleado e4 = new Empleado(1000,\"34600004\",\"Maria Fernandez\",new Date(), 50000.00, 7);\r\n\t\tEmpleado e5 = new Empleado(1001,\"34600005\",\"Augusto Cruz\",new Date(), 28000.00, 3);\r\n\t\tEmpleado e6 = new Empleado(1002,\"34600006\",\"Maria Flores\",new Date(), 35000.00, 2);\r\n\t\tlistaDeEmpleados.add(e1);\r\n\t\tlistaDeEmpleados.add(e2);\r\n\t\tlistaDeEmpleados.add(e3);\r\n\t\tlistaDeEmpleados.add(e4);\r\n\t\tlistaDeEmpleados.add(e5);\r\n\t\tlistaDeEmpleados.add(e6);\r\n\t}", "public static void main(String[] args) {\n\n\t\tDepartamento dep40= new Departamento ( 40, \"Formacion\", null );\n\t\t\n\t\t\n\t\tEmpleado emp1 =new Empleado(1,\"paco\",\"perez\",\"h\", 5000, 28, 5, dep40) ;\n\t\t\n\t\t// para introducir el departaementp \n\t\t\n\t\t//primer metodo\n\t\t\n\t\t\n\t\t\t\t\n\t\tEmpleado emp2 =new Empleado(2,\"luis\",\"sanchez\",\"h\", 4000, 45, 2, dep40) ;\t\n\t\tEmpleado emp3 =new Empleado(4, \"javi\", \"perez\", \"h\", 8000, 54, 0.2, dep40);\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\tSystem.out.println(emp1);\n\t\tSystem.out.println(emp2);\t\n\t\tSystem.out.println(emp3);\n\t\t\n\t\tdep40.setJefe(emp1); // adjudico el Jefe al departamento 40\n\t\t\n\t\t\n\t\t// creo un departaemnto nuevo adjudicado a un empleado ade un departamento inicial ( no tienen por que ser el departamento del que ahora le reclama) usando el constructoe directamente ne vez de la variable que alude a la clase\n\t\t//departamento= new Departamento(120, \"formacion\", jefe)\n\t\tDepartamento dep120 = new Departamento (120, \"formacion\", new Empleado(5, \"luisa\", \"sanchez\", \"M\", 14000, 35, 2, dep40)); //he creado un empleado del depto 30 y luego le hago jefe del 120\n\t\t dep120.getJefe().setDepartamento(dep120); /* actuando con dos variables. como ese new empleado no tiene variable adjudicada \n\t\t *y tengo que hacer alusion a Úl para cambiaer en el empleado su departaemento , me valgo del un metodo dep120.getJefe()que averigua qcual es la direccion de ese empleado en la tabla departamento y con un set le ingerso el departaento nuievo\n\t\t \n\t\t \n\t\t */\n\t\t System.out.println (\"departaqmento 120\" + dep120.getJefe().getNombre());\n\t\t\n\t/* SALIDA POR CONSOLA :\n\t * el niombre del emp2, su salario y el nombre del departamento al que pertenence.\t// \n\t\t* como el nombre departamento no es un atributo normal sino que es NDE una clase relacionada .SE INVOCA AL GET DE LL ATRIBUTO INCLUIDO CONN LA CLASE Y TRAS EL LOS METODOS GET DE LA CLASE DEPARTAMENTO EN ESTE CLASO EL DEL CAMPO NOMBRE DEL DEPARTAMENTO\n\t*/\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre().toUpperCase());\n\t\t/*\n\t\t * el empleado \n\t\t * \n\t\t * */\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre());\n\tSystem.out.println(dep120);\n\t// OJO SE BUCLA POR QUE LOS TO STRING DE DEPARTAEMNTO Y CLIENTE SE CRIUZARIAN DEBORDANDO LA MEMORIA. PUEDO HACER VARIAS COSAS\n\t/* PUEDO QUITAR DEUNO DE LOS TO STRING DE UNA CLASE O DE LA OTRA SEGUN ME INTERESE EL CAMPO QUE LAS LIGA ( PEJ DEPARTAMENTO EN EMPLEADO)\n\t * PUEDO CREAR UN METODO QUE SALVE LA CONDICION DE NULL SI ALGUNA VARIABLE ESTA VACICA.\n\t * \n\t * \n\t */\n\t//SALIDA DEL NOMBRE DEL JEFE DEL DEAPARTAEMENTO QUE SEA POR EJEMPLO DE UN EMPLEADO ()\n\t\n\tSystem.out.println ( dep120.getJefe().getNombre()); //get jefe me dedevuelve el monbre de jefe dela tabala departaemnto. get Nombre me devuelve de la tabla empleados el nombre que estaba como jefe en departamento.\n\tSystem.out.println (\"el jefe de emp2 luis: \"+ emp2.getDepartamento().getJefe().getNombre());\n\tSystem.out.println(dep120);\n\t\n\t\n\t\n\t\n\t}", "@Test\r\n\tpublic void addEmployeeTestCase3() {\n\t\tEmployee employee3 = new Employee();\r\n\t\temployee3.name = \"Lingtan\";\r\n\t\temployee3.role = \"Ui designer\";\r\n\t\temployee3.email = \"lingtan@chainsys.com\";\r\n\t\temployee3.employeeID = \"Ling2655\";\r\n\t\temployee3.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee3.gender = \"Male\";\r\n\t\temployee3.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee3.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee3);\t\r\n\t}", "public static DetaisDevis createEntity(EntityManager em) {\n DetaisDevis detaisDevis = new DetaisDevis()\n .qteProduit(DEFAULT_QTE_PRODUIT)\n .totalHT(DEFAULT_TOTAL_HT)\n .totalTVA(DEFAULT_TOTAL_TVA)\n .totalTTC(DEFAULT_TOTAL_TTC);\n return detaisDevis;\n }", "@Test\n public void getEmployeesForDate(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n //creating dummy employee\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1));\n\n assertNotNull(employeeResource.getEMployeesForDate(\"2017-01-01\"));\n\n //clean up\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n }", "public static Departament createEntity(EntityManager em) {\n Departament departament = new Departament()\n .nameDepartament(DEFAULT_NAME_DEPARTAMENT)\n .idDepartament(DEFAULT_ID_DEPARTAMENT)\n .shortDsc(DEFAULT_SHORT_DSC);\n return departament;\n }", "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }", "public static Department createEntity(EntityManager em) {\n Department department = new Department()\n .name(DEFAULT_NAME)\n .departmentHead(DEFAULT_DEPARTMENT_HEAD)\n .status(DEFAULT_STATUS)\n .individualId(DEFAULT_INDIVIDUAL_ID);\n return department;\n }", "@Override\n\tpublic DaoEmpleados crearDAOEmpleados() {\n\t\treturn null;\n\t}", "Elevage createElevage();", "public addEmployee() {\n initComponents();\n \n conn = db.java_db();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width / 2 - getWidth() / 2, size.height / 2 - getHeight() / 2);\n }", "public static void main(String[] args) {\nEmployee emp = new Employee(1,\"Pankaj\",\"CEO\");\nEmployee emp1 = new Employee(2,\"AAAA\",\"CTO\");\n\t\tArrayList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\temployees.add(emp1);\n\t\temployees.add(emp);\n\t\temployees.add(new Employee(3,\"sdfd\",\"hr\"));\n\t\t\n\t\tfor(Employee e : employees)\n\t\t{\n\t\t\t//System.out.println(e.id+\" \"+e.name);\n\t\t\tif(e.getId()>2)\n\t\t\t\te.setDept(\"Manager\");\n\t\t\t\n\t\t\tSystem.out.println(e.getDept()+\" \"+e.getId()+\" \"+e.getName());\n\t\t\t\n\t\t}\n\t\t\n\t}", "public DepartmentAccessBean constructDepartments() throws Exception {\n\n\tif (deparments == null) {\t\n\t\t// Construct workers bean\n\t\tif (getDepartmentcode() != null) {\n\t\t\tdeparments = new DepartmentAccessBean();\n\t\t\tdeparments.setInitKey_division(getDepartmentcode().intValue());\n\t\t\tdeparments.refreshCopyHelper();\n\t\t}\n\t}\n\treturn deparments;\n}", "private static void createDemoData() {\n if (userManager.user_map.isEmpty() || accountManager.account_map.isEmpty() || banknoteManager.banknotes.isEmpty()) {\n if (userManager.user_map.isEmpty()) {\n userManager.createAccount(BankManager.class.getSimpleName(), \"jen\", \"1234\");\n userManager.createAccount(Teller.class.getSimpleName(), \"pete\", \"1234\");\n userManager.createAccount(Customer.class.getSimpleName(), \"steve\", \"1234\");\n }\n\n if (accountManager.account_map.isEmpty()) {\n accountManager.addAccount(CreditCard.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Youth.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Saving.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Chequing.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(CreditLine.class.getSimpleName(), Collections.singletonList(\"steve\"));\n }\n\n if (banknoteManager.banknotes.isEmpty()) {\n banknoteManager.banknotes = new HashMap<>();\n for (int d : banknoteManager.DENOMINATIONS) {\n banknoteManager.banknotes.put(String.valueOf(d), 50);\n }\n }\n }\n }", "public static Department createEntity(EntityManager em) {\n Department department = new Department().departmentName(DEFAULT_DEPARTMENT_NAME);\n return department;\n }", "@Override\n public void setDepartments() throws DepartmentCreationException {\n\n }", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"bebexitaHemoxita@gmail.com\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public void addEmployee(ActionRequest request, ActionResponse response)\n\t\t\tthrows SystemException, IOException, PortalException {\n\t\tlong employeeId = CounterLocalServiceUtil.increment(Employee.class.getName());\n\t\tEmployee employee = null;\n\t\temployee = EmployeeLocalServiceUtil.createEmployee(employeeId);\n\t\temployee.setEmployeeName(ParamUtil.getString(request, \"employeeName\"));\n\t\temployee.setEmployeeDesignation(ParamUtil.getString(request, \"employeeDesignation\"));\n\t\temployee.setAddress(ParamUtil.getString(request, \"address\"));\n\t\temployee.setEmail(ParamUtil.getString(request, \"email\"));\n\t\temployee.setPhoneNumber(ParamUtil.getString(request, \"phoneNumber\"));\n\t\t/* Uploading employee documents */\n\t\tThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);\n\t\t// Checking permission for ADD_EMPLOYEE\n//\t\tEmployeePermission.insertPermission(themeDisplay);\n\t\tcreateFolder(request, themeDisplay);\n\t\tlong fileEntryId = fileUpload(employee, themeDisplay, request);\n\t\temployee.setFileEntryId(fileEntryId);\n\t\t// setting groupId\n\t\temployee.setGroupId(themeDisplay.getScopeGroupId());\n\t\tEmployeeLocalServiceUtil.addEmployee(employee);\n\t\tResourceLocalServiceUtil.addResources(themeDisplay.getCompanyId(), themeDisplay.getScopeGroupId(),\n\t\t\t\tthemeDisplay.getUserId(), Employee.class.getName(), employeeId, false, true, true);\n\t}", "public static Department createScenarioDepartmentB() {\n\t\t\t//Establish all the employees\n\t\t\tManager managerC = new Manager(\"Manager C\");\n\t\t\tManager managerD = new Manager(\"Manager D\");\n\n\t\t\t//Set up reporting employee hierarchy\n\t\t\tmanagerC.addReportingEmployee(managerD);\n\t\t\t\n\t\t\t//Establish Departments, with head managers\n\t\t\tDepartment departmentB = new Department(managerC);\n\t\t\t\n\t\t\treturn departmentB;\n\t\t}", "public void run(String... args){\n User user = new User(\"bart\", \"bart@domain.com\", \"bart\", \"Bart\", \"Simpson\",\n true);\n Role userRole = new Role(\"bart\", \"ROLE_USER\");\n userRepository.save(user);\n roleRepository.save(userRole);\n\n User admin = new User(\"super\", \"super@domain.com\", \"super\",\n \"Super\", \"Hero\", true);\n Role adminRole1 = new Role(\"super\", \"ROLE_ADMIN\");\n Role adminRole2 = new Role(\"super\", \"ROLE_USER\");\n userRepository.save(admin);\n roleRepository.save(adminRole1);\n roleRepository.save(adminRole2);\n\n//\n// User admin2 = new User(\"bart\", \"anotherBart@gmail.com\", \"otherBart\",\n// \"Bart\", \"Williams\", true);\n// Role adminRole3 = new Role(\"bart\", \"ROLE_ADMIN\");\n// userRepository.save(admin2);\n// roleRepository.save(adminRole3);\n // preloading departments\n Department mathDepartment = new Department();\n mathDepartment.setName(\"Math\");\n mathDepartment.setBackgroundPhoto(\"/images/badAtMath.jpg\");\n Department histSsDpt = new Department();\n histSsDpt.setName(\"History & Social Sciences\");\n histSsDpt.setBackgroundPhoto(\"/images/historybg.jpg\");\n Department csDpt = new Department();\n csDpt.setName(\"Computer Science\");\n csDpt.setBackgroundPhoto(\"/images/csbg.jpg\");\n Department artDpt = new Department();\n artDpt.setName(\"Art\");\n artDpt.setBackgroundPhoto(\"/images/artbg.jpg\");\n\n departmentRepository.save(mathDepartment);\n departmentRepository.save(histSsDpt);\n departmentRepository.save(csDpt);\n departmentRepository.save(artDpt);\n\n\n\n // adding employees\n Employee employee1 = new Employee();\n employee1.setJobTitle(\"Geometry Instructor\");\n employee1.setName(\"Michael Murray\");\n employee1.setPhoto(\"/images/MichaelMurray.png\");\n employee1.setDepartment(mathDepartment);\n\n Employee employee2 = new Employee();\n employee2.setName(\"Katsuhiro Harada\");\n employee2.setJobTitle(\"Algebra Instructor\");\n employee2.setPhoto(\"/images/Harada.jpg\");\n employee2.setDepartment(mathDepartment);\n\n Employee employee3 = new Employee();\n employee3.setName(\"Dwayne Johnson\");\n employee3.setJobTitle(\"Calculus Instructor\");\n employee3.setPhoto(\"/images/dwayneJohnson.jpg\");\n employee3.setDepartment(mathDepartment);\n\n\n Employee employee4 = new Employee();\n employee4.setName(\"Elizabeth Jennings\");\n employee4.setJobTitle(\"US History Instructor\");\n employee4.setPhoto(\"/images/EJenningsphoto.jpg\");\n employee4.setDepartment(histSsDpt);\n\n Employee employee5 = new Employee();\n employee5.setName(\"Philip Jennings\");\n employee5.setJobTitle(\"World History Instructor\");\n employee5.setPhoto(\"/images/philJenningspic.jpg\");\n employee5.setDepartment(histSsDpt);\n\n Employee employee6 = new Employee();\n employee6.setName(\"Jack Bauer\");\n employee6.setJobTitle(\"Java Instructor\");\n employee6.setPhoto(\"/images/jackBauer1.jpg\");\n employee6.setDepartment(csDpt);\n\n Employee employee7 = new Employee();\n employee7.setName(\"Nina Myers\");\n employee7.setJobTitle(\"CyberSecurity Instructor\");\n employee7.setPhoto(\"/images/NinaMyers1.jpg\");\n employee7.setDepartment(csDpt);\n\n Employee employee8 = new Employee();\n employee8.setName(\"Bob Ross\");\n employee8.setJobTitle(\"Painting Instructor\");\n employee8.setPhoto(\"/images/bobross1.jpg\");\n employee8.setDepartment(artDpt);\n\n Employee employee9 = new Employee();\n employee9.setName(\"Crystal Latimer\");\n employee9.setJobTitle(\"Art History Instructor\");\n employee9.setPhoto(\"/images/crystalLatimer1.jpg\");\n employee9.setDepartment(artDpt);\n\n\n\n\n // saving employee objects\n employeeRepository.save(employee1);\n employeeRepository.save(employee2);\n employeeRepository.save(employee3);\n employeeRepository.save(employee4);\n employeeRepository.save(employee5);\n employeeRepository.save(employee6);\n employeeRepository.save(employee7);\n employeeRepository.save(employee8);\n employeeRepository.save(employee9);\n }", "public EmployeeDTO createEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "public void AddEmployee(String firstName ,String lastName , String name_department)\n\t{\n\t\tEmployee emp = new Employee();\n\t\temp.setName(firstName);\n\t\temp.setSurname(lastName);\n\t\temp.setDepartment(SearchDepartment(name_department));\n\t\tAddEmployeeToDepartement(name_department,emp);\n\t}", "@Before\n public void setUp() {\n e1 = new Employee(\"Pepper Potts\", 16.0, 152);\n e2 = new Employee(\"Nancy Clementine\", 22.0, 140);\n\n }", "@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}", "public Employee() {\n\t\t\n\t}", "private void insertData() {\n \n for (int i = 0; i < 4; i++) {\n EmpleadoEntity entity = factory.manufacturePojo(EmpleadoEntity.class);\n entity.setSolicitudes(new ArrayList<>());\n entity.setPropuestas(new ArrayList<>());\n entity.setInvitaciones(new ArrayList<>());\n entity.setTipoEmpleado(TipoEmpleado.TRADUCTOR);\n if(i == 0)\n {\n SolicitudEntity solicitud = factory.manufacturePojo(SolicitudEntity.class);\n em.persist(solicitud);\n entity.getSolicitudes().add(solicitud);\n solicitud.setEmpleado(entity);\n solicitudesData.add(solicitud);\n }\n else if (i == 1)\n {\n InvitacionEntity invitacion = factory.manufacturePojo(InvitacionEntity.class);\n em.persist(invitacion);\n entity.getInvitaciones().add(invitacion); \n invitacion.setEmpleado(entity);\n invitacionesData.add(invitacion);\n }\n else if (i == 2){\n PropuestaEntity propuesta = factory.manufacturePojo(PropuestaEntity.class);\n em.persist(propuesta);\n entity.getPropuestas().add(propuesta);\n propuesta.setEmpleado(entity);\n propuestasData.add(propuesta);\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "public void create() {\r\n for(int i=0; i< 50; i++){\r\n long id = (new Date()).getTime();\r\n Benefit newBeneficio = new Benefit();\r\n newBeneficio.setId(\"\"+id); \r\n newBeneficio.setCategory(\"almacenes \"+id);\r\n newBeneficio.setDescription(\"description \"+id);\r\n newBeneficio.setDiscount(i);\r\n newBeneficio.setStart_date(\"start_date \"+id);\r\n newBeneficio.setEnd_date(\"end_date \"+id);\r\n newBeneficio.setReview(\"review \"+id);\r\n newBeneficio.setTitle(\"title \"+id);\r\n newBeneficio.setLogo(\"logo \"+id);\r\n newBeneficio.setTwitter(\"twitter \"+id);\r\n newBeneficio.setFacebook(\"facebook \"+id);\r\n newBeneficio.setUrl(\"url \"+ id);\r\n \r\n Address address = new Address();\r\n address.setCity(\"Santiago \"+ id);\r\n address.setCountry(\"Santiago \"+ id);\r\n address.setLine_1(\"Linea 1 \"+ id);\r\n address.setLine_2(\"Linea 2 \"+ id);\r\n address.setLine_3(\"Linea 3 \"+ id);\r\n address.setPostcode(\"\" + id);\r\n address.setState(\"Region Metropolitana \"+ id);\r\n \r\n Location location = new Location();\r\n double[] cordenadas = {-77.99283,-33.9980};\r\n location.setCoordinates(cordenadas);\r\n location.setDistance(5.445);\r\n location.setType(\"Point\");\r\n \r\n Lobby lobby = new Lobby();\r\n lobby.setHours(\"HORA \"+ + id);\r\n \r\n newBeneficio = service.persist(newBeneficio);\r\n LOGGER.info(newBeneficio.toString());\r\n }\r\n }", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"Lucas_Smith@TechCompany.org\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"Jane_Charlotte@TechCompany.org\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "DD createDD();", "public Employee() {\n employeeID = genID.incrementAndGet();\n }", "public void generateAttributes() throws SQLException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, InstantiationException{\n ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(\"spring.xml\");\n //Get the EmployeeDAO Bean\n BasicDataDAO dataDAO = null;\n BasicData newData = null;\n \n \n if (tableName.equals(\"test\")) {\n\t\t\tdataDAO = ctx.getBean(\"testDAO\", TestDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Test(0, 99, \"Hello\", \"sample\", new Date());\n\t\t}else if (tableName.equals(\"utilisateur\")) {\n\t\t\tdataDAO = ctx.getBean(\"utilisateurDAO\", UtilisateurDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Utilisateur(0, \"handa\", \"handa-upsud\", \"admin\", 30);\n\t\t}else if (tableName.equals(\"source\")) {\n\t\t\tdataDAO = ctx.getBean(\"sourceDAO\", SourceDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Source(0, \"http\", \"srouce1\", \"haut\", \"France\", \"vertical\", 10, \"test\");\n\t\t}else if (tableName.equals(\"theme\")) {\n\t\t\tdataDAO = ctx.getBean(\"themeDAO\", ThemeDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Theme(0, \"testTheme\");\n\t\t}else if (tableName.equals(\"themeRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"themeRelationDAO\", ThemeRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new ThemeRelation(0, 1, 1);\n\t\t}else if (tableName.equals(\"version\")) {\n\t\t\tdataDAO = ctx.getBean(\"versionDAO\", VersionDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Version(0, 1, \"url_serveur\", \"version\", new Date());\n\t\t}else if (tableName.equals(\"abonnementRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"abonnementRelationDAO\", AbonnementRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new AbonnementRelation(0, 1, 1);\n\t\t}else if (tableName.equals(\"alerteRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"alerteRelationDAO\", AlerteRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new AlerteRelation(0, 1, 1, 15, new Date(), \"sujet\", \"type\", \"statut\", \"description\");\n\t\t}else if (tableName.equals(\"blacklistageSysteme\")) {\n\t\t\tdataDAO = ctx.getBean(\"blacklistageSystemeDAO\", BlacklistageSystemeDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new BlacklistageSysteme(0, 1);\n\t\t}else if (tableName.equals(\"blacklistageUtilisateurRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"blacklistageUtilisateurRelationDAO\", BlacklistageUtilisateurRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new BlacklistageUtilisateurRelation(0, 1, 1);\n\t\t}else if (tableName.equals(\"demandeModifRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"demandeModifRelationDAO\", DemandeModifRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new DemandeModifRelation(0, 1, 1, new Date(), \"type\", \"statut\", \"description\");\n\t\t}\n \n \n this.insert = dataDAO.insert(newData);\n //selecById\n BasicData t = dataDAO.selectById(this.insert);\n if (t!=null) {\n\t\t\tthis.selectById = t.toString();\n\t\t}else {\n\t\t\tthis.selectById = \"rien\";\n\t\t}\n //update\n this.update = dataDAO.update(t);\n t = dataDAO.selectById(this.insert);\n if (t!=null) {\n\t\t\tthis.resultatUpdate = t.toString();\n\t\t}else {\n\t\t\tthis.resultatUpdate = \"rien\";\n\t\t}\n //selectAll\n ArrayList<? extends BasicData> alTest = dataDAO.selectAll();\n this.selectAll = alTest.size();\n if (alTest.size()==0) {\n \tthis.ligne1 = \"rien\";\n\t\t}else {\n\t\t\tthis.ligne1 = alTest.get(0).toString();\n\t\t}\n //selectWhere\n String condition = \"id > 1\";\n this.condition = condition;\n ArrayList<? extends BasicData> alTest1 = dataDAO.selectWhere(condition);\n this.selectWhere = alTest1.size();\n if (alTest1.size()==0) {\n \tthis.ligne11 = \"rien\";\n\t\t}else {\n\t\t\tthis.ligne11 = alTest1.get(0).toString();\n\t\t}\n //deleteById\n this.deleteById = 99;\n //this.deleteById = dataDAO.deleteById(insert);\n }", "public Employee(){\n\t\t\n\t}", "public Employee(){\n\t\t\n\t}", "@Override\n\tpublic Employee createEmployee() {\n\t\treturn new Manager(name, age);\n\t}", "public static Department createEntity(EntityManager em) {\n Department department = new Department()\n .name(DEFAULT_NAME)\n .shortName(DEFAULT_SHORT_NAME)\n .nameInBangla(DEFAULT_NAME_IN_BANGLA)\n .description(DEFAULT_DESCRIPTION);\n return department;\n }", "public Employee createNewEmployee(String name) {\n Employee newEmployee = new Employee(DumbDB.employeeCounter++, name, NO_DEPARTMENT_ID);\n getAllEmployees().add(newEmployee);\n return newEmployee;\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"----------------HR representatives Log in----------------\");\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your USERNAME: \");\n\t\tString username = input.nextLine();\n\t\tSystem.out.println(\"Please enter your PASSWORD: \");\n\t\tString password = input.nextLine();\n\t\tSystem.out.println();\n\t\t\n\t\t//test public static int getEmployeeID (String user, String password) method\n\t\tint empID = DAManager.getEmployeeID(username, password);\n\t\t\n\t\tif (empID == 0) {\n\t\t\tSystem.out.println(\"You are an unauthorized user.\");\n\t\t\tSystem.exit(0);\n\t\t}else {\n\t\t\tSystem.out.println(\"You have passed the credential check.\\n\");\n\t\t\tSystem.out.println(\"Your information is : \");\n\t\t\t//test public static Employee getEmployeeByID(int empid) method \n\t\t\tEmployee HR_emp = DAManager.getEmployeeByID(empID);\n\t\t\tHR_emp.display();\n\t\t\t\n\t\t\t//test public static void addEmployee (Employe emp) method\n\t\t\tSystem.out.println(\"\\nAdd one employee inte EMPLOYEE table\");\n\t\t Employee added_emp = new Employee(207, \"Yuhang\", \"Zhao\", \"yzhao248@myseneca.ca\", \"111-222-3333\", java.sql.Date.valueOf(\"2020-09-01\"), \"IT_PROG\", 30000, 0.0,102,60);\n\t\t\tDAManager.addEmployee(added_emp);\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getAllEmployees() method\n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info\");\n\t\t\tArrayList<Employee> empList = DAManager.getAllEmployees();\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empList.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in EMPLOYEES table is: \"+ empList.size());\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getEmployeesByDepartmentID (int depid) method \n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info in the department_ID 60: \");\n\t\t\tArrayList<Employee> empListByDep = DAManager.getEmployeesByDepartmentID(60);\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empListByDep.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in deaprtment ID 60 is: \"+empListByDep.size());\n\t\t\t\n\t\t\t//test public static int updateEmployee (Employee emp) method\n\t\t\tSystem.out.println(\"\\nUpdate the employee#99 info\");\n\t\t\tEmployee updated_emp = new Employee(207, \"James\", \"Bob\", \"1111@gmail.com\", \"123-345-1111\", java.sql.Date.valueOf(\"2019-11-01\"), \"FI_ACCOUNT\", 24000, 0.0, 108, 100);\n\t\t\tDAManager.updateEmployee(updated_emp);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//test public static boolean batchUpdate(String[] SQLs) method\n\t\t\tSystem.out.println(\"\\nTest batchUpdate method: \");\n\t\t\tString batchSQL1 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(208, 'Lebron', 'James', 'aaa@aaa.com', '111-111-2222', TO_DATE('01-Jan-2017', 'DD-MM-YYYY','NLS_DATE_LANGUAGE = American'), 'IT_PROG')\";\n\t\t\tString batchSQL2 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(209, 'Kevin', 'Durant', 'bbb@aaa.com', '111-222-3333', SYSDATE, 'AD_VP')\";\n\t\t\tString batchSQL3 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(210, 'Kris', 'Smith', 'ccc@aaa.com', '111-333-4444', SYSDATE, 'ST_MAN')\";\n\t\t\tString[] SQLs = new String[3];\n\t\t\tSQLs[0] = batchSQL1;\n\t\t\tSQLs[1] = batchSQL2;\n\t\t\tSQLs[2] = batchSQL3;\n\t\t\tif(DAManager.batchUpdate(SQLs)) {\n\t\t\t\tSystem.out.println(\"Success. This transaction is successfully executed!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Failed. All SQL statements are rolled back.\");\n\t\t\t};\n\t\t\t\n\t\t\t//test public static int deleteEmployeeByID (int empid) method\n\t\t\tSystem.out.println(\"\\nDelete the employee#210\");\n\t\t\tDAManager.deleteEmployeeByID(210);\n\t\t}\n\n\t}", "public void createDepartamentoTable() throws SQLException {\n\t\tString sql = \"create table departamento (piso int, depto varchar(100), expensas double,\ttitular varchar(100))\";\n\t\tConnection c = DBManager.getInstance().connect();\n\t\tStatement s = c.createStatement();\n\t\ts.executeUpdate(sql);\n\t\tc.commit();\n\t\t\t\n\t}", "public void AddEmployeeToDepartement(String nameDepartement , Employee emp)\n\t{\n\t\tfor(Department depart : departments)\n\t\t{\n\t\t\tif(depart.getNameDepartment().equals(nameDepartement)) \n\t\t\t{\n\t\t\t\tdepart.addEmployee(emp);\n\t\t\t}\n\t\t}\n\t}", "private void addEmployeeInfo(Section catPart) throws SQLException, IOException{\r\n PdfPTable employee = new PdfPTable(1);\r\n \r\n Paragraph empId = new Paragraph(\"Medarbejdernummer: \"+model.getTimeSheet(0).getEmployeeId());\r\n PdfPCell empIdCell = new PdfPCell(empId);\r\n empIdCell.setBorderColor(BaseColor.WHITE);\r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n Paragraph empName = new Paragraph(\"Navn: \" + name);\r\n PdfPCell empNameCell = new PdfPCell(empName);\r\n empNameCell.setBorderColor(BaseColor.WHITE);\r\n \r\n employee.setHeaderRows(0);\r\n employee.addCell(empIdCell);\r\n employee.addCell(empNameCell);\r\n employee.setWidthPercentage(80.0f);\r\n \r\n catPart.add(employee);\r\n }", "@Test\r\n\tpublic void addEmployeeTestCase2() {\n\t\tEmployee employee2 = new Employee();\r\n\t\temployee2.name = \"JD\";\r\n\t\temployee2.role = \"Technical Consultant\";\r\n\t\temployee2.email = \"jd@chainsys.com\";\r\n\t\temployee2.employeeID = \"Jd2655\";\r\n\t\temployee2.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee2.gender = \"Male\";\r\n\t\temployee2.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee2.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee2);\r\n\t}", "public EmployeeMain() {\n employeeSalary_2015 = new ArrayList<Employee>();\n employeeSalary_2014 = new ArrayList<Employee>();\n }", "public Employee() {\n\n\t}", "public Employee() {\t}", "public EmployeesImpl() {\r\n }", "@Override\n\tpublic Employee create(Employee emp) {\n\t\tlog.debug(\"Welcome to logging\");\n\t\tSystem.out.println(\"Server logs \");\n\t\temployeeDAO.create(emp);\n\t\treturn null;\n\t}", "Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }", "private void populateEntityToDeletetList()\r\n\t{\r\n\t\tentityNameListDelete = new ArrayList<String>();\r\n\t\tentityNameListDelete.add(\"edu.wustl.catissuecore.domain.Quantity\");\r\n\t\tentityNameListDelete\r\n\t\t\t\t.add(\"edu.wustl.catissuecore.domain.SpecimenCollectionRequirementGroup\");\r\n\t}", "public void setCreateEmp(String createEmp) {\n this.createEmp = createEmp;\n }", "public EmployeeRecord(){}", "public Employee() {\n \n }", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public Employee() {\n\t\tsuper();\n\t}", "public static void main(String[] args) {\n\t\tDepartment department1 = new Department ();\n\t\tdepartment1.id = 1;\n\t\tdepartment1.name = \" Marketing \";\n\t\t\n\t\tDepartment department2 = new Department ();\n\t\tdepartment2.id = 2;\n\t\tdepartment2.name = \" Sale \";\n\t\t\n\t\tDepartment department3 = new Department ();\n\t\tdepartment3.id = 3;\n\t\tdepartment3.name = \" Bảo Vệ \";\n\t\t\n\t\t// add data position\n\t\tPosition position1 = new Position ();\n\t\tposition1.id = 1;\n\t\tposition1.name = PositionName.DEVELOPER;\n\t\t\n\t\tPosition position2 = new Position ();\n\t\tposition2.id = 2;\n\t\tposition2.name = PositionName.TEST;\n\t\t\n\t\tPosition position3 = new Position ();\n\t\tposition3.id = 3;\n\t\tposition3.name = PositionName.SCRUM_MASTER;\n\t\t\n\t\tPosition position4 = new Position ();\n\t\tposition4.id = 4;\n\t\tposition4.name = PositionName.PM;\n\t\t\n\t\t\n\t\t// add data Account\n\t\tAccount account1 = new Account() ;\n\t\taccount1.id = 1;\n\t\taccount1.email = \" nguyenvanthuong@gmail.com \";\n\t\taccount1.userName = \" thuong \";\n\t\taccount1.fullName = \" Nguyễn Văn Thưởng \";\n\t\taccount1.department = department2;\n\t\taccount1.position = position3;\n\t\taccount1.createDate = LocalDate.now();\n\t\t\n\t\tAccount account2 = new Account() ;\n\t\taccount2.id = 2;\n\t\taccount2.email = \" phanvinhhien@gmail.com \";\n\t\taccount2.userName = \" Hien \";\n\t\taccount2.fullName = \" Phan Vĩnh Hiển \";\n\t\taccount2.department = department1;\n\t\taccount2.position = position4;\n\t\taccount2.createDate = LocalDate.now();\n\t\t\n\t\tAccount account3 = new Account() ;\n\t\taccount3.id = 3;\n\t\taccount3.email = \" luuquangthien@gmail.com \";\n\t\taccount3.userName = \" Thien \";\n\t\taccount3.fullName = \"Lưu Quang Thiện \";\n\t\taccount3.department = department3;\n\t\taccount3.position = position2;\n\t\taccount3.createDate = LocalDate.now();\n\t\t\n\t\tSystem.out.println(account1.toString());\n\t\t\n\t\t// add data Group\n\t\t\n\t\tGroup group1 = new Group ();\n\t\tgroup1.id = 1;\n\t\tgroup1.name = \"Cái Bang\";\n\t\tgroup1.account = account1;\n\t\tgroup1.createDate = LocalDate.now();\n\t\t\t\t\n\t\tGroup group2 = new Group ();\n\t\tgroup2.id = 2;\n\t\tgroup2.name = \"Nga Mi\";\n\t\tgroup2.account = account2;\n\t\tgroup2.createDate = LocalDate.now();\n\t\t\t\t\n\t\tGroup group3 = new Group ();\n\t\tgroup3.id = 3;\n\t\tgroup3.name = \"Thiếu Lâm\";\n\t\tgroup3.account = account3;\n\t\tgroup3.createDate = LocalDate.now();\n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t// add data GroupAccount\n\t\tGroupAccount grAcc1 = new GroupAccount();\n\t\tgrAcc1.group = group1;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public void createExpense(ExpenseBE expenseBE) {\n\n }", "public static void fillEmployees() {\n\t\tString name1;\n\t\tString name2;\n\t\tString name3;\n\t\tString name4;\n\t\tfor(int i=0;i<auxEmployees.length;i++) { //Va llenando de una en una las filas del array auxiliar de empleados (cada fila es una empresa) con nommbres aleatorios del array employees\n\t\t\tname1=\"\";\n\t\t\tname2=\"\";\n\t\t\tname3=\"\";\n\t\t\tname4=\"\";\n\t\t\twhile (name1.equals(name2) || name1.equals(name3) || name1.equals(name4) || name2.equals(name3) || name2.equals(name4) || name3.equals(name4)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\t\tname1=employees[selector.nextInt(employees.length)];\n\t\t\t\tname2=employees[selector.nextInt(employees.length)];\n\t\t\t\tname3=employees[selector.nextInt(employees.length)];\n\t\t\t\tname4=employees[selector.nextInt(employees.length)];\n\t\t\t}\n\t\t\tauxEmployees[i][0]=name1;\n\t\t\tauxEmployees[i][1]=name2;\n\t\t\tauxEmployees[i][2]=name3;\n\t\t\tauxEmployees[i][3]=name4;\n\t\t}\n\t}", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "public Employee() {}", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tEmployee employee= new Employee(\"Gowtham\",\"Subramanian\");\r\n\t\tSystem.out.println(\"Hello \"+employee.getfName()+\" Enter Department Name\");\r\n\t\tSystem.out.println(\"1.Technical\\n2.Admin\\n3.HR\\n4.Legal\");\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint depChoice = in.nextInt();\r\n\t\tDepartment department = new Department();\r\n\t\tCredentialService cr = new CredentialService();\r\n\t\tswitch(depChoice) {\r\n\t\tcase 1:\r\n\t\t\tdepartment.setDeptName(\"technical\");\r\n\t\t\tString email = cr.generateEmail(employee, department);\r\n\t\t\tString password = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tdepartment.setDeptName(\"admin\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 3:\r\n\t\t\tdepartment.setDeptName(\"hr\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 4:\r\n\t\t\tdepartment.setDeptName(\"legal\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Invalid\");\r\n\t\t}\r\n\t}", "public void setCreateEmpId(String createEmpId) {\n this.createEmpId = createEmpId;\n }", "public void saveData(){\n try{\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.newDocument();\n\n Element rootElement = document.createElement(\"departments\");\n document.appendChild(rootElement);\n for (Department department : entities){\n Element dep = document.createElement(\"department\");\n rootElement.appendChild(dep);\n\n dep.setAttribute(\"id\", department.getId().toString());\n dep.appendChild(createElementFromDepartment(\n document, \"name\", department.getName()));\n dep.appendChild(createElementFromDepartment(\n document, \"numberOfPlaces\", department.getNumberOfPlaces().toString()));\n }\n\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(fileName);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }", "public Employee() {\n }", "public Employee() {\n }", "public Employee() {\n }", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "public static Demande createEntity(EntityManager em) {\n Demande demande = new Demande()\n .etatDAvance(DEFAULT_ETAT_D_AVANCE)\n .typeDemande(DEFAULT_TYPE_DEMANDE);\n return demande;\n }", "public void registerNewEmployee(Administrator user, List<Employee> employees, UserType userType){\n boolean flag;\n String dni;\n do{\n System.out.print(\"\\t Ingrese el dni: \");\n dni = new Scanner(System.in).nextLine();\n flag = user.verifyEmployeeDni(dni,employees);\n if(flag){\n System.out.println(\"El DNI ingresado ya pertenece a un empleado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el nombre: \");\n String name = new Scanner(System.in).nextLine();\n System.out.print(\"\\t Ingrese el apellido: \");\n String surname = new Scanner(System.in).nextLine();\n int age = this.enterNumber(\"la edad\");\n String username;\n do{\n System.out.print(\"\\t Ingrese el username: \");\n username = new Scanner(System.in).nextLine();\n flag = user.verifySystemUsername(username,employees);\n if(flag){\n System.out.println(\"Ese usuario ya esta registrado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el password: \");\n String password = new Scanner(System.in).nextLine();\n\n Employee employee = user.createEmployee(userType,name,surname,dni,age,username,password);\n employees.add(employee);\n }", "public Departement() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public AttendenceLog_Details_A_Entity(String empName, String empDesignation, String empDepartment) {\n this.empName = empName;\n this.empDesignation = empDesignation;\n this.empDepartment = empDepartment;\n }", "public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}", "public Manager(Employee[] employees) {\n\t\tsuper();\n\t\tthis.employees = employees;\n\t}", "public Large_Employee(int employeeID,\n String hireDate,\n String pay_rate,\n String still_active,\n String mex_code,\n String bankID,\n String bankAccountNum,\n String givenName,\n String surName,\n String dateOfBirth,\n String passportNumber,\n String passportExpiration,\n String SII,\n String visaNumber,\n String healthCardNum,\n String arrivalDate,\n String departureDate,\n String txtEmail,\n String medInsurance,\n String txtMobile,\n String nickName,\n String txtNotes,\n String bedID,\n String houseNum,\n String houseName,\n String houseAddress,\n String workPermit,\n String benefitCard,\n String employmentAgreement,\n String withholdAgreement,\n String quarantineLocation,\n String emailPassword,\n String covidDose1Attach,\n String covidDose2Attach,\n String covidDoseDate1,\n String covidDoseDate2,\n String corpPhoneNumber,\n String corpPhoneType) {\n this.employeeID = employeeID;\n this.hireDate = hireDate;\n this.pay_rate = pay_rate;\n this.still_active = still_active;\n this.mex_code = mex_code;\n this.bankID = bankID;\n this.bankAccountNum = bankAccountNum;\n this.givenName = givenName;\n this.surName = surName;\n this.name = givenName +\" \"+surName;\n this.dateOfBirth = dateOfBirth;\n this.passportNumber = passportNumber;\n this.passportExpiration = passportExpiration;\n this.SII = SII;\n this.visaNumber = visaNumber;\n this.healthCardNum = healthCardNum;\n this.arrivalDate = arrivalDate;\n this.departureDate = departureDate;\n this.txtEmail = txtEmail;\n this.medInsurance = medInsurance;\n this.txtMobile = txtMobile;\n this.nickName = nickName;\n this.txtNotes = txtNotes;\n this.bedID = bedID;\n this.houseNum = houseNum;\n this.houseName = houseName;\n this.houseAddress = houseAddress;\n this.workPermit = workPermit;\n this.benefitCard = benefitCard;\n this.employmentAgreement = employmentAgreement;\n this.withholdAgreement = withholdAgreement;\n this.quarantineLocation = quarantineLocation;\n this.emailPassword = emailPassword;\n this.covidDose1Attach = covidDose1Attach;\n this.covidDose2Attach = covidDose2Attach;\n this.covidDoseDate1 = covidDoseDate1;\n this.covidDoseDate2 = covidDoseDate2;\n this.corpPhoneNumber = corpPhoneNumber;\n this.corpPhoneType = corpPhoneType;\n }", "public EmployeePackage(NetworkType type, List<String> employee, String businessId, String serviceId) {\n super(type);\n this.employeeIds = employee;\n this.businessId = businessId;\n this.serviceId = serviceId;\n }", "public Employee(int eId, String first, String last, String email, String hireYear,\r\n\t\t\tString position, int departmentId)\r\n\t{\r\n\t\tthis.employeeId = eId;\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.email = email;\r\n\t\tthis.hireYear = hireYear;\r\n\t\tthis.role = position;\r\n\t\tthis.departmentId = departmentId;\r\n\r\n\t}", "public static void addDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\n\t\tSystem.out.println(\"Enter Department name: \");\n\t\tString deptName = sc.nextLine();\n\n\t\tsc.nextLine(); // had to add this in to prevent input lines with different data types from\n\t\t\t\t\t\t// printing simultaneously, if you know a better solution, let me know\n\n\t\tSystem.out.println(\"Enter Department phone number: \");\n\t\tString deptPhoneNum = sc.nextLine();\n\n\t\tDepartment dept1 = new Department(deptName, deptPhoneNum);\n\t\t// pass in the info for each department\n\t\t// dept1 is the reference to the newly created obj\n\t\t// new Department = creates a new department obj and the Department constructor has a\n\t\t// counter variable which increments the id# and assigns it as new department id\n\n\t\tdeptInfo.add(dept1);\n\t\t// adding the newly created obj ref into arrlist\n\n\t}", "public Employee(){\r\n }", "public void setCreateEmpId(Integer createEmpId) {\n this.createEmpId = createEmpId;\n }" ]
[ "0.68020755", "0.66562605", "0.6645161", "0.6410243", "0.6307894", "0.6150241", "0.61350965", "0.5947059", "0.59165746", "0.5881591", "0.58551776", "0.5849859", "0.5785698", "0.578038", "0.5761925", "0.57310385", "0.5719029", "0.57184166", "0.5692818", "0.5687621", "0.5685211", "0.56771183", "0.5669487", "0.5622736", "0.5617714", "0.56031054", "0.55866545", "0.55738515", "0.55734307", "0.5563518", "0.5560124", "0.5545638", "0.5536196", "0.5524673", "0.5509063", "0.5505086", "0.5488981", "0.5459892", "0.5457618", "0.54495627", "0.54483426", "0.5441352", "0.5439797", "0.54361784", "0.5434828", "0.5431164", "0.5426287", "0.5421016", "0.54185647", "0.54132235", "0.5405509", "0.5404491", "0.53859806", "0.5383489", "0.5383489", "0.5382704", "0.53825504", "0.53788745", "0.5373658", "0.5367392", "0.53607476", "0.5354609", "0.535098", "0.5348279", "0.5340534", "0.5339187", "0.5330074", "0.53228515", "0.53228503", "0.5321859", "0.53161603", "0.5314531", "0.5314149", "0.53092194", "0.5308544", "0.53047436", "0.53007066", "0.52812964", "0.5277453", "0.5268373", "0.5255999", "0.52533495", "0.52511346", "0.524149", "0.5236604", "0.5236604", "0.5236604", "0.52359617", "0.5234858", "0.52328676", "0.5231126", "0.52287936", "0.52282906", "0.5225942", "0.522208", "0.5221634", "0.52152777", "0.5210748", "0.52097934", "0.5207758" ]
0.61006266
7
Gets the employee details by employee id.
@GetMapping(value="/employes/{Id}") public Employee getEmployeeDetailsByEmployeeId(@PathVariable Long Id){ Employee employee = employeeService.fetchEmployeeDetailsByEmployeeId(Id); return employee; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employee getEmployeeDetailById(int id) {\n\t\treturn dao.getEmployeeDetailById(id);\n\t}", "@Override\n\tpublic EmployeeBean getEmployeeDetails(Integer id) throws Exception {\n\t\treturn employeeDao.getEmployeeDetails(id);\n\t}", "public Employeedetails getEmployeeDetailByName(String employeeId);", "public void getByIdemployee(int id){\n\t\tEmployeeDTO employee = getJerseyClient().resource(getBaseUrl() + \"/employee/\"+id).get(EmployeeDTO.class);\n\t\tSystem.out.println(\"Nombre: \"+employee.getName());\n\t\tSystem.out.println(\"Apellido: \"+employee.getSurname());\n\t\tSystem.out.println(\"Direccion: \"+employee.getAddress());\n\t\tSystem.out.println(\"RUC: \"+employee.getRUC());\n\t\tSystem.out.println(\"Telefono: \"+employee.getCellphone());\n\t}", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.GET)\r\n\tpublic Employee getEmployeedetails(@PathVariable int empId) throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.getEmployee(empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(204, e.getMessage());\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic Employee getEmployee(int id) {\n\t\treturn employees.stream().filter(emp -> emp.getEmpId()==(id)).findFirst().get();\r\n\t}", "public Employee getEmployeeById(Long employeeId) {\n return employeeRepository.findEmployeeById(employeeId);\n }", "@Override\n\tpublic Empdetails getemp(int empid) {\n\t\treturn empDAO.getemp(empid);\n\t}", "public Employee getEmployeeById(int id) {\r\n\t\treturn employee1.get(id);\r\n\t}", "public Employee getByID(int empId) {\n\t\tEmployee e = employees.get(empId);\n\t\tSystem.out.println(e);\n\t\treturn e;\n\t}", "public Employee getEmployeeByID(int id) {\n\t\t\r\n\t\ttry {\r\n\t\t\tEmployee f = temp.queryForObject(\"Select * from fm_employees where EID =?\",new EmployeeMapper(),id);\r\n\t\t\treturn f;\r\n\t\t} catch (EmptyResultDataAccessException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n\tpublic Employee getById(Integer employeeId) {\n\t\treturn employeeDao.getById(employeeId);\n\t}", "@Override\n\tpublic Employee getEmployeeById(int emp_id) {\n\t\tlog.debug(\"EmplyeeService.getEmployeeById(int emp_id) return Employee object with id\" + emp_id);\n\t\treturn repositary.findById(emp_id);\n\t}", "public Employee getEmployeeById(int id) {\n\t\tEmployee employee;\n\t\temployee = template.get(Employee.class, id);\n\t\treturn employee;\n\t}", "@GetMapping(\"/employebyid/{empId}\")\n\t public ResponseEntity<Employee> getEmployeeById(@PathVariable int empId)\n\t {\n\t\tEmployee fetchedEmployee = employeeService.getEmployee(empId);\n\t\tif(fetchedEmployee.getEmpId()==0)\n\t\t{\n\t\t\tthrow new InvalidEmployeeException(\"No employee found with id= : \" + empId);\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn new ResponseEntity<Employee>(fetchedEmployee,HttpStatus.OK);\n\t\t}\n }", "EmployeeDetail getById(long identifier) throws DBException;", "public Employee getEmployeeFromId(Integer id) {\n\n return employeeMap.get(id);\n }", "public Employee getEmployeebyId(int id) {\r\n\t\tEmployee e = SQLUtilityEmployees.getEmpByID(id);\r\n\t\treturn e;\r\n\t\t\r\n\t}", "@Override\n\tpublic Employee getEmployeeByID(int empid) throws RemoteException {\n\t\treturn DAManager.getEmployeeByID(empid);\n\t}", "@RequestMapping(value = BASE_URL_API + GET_EMPLOYEE_DETAIL_BY_ID_API, method = RequestMethod.GET)\r\n public ResponseEntity<?> getEmployeeDetail(@PathVariable(\"id\") String id) {\r\n checkLogin();\r\n EmployeeVO employeeDetail = employeeService.getEmployeeById(id);\r\n\r\n return new ResponseEntity<EmployeeVO>(employeeDetail, HttpStatus.OK);\r\n }", "@Override\n\tpublic Employee getEmployeeById(int employeeId) {\n\t\ttry {\n\t\t\treturn template.queryForObject(\"select * from employee where empid = ?\", new Object[] { employeeId },\n\t\t\t\t\tnew RowMapper<Employee>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic Employee mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tEmployee emp = new Employee();\n\t\t\t\t\t\t\temp.setEmployeeId(rs.getInt(\"empid\"));\n\t\t\t\t\t\t\temp.setFirstName(rs.getString(\"fname\"));\n\t\t\t\t\t\t\temp.setLastName(rs.getString(\"lname\"));\n\t\t\t\t\t\t\temp.setEmail(rs.getString(\"email\"));\n\t\t\t\t\t\t\temp.setDesignation(rs.getString(\"desig\"));\n\t\t\t\t\t\t\temp.setLocation(rs.getString(\"location\"));\n\t\t\t\t\t\t\temp.setSalary(rs.getInt(\"salary\"));\n\t\t\t\t\t\t\treturn emp;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\n\t\t} catch (EmptyResultDataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Employee getEmp(Integer id) {\n\t\tEmployee selectByPrimaryKey = employeeMapper.selectByPrimaryKey(id);\n\t\treturn selectByPrimaryKey;\n\t}", "public String getEmployeeDetails(int employeeId) {\n\treturn employeeService.getEmployeeDetails(employeeId).toString(); \n }", "@Override\n\tpublic Employee getEmpleadoById(String id) {\n\t\treturn repositorioEmployee.findOne(id);\n\t}", "public Employee viewInformation(int id) {\n\t\tEmployee employee = new Employee(); \n\t\ttry{ \n\n\t\t\tString sql = \"select * from employees where id = \"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\n\t\t\tresultSet.next();\n\t\t\temployee.setId(resultSet.getInt(\"employee_id\"));\n\t\t\temployee.setUsername(resultSet.getString(\"username\"));\n\t\t\temployee.setPassword(resultSet.getString(\"password\"));\n\t\t\temployee.setFirstName(resultSet.getString(\"first_name\"));\n\t\t\temployee.setLastName(resultSet.getString(\"last_name\"));\n\t\t\temployee.setEmail(resultSet.getString(\"email\"));\n\t\t\t\n\t\t\treturn employee;\n\t\t\t \n\t\t}catch(Exception e){System.out.println(e);} \n\t\treturn null; \t\t\n\t}", "@Override\n\tpublic Employee getEmployeeById(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Employee getEmployeeById(int id) {\n\t\treturn null;\n\t}", "@GetMapping(\"/employees/{id}\")\n public ResponseEntity<Employee> getEmployeeById(@PathVariable(value = \"id\") long employeeId) throws ResourceNotFoundException {\n Employee employee = service.getEmployeeById(employeeId).orElseThrow(() -> new ResourceNotFoundException(\"Employee not found for this id: \" + employeeId));\n return ResponseEntity.ok().body(employee);\n }", "@Override\n\tpublic Optional<Employee> getEmployeeById(int Id) {\n\t\treturn employeeDao.getEmployeeById(Id);\n\t}", "public Employee get(int id) {\n\n\t\t\tfor (Employee c : employees) {\n\t\t\t\tif (c.getId()==(id)) {\n\t\t\t\t\treturn c;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic EmployeeBean getEmployee(int employeeId) {\n\t\tLOGGER.info(\"starts getEmployee method\");\n\t\tLOGGER.info(\"Ends getEmployee method\");\n\t\treturn adminEmployeeDao.getEmployee(employeeId);\n\t}", "public Optional<Employee> getEmployee(int id) {\n\n\t\tOptional<Employee> employeeList = employeeRepository.findById(id);\n\n\t\tif (employeeList.isEmpty()) {\n\n\t\t\tthrow new NoDataFoundException(\"Employee is empty\");\n\t\t}\n\t\treturn employeeList;\n\n\t}", "public Employee getEmployeeById(String id) {\n\t\t\t\n\t\t\tfor(Employee employee : employees) {\n\t\t\t\t\n\t\t\t\tif(id.equals(employee.getEmployeeId()) && employee != null){\n\t\t\t\t\treturn employee;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn null;\n\t\t\t\n\t\t}", "@GetMapping(\"/employee/{id}\")\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable Long id) {\n\t\t\n\t\tEmployee employee = emprepo.findById(id).orElseThrow(()-> new ResourceNotFoundException(\"Employee not exist with id: \" + id)); \n\t\t\n\t\treturn ResponseEntity.ok(employee);\n\t}", "@Override\n\tpublic Employee findByemployeeId(Long id) {\n\t\treturn employeeRepository.findById(id).orElse(null);\n\t}", "@Override\n\tpublic Employee getEmployeeById(Integer id) {\n\t\treturn null;\n\t}", "@GetMapping(value=\"employee/{employeeId}\")\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable(\"employeeId\") int employeeId)\n\t{\n\t\treturn employeeService.getEmployeeById(employeeId);\n\t}", "@GetMapping(\"/employees/{id}\")\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable Long id) {\n\t\tEmployee orElseThrow = repo.findById(id).orElseThrow(() -> new ResourceNotFoundException(\"Employee not exist with id \" + id));\n\t\treturn ResponseEntity.ok(orElseThrow);\n\t}", "@Override\r\n\tpublic Employee findEmployeeById(int empId) {\n\t\tEmployee employee = null;\r\n\t\tString findData = \"select * from employee where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(findData);\r\n\t\t\tps.setInt(1, empId);\r\n\r\n\t\t\tResultSet set = ps.executeQuery();\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\temployee = new Employee(id, sal, name, tech);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employee;\r\n\r\n\t}", "public Employee getEmployeeById(long id) {\n\t\tEmployee employee = employeeDao.findEmployeeByEmployeeId(id);\n\t\tif(employee != null)\n\t\t\treturn employee;\n\t\treturn null;\n\t}", "@Override\n\tpublic Empdetails findById(int empid) {\n\t\t\t\treturn empDAO.findById(empid);\n\t}", "public Employee getEmployeeById(int id) {\n Employee foundedEmployee = null;\n String SQL = \"SELECT * FROM `employees` WHERE `idEmployee` =\" + id + \"\";\n MysqlDbManager dbManager = MysqlDbManager.getInstance();\n try {\n ResultSet resultSet = dbManager.getResultSet(SQL);\n while (resultSet.next()) {\n foundedEmployee = new Employee(resultSet);\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (!dbManager.getPreparedStatement().isClosed()) {\n dbManager.getPreparedStatement().close();\n }\n if (!dbManager.getResultSet().isClosed()) {\n dbManager.getResultSet().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n return foundedEmployee;\n }", "public String getEmployeeId() {\n return employeeId;\n }", "public String getEmployeeId() {\n return employeeId;\n }", "@GetMapping(\"/employee/{id}\")\r\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable Long id)\r\n\t{\r\n\t\tEmployee emp=empdao.findOne(id);\r\n\t\tif(emp == null)\r\n\t\t{\r\n\t\treturn ResponseEntity.notFound().build();\r\n\t\t}\r\n\t\treturn ResponseEntity.ok().body(emp);\r\n\t}", "@GetMapping(\"/employee/{id}\")\r\n\tpublic Employee get(@PathVariable Integer id) {\r\n\t \r\n\t Employee employee = empService.get(id);\r\n\t return employee;\r\n\t \r\n\t}", "public Employee findEmployee(Long id);", "@Override\n\tpublic Employee getEmployeeById(int empId) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic DataResult<Employees> getById(int id) {\n\t\treturn null;\r\n\t}", "public Optional<Employee> getEmployee(Long id){\n return employeeRepository.findById(id);\n }", "@Transactional(readOnly = true)\n public Employee get(Long id) {\n logger.debug(\"retrieve a employee by id : {}\", id);\n return employeeDao.get(id);\n }", "public Employee listEmployeeById(int id) throws SQLException {\n\t\t\treturn employeeDAO.listEmployeeById(id);\n\t\t}", "public EmployeeDTO getEmployee(final Long id) {\n\t\tfinal String sql = \"SELECT * FROM EMPLOYEES WHERE ID = ?\";\n\t\tfinal Object[] args = new Object[] { id };\n\n\t\treturn jdbcTemplate.queryForObject(sql, args, new EmployeeRowMapper());\n\t}", "@GetMapping(\"/employee/{id}\")\n public Employee getEmployeeById(@PathVariable(value = \"id\") Integer id){\n\n Employee employee = employeeService.findEmployeeById(id);\n\n return employee;\n }", "@Override\n\tpublic JSONObject getEmployeeById(String id) {\n\t\tJSONObject json=new JSONObject();;\n\t\tEmployeeDAO employeeDAO = DAOFactory.getEmployeeDAO();\n\t\ttry {\n\t\t\tEmployee employee=employeeDAO.findById(id);\n\t\t\tjson.put(\"name\", employee.getName());\n\t\t\tjson.put(\"id\", employee.getId());\n\t\t\tjson.put(\"job\", employee.getJobTitle());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn json;\n\t}", "public String getEmployeeById(int id) {\n\t\t//logger.info(\"Inside get employee by id.... Now calling get employee by id\");\n\t\t\n\t\t//logger.log(Level.FINEST ,\"theEmployee value is:....................................\"+theEmployee);\n\t\ttry {\n\t\t\tEmployee theEmployee=getEmployeeService().getEmployeeByID(id);\n\t\t\tExternalContext externalContext= FacesContext.getCurrentInstance().getExternalContext();\n\t\t\tMap<String,Object> requestMap= externalContext.getRequestMap();\n\t\t\trequestMap.put(\"employeeBean\", theEmployee);\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//logger.info(\"displaying the map................\"+requestMap);\n\t\treturn \"update\";\n\t}", "@GET\n\t@Path(\"{id}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getEmployeeById(@PathParam(\"id\") String id) throws ParseException{\n\t\tString message = \"{}\";\n\t\t\n\t\tJSONObject employeesJsonObject = (JSONObject) parser.parse(getFileContent());\n\t\tJSONArray employeesArray = (JSONArray) employeesJsonObject.get(\"employee\");\n\t\tJSONObject employee;\n\t\t\n\t\t/*checking each employee*/\n\t\tfor ( int i = 0 ; i < employeesArray.size() ; i++ ){\n\t\t\temployee = ((JSONObject) employeesArray.get(i));\n\t\t\t\n\t\t\tif(employee.get(\"id\").toString().equalsIgnoreCase(id)){\n\t\t\t\tmessage = employee.toString();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn message;\n\t}", "@RequestMapping(value = \"/findId/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public final EmployeeDTO findEmployeeById(@PathVariable(\"id\") long id) {\n try {\n LOGGER.info(\"getting Employee with id=\" + id);\n return employeeFacade.findEmployeeById(id);\n } catch (NonExistingEntityException e) {\n throw new RequestedResourceNotFound(\"Employee with id=\" + id + \" does not exist in system.\", e);\n } catch (IllegalArgumentException e) {\n throw new RequestedResourceNotFound(\"Argument id is illegal.\", e);\n }\n }", "@GetMapping(\"{id}\")\n\t@Secured(Roles.ADMIN)\n\tpublic ResponseEntity<EmployeeDto> getById(@PathVariable long id) {\n\t\tLogStepIn();\n\n\t\tEmployee employee = employeeRepository.findById(id);\n\n\t\tif (employee == null)\n\t\t\treturn LogStepOut(ResponseEntity.notFound().build());\n\t\telse\n\t\t\treturn LogStepOut(ResponseEntity.ok(toDto(employee)));\n\t}", "public Employee findEmployee(String id)\n\t{\t\t\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_FIND_EMPLOYEE_REQUEST, id, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_FIND_EMPLOYEE_RESPONSE)\n\t\t{ \n\t\t\tint eid = ((Employee)envelop.getPassingObject()).getEmployeeId();\n\t\t\tString lastName = ((Employee)envelop.getPassingObject()).getLastName();\n\t\t\tString firstName = ((Employee)envelop.getPassingObject()).getFirstName();\n\t\t\tint DepNo = ((Employee)envelop.getPassingObject()).getDepartmentId();\n\n\t\t\tEmployee emp = new Employee(firstName, lastName, eid, DepNo);\n\t\t\treturn emp;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t\treturn null;\n\t\t}\n\t}", "public String getEmployee(String empID) throws JsonParseException,\n\t\t\tJsonMappingException, IOException;", "public Employee getEmployeeById(String id) {\r\n for(int i = 0; i < companyDirectory.size(); i++) {\r\n\t for(int j = 0; j < companyDirectory.get(i).getLocations().size(); j++) {\r\n\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++) {\t\t\r\n\t\t if(companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId().equals(id)) \r\n\t\t \treturn companyDirectory.get(i).getLocations().get(j).getEmployees().get(k);\r\n\t\t }\r\n\t\t}\r\n\t }\r\n return null;\r\n\t}", "@Override\n\tpublic Employee findById(int id) {\n\t\tList<Employee> employeeList= \n\t\tlistEmployee().stream().filter((e -> e.getId()==id)).collect(Collectors.toList());\n\t\t\n\t\treturn (Employee)employeeList.get(0);\n\t}", "public int getEmployeeId() {\n return employeeId_;\n }", "@GetMapping(\"/getEmployeeByID/{id}\")\n\t\tpublic ResponseEntity<EmployeeMon> getEmployeeByID(@PathVariable Integer id) throws Exception {\n\t\t\tEmployeeMon model = repository.findById(id)\n\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Employee not found for this id :: \" + id));\n\t\t\treturn ResponseEntity.ok().body(model);\n\t\t}", "@Override\n\t@Transactional\n\tpublic Employee findEmployeeById(int id) {\n\t\treturn employeeDao.findEmployeeById(id);\n\t}", "public int getEmployeeId() {\n return employeeId_;\n }", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchemployee\")\n\tpublic ModelAndView getEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"ShowEmployeeDetails.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "@GET\n\t@Consumes(\"text/plain\")\n\t@Produces(\"application/json\")\n\t@Path(\"/get/{id}\")\n\tpublic Response getEmployee(@PathParam(\"id\") String id) {\n\t\tid = id.trim();\n\t\tif (bookedTickets.containsKey(id)) {\n\t\t\tMap<String, String> info = new HashMap<>();\n\t\t\tinfo = bookedTickets.get(id);\n\t\t\tTicket ticket = new Ticket();\n\t\t\tticket.setDate(info.get(\"date\"));\n\t\t\tticket.setFoodItems(info.get(\"foodItems\"));\n\t\t\tticket.setSeats(info.get(\"seats\"));\n\t\t\tticket.setShowTime(info.get(\"showTime\"));\n\t\t\tticket.setTheater(info.get(\"theater\"));\n\t\t\tticket.setTicketNo(info.get(\"ticketNo\"));\n\t\t\tticket.setTotalPrice(info.get(\"totalPrice\"));\n\t\t\t\n\t\n\t\t\treturn Response.ok(ticket).build();\n\t\t}\n\n\t\tMessage msg = new Message();\n\t\tmsg.setMessage(\"ID is not registered\");\n\t\treturn Response.ok(msg).build();\n\n\t}", "@Override\n public Employee getEmployee(int employeeId) {\n return null;\n }", "@ApiOperation(value = \"getEmployeeById controller method\")\r\n\t@GetMapping(value = \"/getEmployeeById/{employeeId}\")\r\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable Integer employeeId) {\r\n\r\n\t\tLog.info(\" Employee Controller Triggerd\");\r\n\r\n\t\tEmployee employee = employeeService.getEmployeeById(employeeId);\r\n\t\treturn new ResponseEntity<Employee>(employee, HttpStatus.OK);\r\n\t}", "public int getEmployeeId() {\n\t\treturn employeeId;\n\t}", "public Employee retrieveEmployee(Integer employeeId) {\n\t\t\n\t\tif(null == employeeId){return null;}\n\t\t\n\t\tif(log.isTraceEnabled()){\n\t\t\tlog.trace(\"mapping objects about to begin employee -> employeeBo\");\n\t\t}\n\n\t\tEmployeeBo employeeBo = new EmployeeBo(employeeId);\n\t\t\n\t\tif(employeeBo == null){\n\t\t\tlog.error(\"mapping objects was NOT successfull employee -> employeeBo ?:\"+employeeBo);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\temployeeBo = new EmployeeDao(getSessionFactory()).retrieveOne(employeeBo);\n\n\t\tEmployee employee = Mapper.employeeMapper.map(employeeBo);\n\n\t\treturn employee;\n\t}", "public Long getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "@Override\n\tpublic Employee findById(Integer eid) {\n\t\tEmployee employee = employeeDao.findById(eid);\n\t\treturn employee;\n\t}", "public int getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}", "@Override\n\tpublic EmpContactDetail getEmpContactDetailByID(int id) {\n\t\treturn template.get(EmpContactDetail.class, new Integer(id));\n\t}", "@Override\n\t@Transactional\n\tpublic Employee getEmployeeByID(int employeeID) {\n\t\tOptional<Employee> empData = employeeRepository.findById(employeeID);\n\t\treturn empData.get();\n\t}", "Employee findById(int id);", "public void setEmployeeId(String employeeId) {\n this.employeeId = employeeId;\n }", "public long getEmployeeId() {\n return employeeId;\n }", "public Employee getEmployee(String employeeID) {\n\n\t\tEmployee employee = new Employee();\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE E.ID = \\'\" + employeeID + \"\\' AND P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\trs.next();\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employee;\n\t}", "@GetMapping(\"/external/{id}\")\n\t\t\t@JsonView(Views.External.class)\n\t\t\tpublic Optional<Employee> getEmployeeById(@PathVariable(\"id\") @Min(1) Long id) {\n\t\t\t\tSystem.out.println(\"id\"+id);\n\t\t\t\ttry {\n\t\t\t\t\treturn employeeService.getEmployeeById(id);\n\t\t\t\t} catch (UserNotFoundException e) {\n\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.NOT_FOUND, e.getMessage());\n\t\t\t\t}\n\n\t\t\t}", "public long getEmployeeId() {\n\t\treturn employeeId;\n\t}", "@GET\n\t@Path(\"{empID}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getById(@PathParam(\"empID\") int id) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tGenericEntity<List<EmployeeVO>> generic = new GenericEntity<List<EmployeeVO>>(employeeFacade.findById(id)) {};\n\t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", CorsFilter.DEFAULT_ALLOWED_ORIGINS).entity(generic).build();\n\t}", "@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}", "public List<EmployeeManage> queryEmployeeId(int id) {\n\t\treturn \temployeeManageDao.queryEmployeeId(id);\r\n\t}", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "public EmployeeEntity getEmployeeDataById(int employeeId, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\t\tEmployeeEntity result = null;\n\t\tSession hibernateSession = context.getHibernateSession();\n\t\tresult = (EmployeeEntity) hibernateSession.get(EmployeeEntity.class, employeeId);\n\n\t\treturn result;\n\t}", "public Employee findById(final String id) {\n LOG.debug(\"getting Employee instance with id: \" + id);\n try {\n Employee instance = entityManager.find(Employee.class, id);\n LOG.debug(\"get successful\");\n return instance;\n } catch (RuntimeException re) {\n LOG.error(\"get failed\", re);\n throw re;\n }\n }", "@RequestMapping(path = \"/employee/{id}\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic Optional<Employee> displayEmployeeById() {\r\n\t\treturn er.findById(1);\r\n\t}", "@RequestMapping(value=\"/getEmployee/{employeeId}\", method = RequestMethod.GET)\r\n\tpublic String getEmployeeById(@PathVariable(\"employeeId\") Integer employeeId, Model model) {\r\n\t\tEmployeeModel employeeModel = employeeService.getEmployeeById(employeeId);\r\n\t\tcom.ps.model.Model.MODE = \"Update\";\r\n\t\tmodel.addAttribute(\"employeeData\", employeeModel);\r\n\t\treturn \"search-employee\";\r\n\t}", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "@GetMapping(\"/one/{id}\")\n\tpublic ResponseEntity<?> getOneEmployee(@PathVariable Integer id) {\n\t\tResponseEntity<?> response = null;\n\t\ttry {\n\t\t\tEmployee employee = service.getOneEmployee(id);\n\t\t\tresponse = new ResponseEntity<Employee>(employee, HttpStatus.OK); // 200\n\t\t} catch (EmployeeNotFoundException enfe) {\n\t\t\tthrow enfe;\n\t\t}\n\t\treturn response;\n\t}", "int getEmployeeId();", "@GET\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGetbyId(@PathParam(\"id\") String id) {\n Gson gson = GSONFactory.getInstance();\n Employee employee = getEmployeeById(id);\n\n if (employee == null) {\n Response response = Response.status(404).build();\n return response;\n } else {\n String jsonOutput = gson.toJson(employee);\n Response response = Response.ok().entity(jsonOutput).build();\n return response;\n }\n }", "public int getEmployeeId();", "public void setEmployeeId(long employeeId) {\n this.employeeId = employeeId;\n }", "public Optional<Employeee> findById(int id) {\n\t\treturn employeerepo.findById(id);\n\t}" ]
[ "0.8443186", "0.8347868", "0.8286421", "0.8147314", "0.80784464", "0.8056814", "0.80388296", "0.7965874", "0.79490453", "0.7943609", "0.79423505", "0.79332495", "0.7927506", "0.7837938", "0.7836701", "0.7809388", "0.7788266", "0.7766667", "0.7761074", "0.77273154", "0.7702065", "0.76939577", "0.7689347", "0.76521915", "0.7635969", "0.7625104", "0.7625104", "0.7623936", "0.762294", "0.7610154", "0.7606743", "0.76006645", "0.75989157", "0.7581395", "0.7580066", "0.75790733", "0.7559075", "0.75507843", "0.7486076", "0.74823767", "0.74701095", "0.7464438", "0.7464009", "0.7464009", "0.74364126", "0.74278975", "0.74113387", "0.74092305", "0.7397837", "0.7373936", "0.7348864", "0.7342414", "0.73313206", "0.73308235", "0.7329815", "0.73067534", "0.7292357", "0.72895545", "0.72806245", "0.7264042", "0.7248488", "0.7243268", "0.7234602", "0.72345054", "0.7232675", "0.7225136", "0.72148603", "0.7204865", "0.7202521", "0.7187665", "0.718178", "0.7175677", "0.717207", "0.71700805", "0.7156078", "0.71527565", "0.71437055", "0.7140088", "0.7107638", "0.70982736", "0.70783085", "0.7076129", "0.7075827", "0.70754415", "0.7074594", "0.707386", "0.70583946", "0.7028194", "0.7011582", "0.6996429", "0.6994199", "0.69893193", "0.6983509", "0.6976891", "0.69552857", "0.69382554", "0.693443", "0.69331306", "0.6920212", "0.6916615" ]
0.81194997
4
Delete employee details by employee id.
@DeleteMapping(value="/employes/{Id}") public void deleteEmployeeDetailsByEmployeeId(@PathVariable Long Id) { employeeService.deleteEmployeeDetails(Id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteEmployee(Long employeeId) throws ApiDemoBusinessException;", "public void deleteEmployee(Long id) {\n employeeRepository.deleteById(id);\n }", "public void deleteEmployee(int id) {\r\n\t\temployee1.remove(id);\r\n\t}", "@Override\n\tpublic void deleteEmployeeById(int id) {\n\t\t\n\t}", "public void deleteById(Integer employeeid) {\n\t\temployeerepository.deleteById(employeeid);\n\t}", "public String deleteEmployee(EmployeeDetails employeeDetails);", "@DeleteMapping(\"/{ecode}\")\n\tpublic ResponseEntity<Employee> deleteEmployee( @PathVariable (value =\"ecode\") long id) {\n\t\tEmployee existingEmployee = this.employeeRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Employee not found with id: \"+ id));\n\t\t\n\t\tthis.employeeRepository.delete(existingEmployee);\n\t\treturn ResponseEntity.ok().build();\n\t}", "@DeleteMapping(\"/employee/{id}\")\r\n\tpublic void delete(@PathVariable Integer id) {\r\n\t\tempService.delete(id);\r\n\t}", "public void deleteEmp(Integer id) {\n\t\temployeeMapper.deleteByPrimaryKey(id);\n\t}", "@Override\n\tpublic void deleteEmployeeById(int empId) {\n\t\t\n\t}", "@Override\n\tpublic String deleteEmployee(int id) {\n\t\treturn employeeDao.deleteEmployee(id);\n\t}", "@Override\r\n\tpublic void deleteEmployeeByEmployeeId(long emplloyeeId) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteEmployee(int id) {\n\t\ttry {\r\n\t DirectlyDatabase.update(PropertyManager.getProperty(\"db_employee_delete\"), id +\"\"); \r\n\t\t} catch (SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\t\r\n\t}", "@DeleteMapping(\"/employees/{employeeId}\")\n\tpublic String deleteEmployee (@PathVariable int employeeId) {\n\t\tEmployee theEmployee = employeeService.fndById(employeeId);\n\t\t\n\t\t// if employee null\n\t\tif (theEmployee == null) {\n\t\t\tthrow new RuntimeException(\"Employee xx his idEmpl not found \"+ employeeId);\n\t\t\t \n\t\t}\n\t\temployeeService.deleteById(employeeId);\n\t\treturn \"the employe was deleted \"+ employeeId;\n\t\t\n\t}", "@Override\n\tpublic EmployeeBean deleteEmployeeDetails(Integer id) throws Exception {\n\t\treturn employeeDao.deleteEmployeeDetails(id);\n\t}", "@Override\n public void deleteEmployee(int employeeId) {\n\n }", "public ResponseEntity<Void> deleteEmployeeDetails(@ApiParam(value = \"employee id to delete\",required=true) @PathVariable(\"empId\") Long empId) {\n \tEmployee newEmp= empService.getEmployeeById(empId);\n\t\t\n\t\tif(newEmp==null) {\n\t\t\tthrow new ResourceNotFoundException(\"Skill with id \"+empId+\" is not found\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n//\t\t\tLOGGER.trace(\" Trying to trace skills to delete details\");\n\t\t\tempService.deleteEmployeeDetails(empId);\n\t\t\treturn new ResponseEntity<>(HttpStatus.ACCEPTED);\n\t\t}\n }", "@Override\r\n\tpublic void deleteEmployee(int id) {\n\t\temployees.removeIf(emp -> emp.getEmpId()==(id));\r\n\t}", "@Override\n\tpublic void deleteEmployee(Employee employee) {\n\t\tEmployee deleteEmployee = em.find(Employee.class, employee.getId());\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tem.remove(deleteEmployee);\n\t\t\tem.getTransaction().commit();\n\t\t\tSystem.out.println(\"Employee Data Removed successfully\");\n\t\t\tlogger.log(Level.INFO, \"Employee Data Removed successfully\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Not found\");\n\t\t}\n\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)\n public final void deleteEmployee(@PathVariable(\"id\") long id) {\n try {\n LOGGER.info(\"deleting Employee with id=\" + id);\n employeeFacade.removeEmployee(id);\n } catch (NonExistingEntityException | IllegalArgumentException e) {\n throw new RequestedResourceNotFound(\"Employee with id=\" + id + \" does not exist in system.\", e);\n }\n }", "@Override\n\tpublic void deleteByEmployeeId(Long id) {\n\t\temployeeRepository.deleteById(id);\n\t}", "@RequestMapping(path = \"/employee/{id}\", method = RequestMethod.DELETE)\r\n\t@ResponseBody\r\n\tpublic String deleteEmployeeById(@PathVariable int id) {\r\n\t\ter.deleteById(id);\r\n\t\treturn \"Employee deleted with id: \" + id;\r\n\t}", "@DeleteMapping(\"/DeleteEmployee/{empId}\")\r\n public String deleteEmployee(@PathVariable String empId) {\r\n return admin.deleteEmployeeService(empId);\r\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Employee : {}\", id);\n employeeRepository.deleteById(id);\n }", "@DeleteMapping(\"/deleteEmployee/{id}\")\n\tpublic void deleteEmployee(@PathVariable Long id){\n repo.deleteById(id);\n\t}", "@DeleteMapping(\"employee/{employeeId}\")\n\tpublic void deleteEmployeeById(@PathVariable(\"employeeId\") int employeeId, Principal principal)\n\t{\n\t\temployeeService.deleteEmployeeById(employeeId,principal);\n\t}", "@DeleteMapping(\"/{id}\")\n public ResponseEntity deleteEmployee(@PathVariable(\"id\") Long id){\n Employee employee = employeeService.deleteEmployee(id);\n String responseMessage = String.format(\"Employee: %s ID: %s has been deleted from records.\", employee.getName(), employee.getEmployeeId());\n return new ResponseEntity<>(responseMessage, HttpStatus.OK);\n }", "@Override\n\tpublic void delete(Integer employeeId) {\n\t\tEmployee e = employeeDao.getById(employeeId);\n\t\temployeeDao.delete(e);\n\t}", "@RequestMapping(value = BASE_URL_API + DELETE_EMPLOYEE_BY_ID, method=RequestMethod.DELETE)\r\n public HttpEntity<?> deleteEmployee(@PathVariable(\"id\") String id) {\r\n\r\n checkLogin();\r\n\r\n employeeService.deleteEmployeeById(id);\r\n\r\n return new ResponseEntity<>(HttpStatus.OK);\r\n }", "@DeleteMapping(\"/remove/{id}\")\n\tpublic ResponseEntity<String> deleteEmployee(@PathVariable Integer id) {\n\t\tResponseEntity<String> response = null;\n\t\ttry {\n\t\t\tservice.deleteEmployee(id);\n\t\t\tString message = \"Employee '\" + id + \"' Deleted!\";\n\t\t\tresponse = new ResponseEntity<String>(message, HttpStatus.OK);\n\t\t} catch (EmployeeNotFoundException e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn response;\n\t}", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.DELETE)\r\n\tpublic void deleteCustomerDetails(@PathVariable int empId) throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\teService.deleteEmployeeDetails(empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(204, e.getMessage());\r\n\t\t}\r\n\t}", "private void deleteEmployee(HttpServletRequest request, HttpServletResponse response)\r\n\t\tthrows Exception {\n\t\tString theEmployeeId = request.getParameter(\"employeeId\");\r\n\t\t\r\n\t\t// delete employee from database\r\n\temployeeDAO.deleteEmployee(theEmployeeId);\r\n\t\t\r\n\t\t// send them back to \"list employees\" page\r\n\t\tlistEmployees(request, response);\r\n\t}", "public ResponseEntity<Void> deleteEmp(@ApiParam(value = \"employee id to delete\",required=true) @PathVariable(\"empId\") Long empId) {\n \tEmployee newEmp= empService.getEmployeeById(empId);\n\t\t\n\t\tif(newEmp==null) {\n\t\t\tthrow new ResourceNotFoundException(\"Skill with id \"+empId+\" is not found\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n//\t\t\tLOGGER.trace(\" Trying to trace skills to delete details\");\n\t\t\tempService.deleteEmp(empId);\n\t\t\treturn new ResponseEntity<>(HttpStatus.ACCEPTED);\n\t\t}\n }", "public void delete(Employee employee){\n employeeRepository.delete(employee);\n }", "@Override\n\tpublic void deleteEmployee(Employee employee) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Employee employee) {\n\t\temployeeDao.delete(employee);\n\t}", "@Override\n\tpublic int deleteEmployeeByID(int empid) throws RemoteException {\n\t\treturn DAManager.deleteEmployeeByID(empid);\n\t}", "@Override\n\tpublic ResponseEntity<Employee> deleteById(Long id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void deleteEmp(int id) {\n\t\tConnection con=null;\n\t\tPreparedStatement stmt=null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\n\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/ems?user=root&password=root\");\n\t\tString query=\"delete from employee where id=?\";\n\t\tstmt=con.prepareStatement(query);\n\t\tstmt.setInt(1, id);\n\t\tstmt.execute();\n\t\t\n\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void delete(Integer id) {\n\t\tempdao.deleteById(id);\r\n\t}", "@Override\n public Mechanic deleteEmployee(Long id) {\n LOGGER.info(\"Delete Mechanic with id {}\", id);\n Mechanic mechanic = getEmployee(id);\n mechanicRepository.delete(mechanic);\n return mechanic;\n }", "@Override\r\n\tpublic Map deleteEmployee(long employeeId) {\n\t\treturn null;\r\n\t}", "@GET\n\t@Path(\"delete\")\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic String deleteEmployee(@QueryParam(\"id\") String id) throws ParseException {\n\t\t\n\t\tJSONObject employeesJsonObject = (JSONObject) parser.parse(getFileContent());\n\t\tJSONArray employeesArray = (JSONArray) employeesJsonObject.get(\"employee\");\n\t\tJSONObject employee;\n\t\t\n\t\t/*checking each employee*/\n\t\tfor ( int i = 0 ; i < employeesArray.size() ; i++ ){\n\t\t\temployee = ((JSONObject) employeesArray.get(i));\n\t\t\t\n\t\t\tif(employee.get(\"id\").toString().equalsIgnoreCase(id)){\n\t\t\t\temployeesArray.remove(employee);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tinsertIntoFile(employeesJsonObject.toString());\n\t\treturn \"success\";\n\t}", "@Override\n\tpublic void deleteEmployee(Employee e) {\n\t\t\n\t}", "@DeleteMapping(\"/employee/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteEmployee(@PathVariable Long id){\n\t\tEmployee employee = emprepo.findById(id).orElseThrow(()-> new ResourceNotFoundException(\"Employee not exist with id: \"+id ));\n\t\t\n\t\temprepo.delete(employee);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\t\treturn ResponseEntity.ok(response);\n\t\t\t\n\n\t}", "@DELETE\n @Transactional\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response delete(\n @PathParam(\"id\") @NotNull(message = ValidationMessages.EMPLOYEE_ID_MUST_NOT_BE_NULL)\n UUID employeeId) {\n\n deleteEmployeeById.handle(employeeId);\n return Response.ok().build();\n }", "public void DeleteEmployee(int idEmployee)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) \n\t\t\t\t{\n\t\t\t\t\tdepartments.get(i).delEmployee(emp);break;\n\t\t\t\t}\n\t\t\t}\n\t}", "@Override\n\tpublic boolean deleteEmployeeById(int employeeId) {\n\t\tint isDeleted = template.update(\"delete from employee where empid = ?\", employeeId);\n\t\tif (isDeleted > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic void deleteEmpByID(int employeeID) {\n\t\temployeeRepository.deleteById(employeeID);\n\t}", "public boolean deleteEmployeeDetail(int id) {\n\t\treturn dao.deleteEmployeeDetail(id);\n\t}", "@Override\n\tpublic void deleteEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.deleteEmployee(Employee emp) delete Employee object whos id is\" + emp.getId());\n\n\t\trepositary.delete(emp);\n\n\t}", "@Override\r\n\tpublic void deleteEmployee(Employee t) {\n\t\t\r\n\t}", "@DELETE\n\t@Path(\"{empID}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response remove(@PathParam(\"empID\") int id) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tboolean result = employeeFacade.removeById(id);\n\t\tif (result) {\n\t\t\treturn Response.status(200).build();\n\t\t}\n\t\treturn Response.status(409).build();\n\t}", "public static void deleteEmployee(Employee employee) {\n try {\n if (employeeRepository.delete(dataSource, employee) == 0) {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() +\n \" \" + employee.getBirthday() + \" was successfully deleted from the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \" + employee.getLastName() +\n \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.delete\") + \"\\n\");\n } else {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" was not found in the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"not.in.list\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }", "@Override\n public void deleteById(long id) {\n\n Query theQuery = entityManager.createQuery(\"DELETE FROM Employee WHERE id=:employeeId\");\n \n theQuery.setParameter(\"employeeId\", id);\n \n theQuery.executeUpdate();\n }", "public void delete(EmployeeEntity entity){\n EmployeeDB.getInstance().delete(entity);\n }", "@DeleteMapping(\"{id}\")\n\t@Secured(Roles.ADMIN)\n\tpublic ResponseEntity<?> delete(@PathVariable long id) {\n\t\tLogStepIn();\n\n\t\tEmployee employee = employeeRepository.findById(id);\n\t\tif (employee == null) {\n\t\t\treturn LogStepOut(ResponseEntity.notFound().build());\n\t\t}\n\t\telse {\n\t\t\tuserRepository.deleteById(employee.getUser().getId());\n\t\t\temployeeRepository.deleteById(id);\n\t\t\treturn LogStepOut(ResponseEntity.noContent().build());\n\t\t}\n\t}", "public void deleteEmployee(int employeeID) {\n try {\r\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\r\n Connection con = DriverManager.getConnection(DatabaseManager.CONNECTION_TO_DATABASE, DatabaseManager.USER_NAME, DatabaseManager.PASSWORD);\r\n\r\n String query = \"DELETE FROM employees WHERE id = '\"+employeeID+\"'\";\r\n\r\n PreparedStatement preparedStatement = con.prepareStatement(query);\r\n preparedStatement.execute();\r\n \r\n if(getEmployeeCount() == 0) \r\n {\r\n DatabaseManager.locations.deleteAllLocations();\r\n }\r\n\r\n con.close();\r\n\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(e.getMessage());\r\n\r\n JOptionPane.showMessageDialog(null, e.getMessage());\r\n } catch (SQLException e2) {\r\n System.out.println(e2.getMessage());\r\n\r\n JOptionPane.showMessageDialog(null, e2.getMessage());\r\n }\r\n\r\n }", "@Override\n\tpublic void deleteEmployee() {\n\n\t}", "public void deleteEmp(int empno) {\n\t\t\n\t}", "@GetMapping(\"/deleteEmployee/{emp_no}\")\n\tpublic String deleteEmployee(@PathVariable(value = \"emp_no\") Integer emp_no) {\n\t\tthis.service.deleteEmployeeById(emp_no);\n\t\treturn \"redirect:/employees\";\n\t}", "public int deleteEmployeeById(int id) throws SQLException {\n\t\t\treturn employeeDAO.deleteEmployeeById(id);\n\t\t}", "@DeleteMapping(\"/deleteByID/{id}\")\n\t\tpublic ResponseEntity deleteByID(@PathVariable Integer id) {\n\t\t\tOptional<EmployeeMon> empId = repository.findById(id);\n\t\t\tif(empId.isPresent()) {\n\t\t\t\trepository.deleteById(id);\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.OK);\n\t\t\t} else {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t}", "public static void deleteEmployee(int employeeID) {\n\t\ttry {\n\n\t\t\t// request holds the complete URL to be passed sent to the API\n\t\t\tURL request = new URL(endpoint + \"/\" + employeeID);\n\n\t\t\t// opens connection with API, sends data via URL request\n\t\t\tHttpURLConnection connection = (HttpURLConnection) request.openConnection();\n\t\t\tconnection.setRequestMethod(\"DELETE\");\n\n\t\t\t// if anything other than a successful connection occurs, stop\n\t\t\t// program and display the error code\n\t\t\tif (connection.getResponseCode() != 200) {\n\t\t\t\tthrow new RuntimeException(\"Failed : HTTP error code : \" + connection.getResponseCode());\n\t\t\t}\n\n\t\t\t// print out confirmation to the console if successful\n\t\t\tSystem.out.println(\"Employee Deleted.\\n\");\n\n\t\t} /* try */ catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Transactional\n public void delete(Long id) {\n logger.debug(\"delete employee by id : {}\", id);\n employeeDao.delete(id);\n }", "@Override\n\t@Transactional\n\tpublic boolean delete(int id) {\n\t\treturn employeeDao.delete(id);\n\t}", "@Override\n\tpublic void deleteEPAData(int empId) {\n\t}", "@Override\n\tpublic String deleteEmp(int eid) {\n\t\treturn eb.deleteEmp(eid);\n\t}", "@Override\n public void deleteById(int theId) {\n Query theQuery = entityManager.createQuery(\n \"delete from Employee where id=:employeeId\");\n theQuery.setParameter(\"employeeId\", theId);\n theQuery.executeUpdate();\n }", "public void delete(Employee employee) {\r\n\r\n String sql = \"delete from db.emp where id= ?\";\r\n try {\r\n Connection connection = ConnectDB();\r\n PreparedStatement preparedStatement = connection.prepareStatement(sql);\r\n preparedStatement.setInt(1,employee.getId());\r\n\r\n int rows=preparedStatement.executeUpdate();\r\n String message=rows==1 ? \"A fost sters cu succes\": \"Nu este nimic de sters\";\r\n\r\n System.out.println(message);\r\n\r\n } catch (SQLException Ex) {\r\n System.out.println(Ex.getMessage());\r\n System.out.println(\"Eroare la stergere\"+ Ex.getMessage());\r\n\r\n }\r\n }", "public static void deleteRecord(Integer employeeId) {\n\t\ttry {\n\t\t\t// Getting Session Object From SessionFactory\n\t\t\tsessionObj = buildSessionFactory().openSession();\n\t\t\t// Getting Transaction Object From Session Object\n\t\t\tsessionObj.beginTransaction();\n\n\t\t\tFuncionario employeeObj = findRecordById(employeeId);\n\t\t\tsessionObj.delete(employeeObj);\n\n\t\t\t// Committing The Transactions To The Database\n\t\t\tsessionObj.getTransaction().commit();\n\t\t} catch (Exception sqlException) {\n\t\t\tif (null != sessionObj.getTransaction()) {\n\t\t\t\tsessionObj.getTransaction().rollback();\n\t\t\t}\n\t\t\tsqlException.printStackTrace();\n\t\t} finally {\n\t\t\tif (sessionObj != null) {\n\t\t\t\tsessionObj.close();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic int deleteEmployee(int empId) {\n\t\tint added = 0;\r\n\t\tString insertData = \"delete from employee where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setInt(1, empId);\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\r\n\t}", "public void deleteEmployee(Integer employeeID) {\n\t\tSession session = factory.openSession();\n\t\tTransaction transaction = null;\n\t\ttry {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\tEmployee employee = (Employee) session.get(Employee.class, employeeID);\n\t\t\tsession.delete(employee);\n\t\t\ttransaction.commit();\n\t\t} catch (HibernateException e) {\n\t\t\tif (transaction != null)\n\t\t\t\ttransaction.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "private void deleteEmployee() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public EmployeeEntity deleteEmployeeData(int employeeId, StorageContext context) throws PragmaticBookSelfException {\n\t\tEmployeeEntity result = null;\n\t\tSession hibernateSession = context.getHibernateSession();\n\t\tresult = (EmployeeEntity) hibernateSession.get(EmployeeEntity.class, employeeId);\n\t\treturn result;\n\n\t}", "@Override\r\n\tpublic int deleteEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "public abstract Employee deleteEmployee(int id) throws DatabaseExeption;", "@Override\r\n\tpublic void delete(Employee arg0) {\n\t\t\r\n\t}", "public void deleteEmployeeTimeInfoById(int id) {\r\n\t\tOptional<TimeInformation> employeeTime = repository.findById(id); \r\n\t\tif(employeeTime.isPresent()) {\r\n\t\t\trepository.deleteById(id);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void deleteById(int theId) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\tQuery<Employee> theQuery = currentSession.createQuery(\"delete from Employee where id=:employeeId\");\n\t\ttheQuery.setParameter(\"employeeId\", theId);\n\t\ttheQuery.executeUpdate();\n\t\t\n\t}", "public int deleteEmp(int id) throws Exception {\n\t\tSession session = null;\n\t\tEmp emp = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tdeleteUser(id);\n\t\t\temp = findEmpById(id);\n\t\t\tsession.delete(emp);\n\t\t\tsession.flush();\n\t\t\treturn 1;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn -1;\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}", "public String deleteEmployee(String employeeID) {\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tst.executeUpdate(\n\t\t\t\t\t\"DELETE Employee, Login FROM mwcoulter.Employee INNER JOIN mwcoulter.Login WHERE \"\n\t\t\t\t\t+ \"Email = Username AND ID = \" + Integer.valueOf(employeeID));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn \"failure\";\n\t\t}\n\t\treturn \"success\";\n\n\t}", "public void deleteEmployee(ActionRequest request, ActionResponse response) throws SystemException, PortalException {\n\t\tString stringKey = request.getParameter(\"deleteKey\");\n\t\tlong employeeId = Long.valueOf(stringKey);\n\t\tEmployee employee = EmployeeLocalServiceUtil.getEmployee(employeeId);\n\t\tServiceContext serviceContext = ServiceContextFactory.getInstance(DLFolder.class.getName(), request);\n\t\tEmployeeLocalServiceUtil.deleteEmployee(employeeId);\n\t\tResourceLocalServiceUtil.deleteResource(serviceContext.getCompanyId(), Employee.class.getName(),\n\t\t\t\tResourceConstants.SCOPE_INDIVIDUAL, employee.getEmployeeId());\n\t\tif (employee.getFileEntryId() > 0) {\n\t\t\tDLFileEntryLocalServiceUtil.deleteDLFileEntry(employee.getFileEntryId());\n\t\t}\n\t\tresponse.setRenderParameter(\"mvcPath\", \"/html/employee/view.jsp\");\n\t}", "@RequestMapping(value = \"/monthlypasses/{id}\", method = RequestMethod.DELETE)\n\tpublic void removeEmployee(@PathVariable Integer id) {\n\t\tmonthPathService.deleteMonthlyPassById(id);\n\t}", "public void deleteOne(Long id) {\n\t\ttry{\n\t\t\t//tx.begin();\n\t\t\tWeekAssignmentPerEmployee weekAssignmentPerEmployee = (WeekAssignmentPerEmployee)em.find(WeekAssignmentPerEmployee.class, id);\n\t\t\tif (weekAssignmentPerEmployee == null) {\n\t\t\t\tthrow new DaoException(2);\n\t\t\t}\n\t\t\tem.remove(weekAssignmentPerEmployee);\n\t\t\t\t\n\t //tx.commit();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tthrow new BusinessException(new ExceptionMessage(\"Failed in WeekAssignmentPerEmployeDao : deleteOne ...\"));\n\t \n\t\t}finally{\n\t\t\tem.close();\n\t\t}\n\n\t\t\n\t}", "@POST(\"/DeleteEmpire\")\n\tCollection<Empire> deleteEmpire(@Body Empire empire,@Body int id) throws GameNotFoundException;", "@GetMapping(\"/deleteEmployee/{id}\")\n public String deleteEmployee(@PathVariable(value =\"id\") long id){\n employeeService.deleteEmployeeById(id);\n return \"redirect:/\";\n }", "@Override\n\tpublic Employee delete(Employee emp) {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/empregado/deletar/{empregadoId}\\r\\n\",method = RequestMethod.DELETE)\n\tpublic ResponseEntity<EmpregadoDto> deletar(Integer id, EmpregadoDto empDto){\n\t\tOptional<EmpregadoDto> dto = repoEmp.findById(id);\n\t\tif(dto.isPresent()) {\n\t\t\trepoEmp.delete(empDto);\n\t\t\treturn new ResponseEntity<>(HttpStatus.OK);\n\t\t}else {\n\t\t\treturn new ResponseEntity<>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t}", "public int deleteRecord(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"delete from employeedbaddress where eNo=?\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public void delete(int id) throws InvalidOperationException {\n if (employeeArray[id] == null) {\n throw new InvalidOperationException(\"Error deleting employee, no such employee \" + id);\n }\n try {\n employeeArray[id] = null;\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error deleting employee, id must be less than \" + employeeArray.length);\n }\n }", "public boolean deleteEmployee(int id) {\n\t\tboolean flag = false;\n\t\tMapSqlParameterSource myMap = new MapSqlParameterSource();\n\t\tmyMap.addValue(\"id\", id);\n\t\t\n\t\tint effected = jdbcTemplate.update(\"delete from employee where empId=:id\", myMap);\n\t\tif(effected !=0) {\n\t\t\tflag=true;\n\t\t\tSystem.out.println(\"Employee with id \"+id+\" deleted successfully\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Some proble while deleting data from Employee table\");\n\t\t}\n\t\treturn flag;\n\t}", "@DeleteMapping(\"/etape-examen/{id}\")\n public ResponseEntity<Void> deleteEtapeExamen(@PathVariable Long id) {\n log.debug(\"REST request to delete EtapeExamen : {}\", id);\n etapeExamenService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Exam : {}\", id);\n examRepository.deleteById(id);\n }", "@Override\n public String deleteByPrimaryKey(Integer empId) {\n int result = mapper.deleteByPrimaryKey(empId);\n StringBuffer sb = new StringBuffer(\"\");\n if(result<=0) {\n sb.append(\"删除失败\");\n }else {\n sb.append(\"删除成功\");\n }\n return sb.toString();\n }", "@Override\r\n\tpublic boolean deleteEmp(int id) {\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\r\n\t\tEntityTransaction entityTransaction = entityManager.getTransaction();\r\n\r\n\t\ttry {\r\n\t\t\tentityTransaction.begin();\r\n\t\t\tEmployeeBean employeeBean = entityManager.find(EmployeeBean.class, id);\r\n\t\t\tif (employeeBean != null) {\r\n\t\t\t\tentityManager.remove(employeeBean);\r\n\t\t\t\tentityTransaction.commit();\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "@RequestMapping( method = RequestMethod.DELETE)\r\n\tpublic void deleteEmp(@RequestParam(\"employeeBankId\") String employeeBankId, HttpServletRequest req) {\r\n\t\tlogger.info(\"deleteEmp is calling :\" + \"employeeBankId\" + employeeBankId);\r\n\t\tLong empBankId = Long.parseLong(employeeBankId);\r\n\t\tbankDetailsService.delete(empBankId);\r\n\t}", "@Override\n\tpublic void deletarEmpregado(long id) {\n\t\tempregadoRepository.deleteById(id);\n\t}", "@GET\n @Path(\"/removeEmployeeById/{empId}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String removeEmployeeById(@PathParam(\"empId\") String empId){\n String output = \"\";\n try {\n output = EmployeeFacade.getInstance().removeEmployeeById(empId);\n } catch (IOException e) {\n output = \"Error\";\n }\n return output;\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete EventAttendance : {}\", id);\n eventAttendanceRepository.deleteById(id);\n }" ]
[ "0.8471577", "0.843938", "0.84372187", "0.8433651", "0.8296954", "0.8274478", "0.825691", "0.82422996", "0.8231343", "0.8227188", "0.8218308", "0.8211086", "0.82003015", "0.81270695", "0.8116793", "0.80765593", "0.8065863", "0.8064444", "0.8060767", "0.80556566", "0.80291295", "0.80231607", "0.8019314", "0.80168164", "0.79542536", "0.79339415", "0.7929122", "0.78955376", "0.7861921", "0.78245515", "0.77606755", "0.7752809", "0.7751659", "0.774732", "0.7708598", "0.770442", "0.7697607", "0.7692895", "0.7690296", "0.7668432", "0.76640147", "0.76402545", "0.7614", "0.7612848", "0.7597809", "0.7583791", "0.7581932", "0.758142", "0.75557375", "0.75455594", "0.75283325", "0.7496932", "0.74913967", "0.74882305", "0.7476517", "0.74748147", "0.74658173", "0.7463124", "0.74543583", "0.74512684", "0.7438968", "0.7430821", "0.742092", "0.74205", "0.74177635", "0.7396667", "0.73545927", "0.733944", "0.73291296", "0.73206127", "0.7283563", "0.7263873", "0.7236016", "0.72274196", "0.72017944", "0.7200895", "0.7200223", "0.7191335", "0.71855676", "0.7161573", "0.71560687", "0.7153345", "0.70524395", "0.70336854", "0.70117116", "0.69871783", "0.696591", "0.69569147", "0.68848705", "0.68824196", "0.6844806", "0.6838055", "0.68289876", "0.6827332", "0.6825966", "0.68085396", "0.6785664", "0.6779101", "0.67577267", "0.6751318" ]
0.8025059
21
TODO Autogenerated method stub
@Override public Map<String, Object> test(Integer id, String name) { Map<String,Object>map= new HashMap<String,Object>(); map.put("errcode", "200"); map.put("msg", "success"); map.put("data", "id: "+id+","+"name: "+name); return map; }
{ "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 BaseResponse testResponse() { return setResultSuccess(); }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void 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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public BaseResponse setRedisTest(String key, String value) { baseRedisService.setString(key, value); return setResultSuccess(); }
{ "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 BaseResponse getRedis(String key) { 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
Mutes a user and saves it into the file
public void muteUser(User user, int seconds) { bot.getCreditsFile().set("Mutes." + user.getId() + ".Name", user.getName()); bot.getCreditsFile().set("Mutes." + user.getId() + ".Mute", seconds); data.saveFile(bot.getCreditsFile(), "credits"); GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(user), Collections.singleton(Roles.MUTED), Collections.emptySet()).queue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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 static void writeUser(String file, User user) {\r\n try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file + \".ser\"))) {\r\n out.writeObject(user);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void saveFile(boolean answer) {\n if (answer) {\n userController.saveUserToFile();\n }\n }", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "public void addToFile(User newUser){\r\n //If the user name is not already in the file then we do not want to re-add the user.\r\n if (f.searchForUsername(newUser.getUsername()) == -1) {\r\n newUser.setPassword(encrypt(newUser.getPassword()));\r\n f.write(newUser);\r\n } else {\r\n System.err.println(\"User already exists\");\r\n }\r\n }", "public static void save(Context context,User user){\n try\n {\n\n FileOutputStream fileOutputStream = context.openFileOutput(\"UserData.dat\", Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(user);\n objectOutputStream.close();\n fileOutputStream.close();\n\n }\n\n catch(IOException ex) {\n System.out.println(\"IOException is caught\");\n }\n }", "public static void SaveUser(StandardUserModel user, Context context) {\n\t\tfilename = userprofile;\n\t\tString modelJson = gson.toJson(user);\n\t\t\n\t\twriteuser(modelJson, context);\n\t}", "public static String saveUser(User user){\r\n File userDir = (File)userDirs.get(user);\r\n\r\n if (user.isGuest()){\r\n System.out.println(\"Querying user about saving guest settings\");\r\n int result = JOptionPane.showConfirmDialog(getMainFrame(), \r\n \"Would you like to save the guest preferences?\\n(they may be shared with anyone else using this computer)\", \"Save preferences?\", JOptionPane.YES_NO_OPTION);\r\n if (result == JOptionPane.YES_OPTION){\r\n if (userDir == null){\r\n System.out.println(\"Creating new guest user\");\r\n File serverDir = new File(usersDir, user.getServer().getID());\r\n userDir = new File(serverDir, user.getUsername());\r\n if ((!userDir.exists() || !userDir.isDirectory()) && !userDir.mkdirs()){\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to create directory \"+userDir, \r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n }\r\n }\r\n else\r\n return null;\r\n }\r\n else if (userDir == null){\r\n System.out.println(\"Querying user about creating a new account\");\r\n int result = JOptionPane.showConfirmDialog(getMainFrame(),\r\n \"Would you like to save your \\\"\" + user.getUsername() + \"\\\" profile?\", \"Save profile?\", JOptionPane.YES_NO_OPTION);\r\n if (result == JOptionPane.YES_OPTION){\r\n System.out.println(\"Creating new user, named \"+user.getUsername());\r\n File serverDir = new File(usersDir, user.getServer().getID());\r\n userDir = new File(serverDir, user.getUsername());\r\n if ((!userDir.exists() || !userDir.isDirectory()) && !userDir.mkdirs()){\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to create directory \"+userDir, \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n }\r\n else\r\n return null;\r\n }\r\n\r\n try{\r\n Properties props = user.getProperties();\r\n Hashtable userFiles = user.getUserFiles();\r\n\r\n File propsFile = new File(userDir, \"settings\");\r\n OutputStream propsOut = new BufferedOutputStream(new FileOutputStream(propsFile));\r\n props.save(propsOut, user.getUsername()+\"'s properties for \"+user.getServer().getLongName());\r\n propsOut.close();\r\n\r\n if (!userFiles.isEmpty()){\r\n File userFilesFile = new File(userDir, \"files\"); \r\n DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(userFilesFile)));\r\n out.writeInt(userFiles.size());\r\n Enumeration filenames = userFiles.keys();\r\n while (filenames.hasMoreElements()){\r\n String filename = (String)filenames.nextElement();\r\n MemoryFile memFile = (MemoryFile)userFiles.get(filename);\r\n out.writeUTF(filename);\r\n synchronized(memFile){\r\n out.writeInt(memFile.getSize());\r\n memFile.writeTo(out);\r\n }\r\n }\r\n out.close();\r\n }\r\n\r\n userDirs.put(user, userDir);\r\n\r\n String settingsPath = getSettingsPath(user);\r\n\r\n if (user.isGuest())\r\n setProperty(user.getServer().getID()+\".guestAccountPath\", settingsPath);\r\n\r\n return settingsPath;\r\n } catch (IOException e){\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to save user file into:\\n\"+userDir, \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n }", "public void saveUserSettings() {\n\t}", "@Override\n\tpublic void save(User u) {\n\t\tSystem.out.println(\"a user saved\");\n\t}", "public void saveUserName(String userName) throws Exception {\r\n\t\tSystem.out.println(\"writing name in file \"+userName);\r\n\t\tsetuName(userName);\r\n\t\tFileWriter fw = new FileWriter(filePath, true);\r\n\t BufferedWriter bw = new BufferedWriter(fw);\r\n\t PrintWriter out = new PrintWriter(bw);\r\n\t out.println(userName);\r\n\t out.close();\r\n\t\t\t\r\n\t}", "public static void createOrOpenUsersFile() {\n try {\r\n File usersFile = new File(\"users.txt\");\r\n if (usersFile.createNewFile()) {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" has been created.\");\r\n } else {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" is ready.\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "public Long saveUser(User user, User modifiedBy);", "public void save(SystemUser user);", "public void saveAccount() {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\");\r\n\t\t//Recover the file name\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1];\r\n\t\t\r\n\t try {\r\n\t //use buffering\r\n\t OutputStream file = new FileOutputStream( fileName );\r\n\t OutputStream buffer = new BufferedOutputStream( file );\r\n\t ObjectOutput output = new ObjectOutputStream( buffer );\r\n\t \r\n\t try {\r\n\t \toutput.writeObject(this);\r\n\t }\r\n\t finally {\r\n\t \toutput.close();\r\n\t }\r\n\t }\r\n\t \r\n\t catch(IOException ex){\r\n\t \t System.out.println(\"Cannot perform output.\");\r\n\t }\r\n\t}", "public static void save() throws IOException {\n String output = Main.currentUser.toString();\n output += DatabaseTranslator.getUserLocations(currentUser.getName());\n DatabaseTranslator.storeUserData(currentUser.getName(), output);\n }", "@FXML\r\n\tpublic void saveNewAccount( ) {\r\n\t\t// Save user input\r\n\t\tString name = userName.getText( );\r\n\t\tString mail = email.getText( );\r\n\r\n\t\t// Call the to file method to write to data.txt\r\n\t\tUserToFile.toFile(name, pin, mail);\r\n\t\t\r\n\t\t// View the test after the info is saved\r\n\t\tviewTest( );\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 grantModerate(User user) throws ServiceException{\n }", "public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}", "public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);", "public void saveUserDirectory(String fileName) {\n\t\ttry {\n\t\t\tUserRecordIO.writeUserRecords(fileName, users);\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to write to file \" + fileName);\n\t\t}\n\t}", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "@Override\r\n\tpublic int save(SpUser t) {\n\t\treturn 0;\r\n\t}", "public static void save() {\n\t\t// Save each user \n\t\t// and list of directories \n\t\t// and files in each directory\n\t\tArrayList<String> usernames = getRegisteredUserNames();\n\t\tUtils.FileUtils.write(\n\t\t\t\tusernames, \n\t\t\t\tGlobal.Constants.LIST_OF_USERS\n\t\t\t\t);\t\n\t\tfor (User user:Global.Variables.registeredUsers) {\n\t\t\tUtils.FileUtils.write(\n\t\t\t\tuser.getDirectoryNames(), \n\t\t\t\tGlobal.Constants.DIRECTORY_LOCATION + user.getName()\n\t\t\t\t);\n\t\t\tsave(user);\n\t\t}\n\t}", "@Override\n\tpublic void saveUserModerator(String userName, List<String> ids,\n\t\t\tboolean isModeCate) throws Exception {\n\n\t}", "public void saveUser(User user) {\n\t\tFile d = new File(\"users\");\n\t\t\n\t\tif (!d.exists() || !d.isDirectory()) {\n\t\t\td.mkdir();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\t//Document document = builder.parse(f);\n\t\t\t\n\t\t\tDocument document = builder.newDocument();\n\t\t\t\n\t\t\tElement root = document.createElement(\"User\");\n\t\t\tdocument.appendChild(root);\n\t\t\t\n\t\t\troot.setAttribute(\"username\", user.name);\n\t\t\troot.setAttribute(\"password\", user.password);\n\t\t\t\n\t\t\t//System.out.println(\"Save: \" + user.password);\n\t\t\t\n\t\t\tIterator i = user.record.entrySet().iterator();\n\t\t\t\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tMap.Entry u = (Map.Entry)i.next();\n\t\t\t\tString name = (String)u.getKey();\n\t\t\t\tString record = (String)u.getValue();\n\n\t\t\t\tElement precord = document.createElement(\"Record\");\n\t\t\t\t\n\t\t\t\tprecord.setAttribute(\"username\", name);\n\t\t\t\tprecord.setTextContent(record);\n\t\t\t\troot.appendChild(precord);\n\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory tfactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = tfactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(document);\n\t\t\tStreamResult result = new StreamResult(new File(\"users/\" + user.name + \".xml\"));\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeUserInro(String name,String key){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"uName\" ,name);\n mydata.putString(\"uKey\",key);\n mydata.commit();\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 }", "private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }", "void editUser(String uid, User newUser);", "@Override\r\n\tpublic void save(User user) {\n\t\t\r\n\t}", "User modifyUser(Long user_id, User user);", "public static void resetUser() throws FileNotFoundException {\n\t\tworkers.clear();\n\t\tUserList.setUser();\n\t}", "@Override\n\tpublic void modifierUser(User c) {\n\t\t\n\t}", "void saveUserData(User user);", "private void writeNewUser(String name,String email,String password) {\n mDatabase.child(\"User\").child(name).child(\"Email\").setValue(email);\n mDatabase.child(\"User\").child(name).child(\"Password\").setValue(password);\n }", "@Override\n public void saveUser(User user) {\n }", "void markAsUserSession();", "public void createFile() throws IOException {\n String newName = input.getText();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n\n if (user.exists() && !user.isDirectory()) {\n input.setStyle(\"-fx-border-color: red\");\n }\n if (user.exists() && !user.isDirectory() || newName.isEmpty()) {\n input.setStyle(\"-fx-border-color: red\");\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n }\n else {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().addAll(newName);\n PrintWriter newUser = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + newName + \".txt\"));\n newUser.write(\"0 0 0 0 icon0 car\");\n newUser.close();\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }\n }", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "private void saveSettings(){\n // get current user from shared preferences\n currentUser = getUserFromSharedPreferences();\n\n final User newUser = currentUser;\n Log.i(\"currentUser name\",currentUser.getUsername());\n String username = ((EditText)findViewById(R.id.usernameET)).getText().toString();\n\n if(\"\".equals(username)||username==null){\n Toast.makeText(getApplicationContext(),\"Failed to save, user name cannot be empty\",Toast.LENGTH_LONG).show();\n return;\n }\n\n newUser.setUsername(username);\n\n // update user data in firebase\n Firebase.setAndroidContext(this);\n Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL);\n\n // set value and add completion listener\n myFirebaseRef.child(\"users\").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n\n Toast.makeText(getApplicationContext(),\"Data could not be saved. \" + firebaseError.getMessage(),Toast.LENGTH_SHORT).show();\n } else {\n // if user info saved successfully, then save user image\n uploadPhoto();\n Toast.makeText(getApplicationContext(),\"User data saved successfully.\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "void updateUserPassword(User user);", "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 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 registerUserOnServer() throws IOException {\r\n\t\tdataSending.sendMessage(Server.REGISTER+\" \"+userName, Long.toString(userModel.ID));\r\n\t}", "public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public static void writeTo(String filename, List<User> users){\r\n\t\tPrintWriter pw=null;\r\n\t\ttry{\r\n\t\t\tpw=new PrintWriter(new FileOutputStream(new File(filename),false));//false because don't append,\r\n\t\t\tfor(User user : users){//it replaces all with new updated data\r\n\t\t\t\tpw.write(user+\"\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tpw.close();\r\n\t\t}\r\n\t}", "private static void addUser(String filename, String username, String userkey) {\n\t\ttry {\n\t\t\t// Open the user file, create new one if not exists\n\t\t\tFileWriter fileWriterUser = new FileWriter(filename, true);\n\t\t\t// User BufferedWriter to add new line\n\t\t\tBufferedWriter bufferedWriterdUser = new BufferedWriter(fileWriterUser);\n\n\t\t\t// Concatenate user name and key with a space\n\t\t\tbufferedWriterdUser.write(username + \" \" + userkey);\n\t\t\t// One user one line\n\t\t\tbufferedWriterdUser.newLine();\n\n\t\t\t// Always close files.\n\t\t\tbufferedWriterdUser.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + filename + \"'\");\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "void save(User user);", "public void saveUser(User user);", "@Override\n\tpublic void updateUser(User curpwd) {\n\t\tuserRepository.save(curpwd);\n\t}", "public void saveUsers() {\n FileWriter fileWriter = null;\n PrintWriter printWriter = null;\n try {\n fileWriter = new FileWriter(pathData);\n printWriter = new PrintWriter(fileWriter);\n if (users != null) {\n \n for (Map.Entry m : users.entrySet()) {\n printWriter.println(m.getKey() + spChar + m.getValue() + \"\\n\");\n }\n }\n printWriter.close();\n } catch (IOException e) {\n }\n }", "public void storeUserPrefs(User user) {\n //start writing (open the file)\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(user);\n editor.putString(USER_PREFS, json);\n //close the file\n editor.apply();\n }", "@Override\n public void run() {\n P2PContext.getInstance().createShardProfilePreferences();\n String userId = P2PContext.getLoggedInUser();\n String deviceId = P2PContext.getCurrentDevice();\n DBSyncManager.getInstance(that).upsertUser(userId, deviceId, \"Photo Message\");\n that.manager.notifyUI(\"Added user -> \" + userId, \" --------> \", LOG_TYPE);\n that.manager.startBluetoothBased();\n }", "public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "@Override\n\tpublic void unlockAccount(String username, Map<String, User> map) {\n\t\tUser u = map.get(username);\n\t\tu.setTries(3);\n\t\tuserdata.open();\n\t\tuserdata.updateUser(u);\n\t\tuserdata.close();\n\t}", "public void updateUser(User user) {\n\t\t\r\n\t}", "public void makeProfile(String name){\r\n try{\r\n PrintWriter out = new PrintWriter(new FileWriter(\"../profiles/\" + name + \".profile\"));\r\n out.println(\"HORATIU INCORPORATED PROTECTED\"); //Header\r\n out.println(name); //Player name\r\n out.println(0); //Score\r\n \r\n //UNLOCK CODES\r\n //-1 if not unlocked\r\n //0 if unlocked but not completed\r\n //1 if completed\r\n out.println(0); //Initial level is unlocked by default\r\n for(int i = 0; i < 5; i++){\r\n out.println(-1); //\r\n }\r\n out.close();\r\n }\r\n catch(IOException e){\r\n }\r\n Player.playerName = name;\r\n Player.playerScore = 0; //Score\r\n Player.scores[0] = 0;\r\n for(int i = 1; i < 6; i++){ //1 to 6 so it does not overwrite the first 0\r\n Player.scores[i] = -1;\r\n }\r\n GameApp.makeToView(name);\r\n }", "public void makeCurrentUser() {\n // Remove the Add Friend ImageView\n mFriendIv.setVisibility(View.GONE);\n\n // Show the \"You\" TextView\n mYouTv.setVisibility(View.VISIBLE);\n }", "public void setMuser(String muser) {\n this.muser = muser;\n }", "private void writeNewUser(String userId, String name, String email) {\n User user = new User(name, email);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Name\").setValue(name);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Email\").setValue(email);\n\n\n }", "public static void writeUserFile(String fileToWriteTo, String info) throws IOException\n\t{\n\t\tFileWriter write = new FileWriter(fileToWriteTo, true);\n\t\twrite.write(info);\n\t\twrite.close();\n\t}", "@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 userSettings(String userName, String password, File nameFile,File passFile, String fileadd) {\n try\n {\n \n if(!nameFile.exists())\n {\n nameFile.createNewFile();\n }\n if(!passFile.exists())\n {\n passFile.createNewFile();\n }\n \n FileReader ufr = new FileReader(nameFile);\n FileReader pfr = new FileReader(passFile);\n \n BufferedReader ubr = new BufferedReader(ufr);\n BufferedReader pbr = new BufferedReader(pfr);\n \n ArrayList<String> uName = new ArrayList<>();\n ArrayList<String> uPass = new ArrayList<>();\n for (int i = 0; i < lineNum(fileadd); i++) {\n uName.add(ubr.readLine());\n uPass.add(pbr.readLine());\n }\n for (int i = 0; i < lineNum(fileadd); i++) \n {\n if (userName.equals(uName.get(i)))\n {\n uPass.set(i, password);\n } \n }\n \n ufr.close();\n pfr.close();\n FileWriter fw = new FileWriter(passFile);\n PrintWriter pw = new PrintWriter(fw);\n pw.print(\"\");\n \n FileWriter fw2 = new FileWriter(passFile, true);\n PrintWriter pw2 = new PrintWriter(fw2, true);\n \n for (int j = 0; j < uPass.size() -1; j++)\n {\n \n pw.print(uPass.get(j));\n pw.println();\n \n }\n pw.close();\n }catch(Exception e)\n {\n e.printStackTrace();\n }\n \n }", "public static void writeNewUser(User user) {\n DatabaseReference usersRef = FirebaseDatabase.getInstance().getReference();\n FirebaseAuth mAuth = FirebaseAuth.getInstance();\n usersRef.child(\"users\").child(mAuth.getUid()).setValue(user);\n }", "@Override\n\tpublic boolean saveDtls(UserModel model) {\n\n\t\tUserEntity userEntity = new UserEntity();\n\t\tBeanUtils.copyProperties(model, userEntity);\n\t\tif (model.getActiveSwitch() == null) {\n\t\t\tuserEntity.setActiveSwitch(\"Y\");\n\t\t}\n\t\tif (model.getStatus() == null) {\n\t\t\tuserEntity.setStatus(ATSConstants.LOCKED);\n\t\t}\n\t\tif (model.getPassword() == null) {\n\t\t\tString generateTempPwd = TemporaryPwdAndId.generateTempPwd();\n\t\t\tuserEntity.setPassword(generateTempPwd);\n\t\t\tsendMail(ATSConstants.ADMIN_UNLOCK_URL, userEntity);\n\t\t\tuserEntity.setPassword(AESEncyptionAndDecryption.encrypt(generateTempPwd));\n\t\t}\n\t\tUserEntity save = adminRepo.save(userEntity);\n\n\t\treturn save.getUserId() != null;\n\t}", "public void saveinUserPrivileges(UserPrivileges userPrivileges) {\r\n save(userPrivileges);\r\n }", "public void modifierProfil(User user) {\n \t\r\n \tif (!userRepository.findById(user.getId()).isPresent()) {\r\n \t\tthrow new EntityNotFoundException(\"L'utilisateur avec id \" + user.getId() + \" n'existe pas.\");\r\n \t}\r\n \tuserRepository.save(user);\r\n }", "void updateProfilePhoto(int userId, String filename);", "@Override\n\tpublic void saveUser(User user) {\n\t\tmongoTemplate.save(user);\n\t}", "public void atualiza_ficheiro_user(){//Atualiza o ficheiro users\n File f1 = new File(\"users.txt\");\n String pesq = \"\";\n if (f1.exists() && f1.isFile()){\n try{\n FileWriter fw = new FileWriter(f1);\n BufferedWriter bw = new BufferedWriter(fw);\n // 0 1 2 3 4 5 6 7\n // ':id:admin:nome:username:password:notificacoes:pesquisas'\n for(int i=0; i< lista_utilizadores.size();i++){\n int aux = 0;\n int aux_ativo = 0;\n if(lista_utilizadores.get(i).get_administrador()){\n aux = 1;\n }\n pesq = \"\";\n for(int j = 0; j < lista_utilizadores.get(i).get_pesquisas().size(); j++){\n\n pesq = pesq.concat(lista_utilizadores.get(i).get_pesquisas().get(j));\n pesq = pesq.concat(\"-\");\n }\n //System.out.println(\"pesq de = \" + i + \"| Pesquisa = \" + pesq);\n\n bw.append(\":\"+lista_utilizadores.get(i).get_id()+\":\"+aux+\":\"+lista_utilizadores.get(i).get_nome()+\":\"+lista_utilizadores.get(i).get_username()+\":\"+lista_utilizadores.get(i).get_password()+\":\"+lista_utilizadores.get(i).get_notificacoes()+\":\"+pesq+\":\");\n bw.newLine();\n }\n bw.close();\n\n fw.close();\n }\n catch (IOException ex) {\n System.out.println(\"Erro a escrever no ficheiro.\");\n }\n }\n else {\n System.out.println(\"Ficheiro nao existe.\");\n }\n }", "void update(String userName, String password, String userFullname,\r\n\t\tString userSex, int userTel, String role);", "void addUserInfo(String user, String password) {\r\n if (!userInfo.containsKey(user)) {\r\n userInfo.put(user, password);\r\n } else {\r\n System.out.println(\"User already exist!\");\r\n }\r\n writeToFile(\"Password.bin\", userInfo);\r\n }", "@Override\n\tpublic void updateUser(user theUser) {\n\t}", "static void saveUserGender(Context context, Gender gender) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .putInt(USER_GENDER_KEY, gender.getId())\n .apply();\n }", "public void writeFile(Context context){\n Writer writer = null;\n\n try {\n OutputStream out = context.openFileOutput(filename, Context.MODE_PRIVATE);\n writer = new OutputStreamWriter(out);\n writer.write(userName + \"~\" + color + \"~\" + level);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n\n } catch (IOException e) {\n e.printStackTrace();\n\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }", "public void create_loginFile(String account){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.LOGIN_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(account+\" logged in,\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "public void writeThrough(User user) {\n Entity userEntity = new Entity(\"chat-users\", user.getId().toString());\n userEntity.setProperty(\"uuid\", user.getId().toString());\n userEntity.setProperty(\"username\", user.getName());\n userEntity.setProperty(\"password\", user.getPassword());\n userEntity.setProperty(\"creation_time\", user.getCreationTime().toString());\n userEntity.setProperty(\"blocked\", Boolean.toString(user.isBlocked()));\n datastore.put(userEntity);\n }", "private void updateUserLogin() {\n\t\tSessionManager sessionManager = new SessionManager(\n\t\t\t\tMyApps.getAppContext());\n\n\t\tRequestParams params = new RequestParams();\n\t\tparams.add(\"user_id\", sessionManager.getUserDetail().getUserID());\n\n\t\tLog.d(\"EL\", \"userID: \" + sessionManager.getUserDetail().getUserID());\n\n\t\tKraveRestClient.post(WebServiceConstants.AV_UPDATE_USER_PROFILE_DATA_1,\n\t\t\t\tparams, new JsonHttpResponseHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tJSONObject response) {\n\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLog.d(\"EL\", \"response: \" + response.toString(2));\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, throwable,\n\t\t\t\t\t\t\t\terrorResponse);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public void writeUserLog(String name){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"userlist\" ,name);\n mydata.commit();\n }", "private void registerUser() throws FileNotFoundException, IOException\r\n\t{\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tString fname;\r\n\t\tString lname;\r\n\t\tint attempt = 0;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\t//PrintWriter wrapped around a BufferedWriter that is wrapped around a FileWriter\r\n\t\t//used to write on a file\r\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"UserAccount.txt\", true)));\t//true allows appending\r\n\t\t\r\n\t\t//gets user's first and last name\r\n\t\tSystem.out.println(\"Enter your first name: \");\r\n\t\tfname = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name: \");\r\n\t\tlname = input.nextLine();\r\n\t\t\r\n\t\t//gets user's desired username\r\n\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\tusername = input.nextLine();\r\n\t\tattempt++;\r\n\t\twhile (checkUserExists(username) != -1)\t\t//username already exists\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nThat username already exists\");\r\n\t\t\tif (attempt == 2)\t\t//generate random username with 8 characters after 2 attempts\r\n\t\t\t{\r\n\t\t\t\tif (lname.length() < 6)\t\t\t\t//if last name has less than six characters\r\n\t\t\t\t\tusername = lname;\r\n\t\t\t\telse\t\t\t\t\t\t\t\t//else if last name has six characters or greater\r\n\t\t\t\t\tusername = lname.substring(0, 6);\r\n\t\t\t\tfor (int i = username.length(); i < 8; i++)\t\t\t//loop runs until username has 8 characters\r\n\t\t\t\t\tusername += random.nextInt(9) + 1;\t\t\t\t//concatenate random number between 0 - 9 to the username\r\n\t\t\t\tSystem.out.println(\"A randomly generated username has been chosen for you.\");\r\n\t\t\t\tSystem.out.println(\"Your username is \" + username);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\t\t\tusername = input.nextLine();\r\n\t\t\t\tattempt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpw.println(username);\r\n\t\tuserAccounts[0][numOfUsers] = username;\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//get user's password\r\n\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\tpassword = input.nextLine();\r\n\t\twhile (password.length() < 8)\t\t\t//continues to loop until pass is at least 8 characters long\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nPassword must be at least eight characters long\");\r\n\t\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\t\tpassword = input.nextLine();\r\n\t\t}\r\n\t\tpw.println(password);\r\n\t\tuserAccounts[1][numOfUsers] = password;\r\n\t\tnumOfUsers++;\r\n\t\tpw.close();\r\n\t}", "public void storeLogUser(UserModel user)\n {\n\n // convert User object into String\n //convert to string using gson\n String stringUser= gson.toJson(user);\n\n //creating an Editor object ; to Edit(write into the file)\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n //storing the VoiceMArkerModel object\n editor.putString(\"LogUser\",stringUser);\n\n //apply the changes\n editor.apply();\n }", "@Override\n\tpublic int modifyUser(User user) {\n\t\tuser.setUpdateTime(new Date());\n\t\treturn userDao.updateUserById(user);\n\t}", "private void saveUserData() {\n mSharedPreferences.clearProfile();\n mSharedPreferences.setName(mName);\n mSharedPreferences.setEmail(mEmail);\n mSharedPreferences.setGender(mGender);\n mSharedPreferences.setPassWord(mPassword);\n mSharedPreferences.setYearGroup(mYearGroup);\n mSharedPreferences.setPhone(mPhone);\n mSharedPreferences.setMajor(mMajor);\n\n mImageView.buildDrawingCache();\n Bitmap bmap = mImageView.getDrawingCache();\n try {\n FileOutputStream fos = openFileOutput(getString(R.string.profile_photo_file_name), MODE_PRIVATE);\n bmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n\n if (entryPoint.getStringExtra(SOURCE).equals(MainActivity.ACTIVITY_NAME)) {\n Toast.makeText(RegisterActivity.this,\n R.string.edit_success, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegisterActivity.this,\n R.string.register_success, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void saveUserInPreferences(String userName, String password, User user) {\n mUserManager.setUsername(userName);\n mUserManager.setPassword(password);\n mUserManager.saveUser(user);\n }", "@Override\r\n\tpublic int updateUser(User user, String userName) {\n\t\treturn 0;\r\n\t}", "public void actionPerformed(ActionEvent arg0) { // method called when the button is clicked\n\n FileWriter fw; // create variable for the FileWriter which writes to the file\n //catch for empty unfilled textfields\n if (!txtLogin.getText().isEmpty() || !passwordField.getText().isEmpty() || !confirmPasswordField.getText().isEmpty() || !txtEmail.getText().isEmpty()) {\n if (passwordField.getText().equals(confirmPasswordField.getText())) {\n Pattern p = Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\"); // Rejex which checks for a valid email address\n Matcher m = p.matcher(txtEmail.getText()); //Tries to match the input email to check whether it is a valid email coapturing all required aspects\n\n if (m.find()) { // when mathcer finds the email valid proceed below\n try {\n fw = new FileWriter(\"src//SandwichShop//users.txt\", true); // Assign the FileWriter fw to a file\n fw.write(txtLogin.getText() + \" \" + passwordField.getText() + \" \" + txtEmail.getText() + \" \\r\\n\"); // Write user details to the file\n fw.close(); //close the FileWriter\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n JOptionPane.showMessageDialog(null, \"Registration completed successfully!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Enter correct E-mail, please.\");\n }\n } else {\n JOptionPane.showMessageDialog(null, \"\\\"Password\\\" field and \\\"Confirm Password\\\" field not match\");\n }\n } else {\n JOptionPane.showMessageDialog(null, \"One or more fields are empty!\");\n }\n }", "public void setUser(Motile user) {\n\n this.user = user;\n }", "public static void createNewUserPreference(Context context) {\r\n\t\tString newUserId = generateNewUserId();\r\n\t\tString userConfigKey = getUserConfigFileNameKey(newUserId);\r\n\t\tString userDbKey = getUserDatabaseFileNameKey(newUserId);\r\n\t\tString userConfigFileName = getUserConfigFileName(context, newUserId);\r\n\t\tString userDbFileName = getUserDatabaseFileName(context, newUserId);\r\n\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(\"user-\" + newUserId, newUserId);\r\n\t\t\t\teditor.putString(userConfigKey, userConfigFileName);\r\n\t\t\t\teditor.putString(userDbKey, userDbFileName);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}", "private void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }", "public void updateDuration(User user);", "public static void saveUser(PrivateUser user) {\n SharedPreferences.Editor editor = getSharedPrefsEditor();\n\n editor.putString(USER_PREF, new Gson().toJson(user));\n editor.commit();\n }", "public void write(Context c) throws IOException, FileNotFoundException {\n\t\tFileOutputStream f = null;\n\t\tObjectOutputStream o = null;\n\t\tf = c.openFileOutput(this.filename, Context.MODE_PRIVATE);\n\t\to = new ObjectOutputStream(f);\n\t\to.writeObject(this.user);\n\t\to.flush();\n\t\to.close();\n\t\t//f.close();\n\t}", "public void saveUsers() {\n\t\ttry {\n\t\t\t\n\t\t\tFile xmlFile = new File(\"Users.xml\");\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument document = builder.parse(xmlFile);\n\t\t\tElement users = document.getDocumentElement();\n\t\t\t\n\t\t\tArrayList<Student> u = ManageUsers.getActiveList();\n\t\t\tfor (int i = 0; i < u.size(); i++) {\n\t\t\t\t// Grab the info for a specific student\n\t\t\t\tStudent s = u.get(i);\n\t\t\t\tString fName = s.getFirstName();\n\t\t\t\tString lName = s.getLastName();\n\t\t\t\tint ucid = s.getUcid();\n\t\t\t\tint currentBorrowing = s.getCurrentBorrowing();\n\t\t\t\tboolean isActive = true;\n\t\t\t String username = s.getUsername();\n\t\t\t String password = s.getPassword();\n\t\t\t boolean isLibrarian = s.getIsLibrarian();\n\t\t\t \n\t\t\t Element student = document.createElement(\"student\");\n\t\t\t \n\t\t\t // Make a new element <student>\n\t\t\t // Add the element to the xml as a child of <Users>\n\t\t\t // Add the above fields (fName, etc.) as child nodes to the new student node\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Something went wrong with writing to the xml\");\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}" ]
[ "0.6105454", "0.6022642", "0.60095495", "0.5916301", "0.5850941", "0.5816129", "0.5810651", "0.5804824", "0.57349247", "0.57336867", "0.5725894", "0.57233286", "0.5720495", "0.57181686", "0.5703831", "0.5668101", "0.56667745", "0.5652993", "0.56523746", "0.56394774", "0.5632828", "0.56170696", "0.55813646", "0.5551583", "0.5537477", "0.55373937", "0.553528", "0.5531112", "0.55210936", "0.55182314", "0.55067265", "0.5479313", "0.5479203", "0.5473271", "0.5470779", "0.5468691", "0.5462966", "0.5460254", "0.5456111", "0.5446314", "0.54437655", "0.54403144", "0.54397225", "0.54141456", "0.54103804", "0.5402886", "0.53916305", "0.5387378", "0.5386432", "0.53857464", "0.53775734", "0.5374347", "0.53740776", "0.5368615", "0.53654826", "0.5360415", "0.535831", "0.5354898", "0.53505933", "0.5337206", "0.5335981", "0.5332786", "0.53288037", "0.53253734", "0.53028363", "0.53021497", "0.5300345", "0.52985245", "0.5296444", "0.5293804", "0.5278385", "0.5274746", "0.52746195", "0.5269923", "0.5267563", "0.5263058", "0.5247274", "0.5244961", "0.5242311", "0.5240153", "0.52266544", "0.5224665", "0.52179134", "0.5207745", "0.520641", "0.5206075", "0.5204895", "0.5203714", "0.5202222", "0.5201253", "0.5195878", "0.51924366", "0.5192026", "0.51917434", "0.5191388", "0.51868314", "0.51841813", "0.51791465", "0.5175139", "0.51708883" ]
0.62463963
0
Returns the time left for the user, 0 if the user isn't muted.
private int getTimeLeftForMute(User u) { if (!isMuted(u)) return 0; return bot.getCreditsFile().getInt("Mutes." + u + ".Mute"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTimeLeft() {\n\t\treturn timeLeft;\n\t}", "public long getTimeLeft() {\n return getExpiration() - System.currentTimeMillis() / 1000L <= 0 ? 0 : getExpiration() - System.currentTimeMillis() / 1000L;\n }", "public long getTimeLeft() {\n return timeLeft;\n }", "public long getTimeLeft() {\n\t\treturn timeLeft;\n\t}", "public long getTimeRemaining() {\n int timer = 180000; //3 minutes for the game in milliseconds\n long timeElapsed = System.currentTimeMillis() - startTime;\n long timeRemaining = timer - timeElapsed + bonusTime;\n long timeInSeconds = timeRemaining / 1000;\n long seconds = timeInSeconds % 60;\n long minutes = timeInSeconds / 60;\n if (seconds < 0 || minutes < 0) { //so negative numbers don't show\n seconds = 0;\n minutes = 0;\n }\n return timeInSeconds;\n }", "public long getStatusTimeLeft()\r\n {\r\n long timeLeft = statusTimeout - System.currentTimeMillis();\r\n if ( timeLeft < 0 )\r\n {\r\n timeLeft = 0;\r\n }\r\n return timeLeft;\r\n }", "public long timeLeftInSeconds(){\n Date currTime = new Date();\n long diff = hackathonEndTime.getTime() - currTime.getTime();\n long diffSec = diff/1000;\n\n //truncate to show relevant time\n if(diffSec > 34.5*3600){diffSec = (long)(34.5*3600);}\n if(diffSec < 0){diffSec = 0;}\n\n return diffSec;\n }", "public String getTimeLeft() {\n return NumberToTimeLeft.convert(_dateExpiration - System.currentTimeMillis(),true);\n }", "public void HowMuchTimeLeft() {\n\t\tTimeLeft = Count.HowMuchTimeLeft();\n\t}", "@Override\n\tpublic int getTimeLeft() {\n\t\treturn chronometer.getTimeLeft();\n\t}", "public long getRemainingTime() {\n return (maxTime_ * 1000L)\n - (System.currentTimeMillis() - startTime_);\n }", "public long getMillisecondsLeft() {\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n long now = c.getTimeInMillis();\n long endToday = getEndDateInMillis();\n long oneDayInMillis = 24 * 60 * 60 * 1000;\n long endTomorrow = endToday + oneDayInMillis;\n\n long end = endToday;\n\n if(now > endToday) {\n end = endTomorrow;\n }\n\n return end - now;\n }", "private long remainingTime() {\n final long remainingTime = this.designatedEnd - System.currentTimeMillis();\n return remainingTime >= 0 ? remainingTime : 0L;\n }", "public float getTimeLeft() {\n return this.state.getTime();\n }", "public float getRemainingTime () {\n\t\treturn duration - timer < 0 ? 0 : duration - timer;\n\t}", "public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}", "public double getTimeRemaining() {\n\t\treturn (startingTime + duration) - System.currentTimeMillis();\n\t}", "public long getRemainingTime() {\n if (isPaused()) {\n return pausedPoint;\n }\n long res = (long) ((spedEndTime - SystemClock.elapsedRealtime()) * speed);\n return res > 0 ? res : 0;\n }", "Double getRemainingTime();", "public long getCurrentUserTime() {\n return getUserTime() - startUserTimeNano;\n }", "public double getRemainingTime()\n {\n return totalTime - scheduledTime;\n }", "public int getLivesRemaining();", "Duration getRemainingTime();", "@Override\n public long timeUserWaitedMs() {\n return 0 ;\n }", "public long getRemainingDuration() {\n\t\treturn 0;\n\t}", "public int getUpSeconds() {\n return (int)((_uptime % 60000) / 1000);\n }", "@Override\n public long getRemainingSeconds(UUID uuid) {\n final long now = System.currentTimeMillis();\n final long lastUsageTime = cooldownList.get( uuid );\n final long diff = now - lastUsageTime;\n\n // Get enderpearl cooldown from configs\n final EnderpearlCategory cc = Sponge.getServiceManager().provideUnchecked(ConfigService.class).\n getGlobal().\n getEnderpearlCategory();\n final long cooldown = cc.getCooldownSeconds();\n\n // Negative values means the cooldown expired\n if (TimeUnit.MILLISECONDS.toSeconds(diff) > cooldown) {\n updateUserCooldown( uuid );\n return 0;\n }\n\n return TimeUnit.MILLISECONDS.toSeconds(diff);\n }", "public TLifeTimeInSeconds getLifetimeLeft() {\n\n\t\treturn lifetimeLeft;\n\t}", "public int getTotalPeopleLeft() {\n\t\treturn totalPeopleLeft;\n\t}", "public int getTotalWaitTime() {\n return totalWaitTime;\n }", "public long getUserFreePlayTimePreference() {\n if (currentContext != null) {\n SharedPreferences sharedPrefs = currentContext.getSharedPreferences(USER_FREE_PLAY_TIME_SHARED_PREF_NAME, 0);\n return sharedPrefs.getLong(USER_FREE_PLAY_TIME_SHARED_PREF_NAME, 0);\n }\n return 0;\n }", "public int getUserTime() {\n\t\treturn this.userTime;\n\t}", "public long remainingVolume() {\n return volume - volumeSold() - volumeActiveCritters();\n }", "public long remainingTime() throws IgniteTxTimeoutCheckedException;", "public int getSecondsPassed()\n {\n return this.seconds;\n }", "public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }", "@java.lang.Override\n public com.google.protobuf.Int32Value getRemainingTimeSeconds() {\n return remainingTimeSeconds_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : remainingTimeSeconds_;\n }", "public long getTimeTaken();", "public int getUpMinutes() {\n return (int)((_uptime % 3600000) / 60000);\n }", "public long getSessionDuration(){\n return (currentTime-startTime)/1000;\n }", "public int getTotalOftimePlayed() {\n return secToMin(statistics.get(TypeOfGames.SIMGAME).getTotalOfTime()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getTotalOfTime()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getTotalOfTime());\n }", "int getRemainingCooldown();", "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 getAlertMessageTimeRemaining()\n {\n return this.alert_message_time_remaining;\n }", "public long getOccupiedSeconds(){\n \t\treturn occupiedSeconds;\n \t}", "void setTimeLeft(int time) {\n\t\ttimeLeft = time;\n\t}", "int getSignOffTime();", "public long getElapsedTimeMili() {\n return running ? ((System.currentTimeMillis() - startTime)/100) % 1000 : 0;\n }", "public long getTimeLimit() {\n\t\treturn timeLimit;\n\t}", "public int getWaitedTime() {\n\t\treturn this.waitedTime;\n\t}", "private double getTimeRemainingInUTCDay(){\n\t\tdouble daysLeftInDay;\n\n\t\tInstant origin = Instant.ofEpochMilli (cur_mainshock.getOriginTime());\n\t\tZonedDateTime zdt = ZonedDateTime.ofInstant (origin, ZoneOffset.UTC);\n\t\tZonedDateTime zdt2 = zdt.toLocalDate().atStartOfDay (ZoneOffset.UTC);\n\t\tInstant daybreak = zdt2.toInstant();\n\n//\t\tSimpleDateFormat formatter=new SimpleDateFormat(\"d MMM yyyy, HH:mm:ss\");\n//\t\tformatter.setTimeZone(utc); //utc=TimeZone.getTimeZone(\"UTC\"));\n//\t\tSystem.out.println(formatter.format(Date.from (origin)));\n//\t\tSystem.out.println(formatter.format(Date.from (daybreak)));\n\t\t\n\t\tdaysLeftInDay = 1.0 - ((double)(origin.toEpochMilli() - daybreak.toEpochMilli()))/ComcatOAFAccessor.day_millis;\n\t\tif (daysLeftInDay == 1.0) {\n\t\t\tdaysLeftInDay = 0.0;\n\t\t}\n\t\treturn daysLeftInDay;\n\t}", "public static int GetMills() {\r\n return (int) System.currentTimeMillis() - StartUpTimeMS;\r\n }", "public long iPowerOffMinutesLeft(String timer_name) {\n\t\tlong time = 0;\n\n\t\tPowerOffTimer mPowerOffTimer = mTvTimerManager\n\t\t\t\t.getPowerOffTimer(timer_name);\n\n\t\tif (mPowerOffTimer != null) {\n\t\t\ttime = mPowerOffTimer.getTimeLeft();\n\t\t\tif (time % 60000 > 0) {\n\t\t\t\ttime = time / 60000 + 1;// milliseconds to minutes\n\t\t\t} else {\n\t\t\t\ttime = time / 60000;\n\t\t\t}\n\t\t}\n\n\t\treturn time;\n\t}", "public int getTotalWait() {\n return totalWait;\n }", "public long getDurationUseOfUser(int userid) {\n \t\tif (interactionHistoryRanges.containsKey(userid)) {\n \t\t\tList<Date> dateRange = interactionHistoryRanges.get(userid);\n \t\t\treturn (dateRange.get(endDatePosition).getTime() - dateRange.get(startDatePosition).getTime());\n \t\t}\n \t\treturn -1;\n \t}", "public long age() {\n if (startTime == 0) {\n return 0;\n } else {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }\n }", "public int getRemaining() {\n\t\treturn activeQuest.getRequirement_left();\n\t}", "public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }", "public long calcRemaining(){\n return getGrandTotal() - getTotalPaid();\n }", "public int getduration() {\n\t\tDuration duration = Duration.between(initial_time, current_time);\n\t\treturn (int)duration.getSeconds();\n\t}", "public int getTotalTime();", "public static long getRemainTimeInDay() {\r\n\t\tlong remain;\r\n\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(new Date());\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 23);\r\n\t\tcalendar.set(Calendar.MINUTE, 59);\r\n\t\tcalendar.set(Calendar.SECOND, 59);\r\n\t\tremain = calendar.getTimeInMillis() - System.currentTimeMillis();\r\n\r\n\t\treturn remain;\r\n\t}", "public int totalTime()\n {\n return departureTime - arrivalTime;\n }", "public int getRemainingPausesCount() {\r\n return remainingPausesCount;\r\n }", "int getExpiryTimeSecs();", "public static int GetPlayersLeft () {\n int players_left = 0;\r\n\r\n // LOOK AT EACH PLAYER AND CHECK IF THEY HAVEN'T LOST\r\n for (int i = 0; i < player_count; i++) {\r\n if (!player[i].lost)\r\n players_left++;\r\n }\r\n\r\n // RETURN THE RESULTS\r\n return players_left;\r\n }", "public int getGuessesLeft() {\r\n return 0;\r\n }", "public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }", "public String getEstimatedRemainingTime() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return \"N/A\";\n \n long eta = d-(System.currentTimeMillis()-startTime);\n if(eta<=0) return \"N/A\";\n \n return Util.getTimeSpanString(eta);\n }", "public com.google.protobuf.Int32Value getRemainingTimeSeconds() {\n if (remainingTimeSecondsBuilder_ == null) {\n return remainingTimeSeconds_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : remainingTimeSeconds_;\n } else {\n return remainingTimeSecondsBuilder_.getMessage();\n }\n }", "int getSignOnTime();", "private long getGameDuration() {\n return ((System.currentTimeMillis() - startGameTime) / 1000);\n }", "private int calculateDaysLeftOnLicense(Date pNowDate, Date pExpiryDate)\n{\n \n //milliseconds since 1/1/1970, 00:00:00 GMT\n long nowTime = pNowDate.getTime(); \n long expiryTime = pExpiryDate.getTime();\n\n long daysRemaining = expiryTime - nowTime; //time left in milliseconds\n \n daysRemaining /= 1000; //convert to seconds\n daysRemaining /= 60; //convert to minutes\n daysRemaining /= 60; //convert to hours\n daysRemaining /= 24; //convert to days\n \n if (daysRemaining > Integer.MAX_VALUE) {daysRemaining = Integer.MAX_VALUE;}\n if (daysRemaining < Integer.MIN_VALUE) {daysRemaining = Integer.MIN_VALUE;}\n \n return((int)daysRemaining);\n \n}", "public int getOccupiedMinutes(){\n \t\treturn (int) (getOccupiedSeconds()/60);\n \t}", "private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }", "public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }", "public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }", "public long getRemaining() {\n\t\treturn disk_mgr.getRemaining();\n\t}", "public long getTimeLength() {\n return itemsets.get(itemsets.size() - 1).getTimestamp() - itemsets.get(0).getTimestamp();\n }", "private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\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 }", "public static int getSleepTime()\n {\n int result = SLEEP_TIME;\n SLEEP_TIME += SLEEP_TIME_INTERVAL;\n if (SLEEP_TIME > SLEEP_TIME_MAX)\n {\n SLEEP_TIME = 0;\n }\n return result;\n }", "public java.lang.Integer getSecondsWatched() {\n return seconds_watched;\n }", "long getTimeInMilliSeconds();", "public void printTimeRemaining() {\n long timeInSeconds = getTimeRemaining();\n long seconds = timeInSeconds % 60;\n long minutes = timeInSeconds / 60;\n System.out.println(\"Time until the oxygen supply runs out: \" + minutes \n + \" minutes and \" + seconds + \" seconds.\");\n }", "public Long tolerationSeconds() {\n return this.tolerationSeconds;\n }", "public abstract float getCooldownRemaining();", "public java.lang.Integer getSecondsWatched() {\n return seconds_watched;\n }", "public int getGuessesLeft() {\r\n return (guessesAllowed - numWrongGuesses);\r\n }", "public Integer getGameUseTime() {\n return gameUseTime;\n }", "public void updateMuteTime() {\n for (Member m : GuildUtils.members()) {\n final User u = m.getUser();\n if (isMuted(u)) {\n muteUser(u, getTimeLeftForMute(u) - 4);\n } else {\n GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(u), Collections.emptySet(), Collections.singleton(Roles.MUTED)).queue();\n }\n }\n }", "public long getUptime() {\n\t\treturn System.currentTimeMillis()-uptime;\n\t}", "public final long getRemainingTime(K key) {\n final CacheItem<K, V, D> val;\n synchronized (this) {\n val = this.cache.get(key);\n }\n if (val == null)\n return -1;\n return val.getRemainingTimeoutDelay();\n }", "public int getTimesPlayed() {\r\n\t\treturn timesPlayed;\r\n\t}", "public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public int getGuessesLeft() {\r\n return this.numGuesses;\r\n }", "public int getLobbyCountdownTime() {\n\t\treturn lobbyCountdownTime;\n\t}", "public long getMinutesAsleep() {\n return minutesAsleep;\n }", "public Long getTimeLapsed() {\r\n\t\tif(moodTimestamp == null) \r\n\t\t\treturn null;\r\n\t\telse \r\n\t\t\treturn ((System.currentTimeMillis()/1000) - moodTimestamp.longValue());\r\n\t}" ]
[ "0.7157648", "0.7152993", "0.70933354", "0.70155114", "0.6843487", "0.6819924", "0.6706749", "0.6643891", "0.65729797", "0.6507416", "0.6350907", "0.6322662", "0.62641335", "0.6258594", "0.6229165", "0.61428696", "0.61358184", "0.6117286", "0.6102503", "0.607123", "0.60630774", "0.600509", "0.6002276", "0.59780055", "0.5950975", "0.59237283", "0.589391", "0.58695143", "0.5760275", "0.5757027", "0.5751253", "0.57214814", "0.56813043", "0.564306", "0.5641326", "0.5639028", "0.56349564", "0.56270933", "0.5625098", "0.55905545", "0.55625635", "0.55340046", "0.5529392", "0.55202895", "0.55156535", "0.5505104", "0.54956925", "0.54938865", "0.548632", "0.5467279", "0.54669046", "0.5448723", "0.5419956", "0.5408422", "0.54064995", "0.53977543", "0.5394551", "0.53810114", "0.53604203", "0.5342271", "0.53343767", "0.5332396", "0.5328706", "0.53182614", "0.5315009", "0.52995193", "0.52926993", "0.5290454", "0.5275568", "0.5270004", "0.5264953", "0.52632034", "0.526303", "0.5258907", "0.5254683", "0.5252568", "0.5246565", "0.5231328", "0.52271813", "0.52263224", "0.52216226", "0.52184635", "0.52066755", "0.5194487", "0.5193681", "0.5189165", "0.51864886", "0.51817816", "0.5176112", "0.51753825", "0.51542103", "0.51530623", "0.5145459", "0.5143381", "0.51328063", "0.5132095", "0.5130589", "0.5122443", "0.51214993", "0.51159185" ]
0.80780447
0
Returns true if the given user is muted
public boolean isMuted(User u) { return bot .getCreditsFile() .getInt("Mutes." + u + ".Mute") > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isUserMuted(Neighbor user){\n Iterator<Neighbor> it = mutedNeighbors.iterator();\n while (it.hasNext()) {\n Neighbor peer = it.next();\n if(peer.getDeviceAddress().equals(user.getDeviceAddress())) {\n Log.i(TAG,\"User is muted\");\n return true;\n }\n }\n Log.i(TAG,\"User is NOT muted\");\n return false;\n }", "Boolean isMuted() {\n return execute(\"player.muted\");\n }", "public boolean isMuted()\n\t{\n\t\treturn m_isMuted;\n\t}", "public boolean getMute();", "@Override\n public boolean isDM(Optional<BaseCharacter> inUser)\n {\n if(!inUser.isPresent())\n return false;\n\n return inUser.get().hasAccess(Group.DM);\n }", "public void setMuted(boolean b)\n\t{\n\t\tm_isMuted = b;\n\t}", "public boolean toggleMute() {\n SoundPlayer.toggleMusicMute();\n SoundPlayer.toggleSoundFxMute();\n muted = !muted;\n return muted;\n }", "@Override\r\n\t\tpublic boolean dmr_getMute() throws RemoteException {\n\t\t\tboolean mute = soundManager.getAudioMuteEnabled();\r\n\t\t\tUtils.printLog(TAG, \"soundManager.getAudioMuteEnabled()\" + mute);\r\n\t\t\treturn mute;\r\n\t\t}", "public void muteUserLocally(boolean muted, String id) {\n for (int uid : usersCallId.keySet()) {\n if (usersCallId.get(uid).equals(id)) {\n mRtcEngine.adjustUserPlaybackSignalVolume(uid, muted ? VOLUME_OFF : STANDARD_VOLUME);\n }\n }\n }", "public boolean isMute() throws IllegalStateException {\n\t\tcheckConnectedDeviceThrowable();\n\t\treturn mIsMute;\n\t}", "@Override // com.oculus.messengervr.interfaces.MessengerThread\n @androidx.annotation.Nullable\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public java.lang.Boolean isMuted() {\n /*\n r6 = this;\n com.oculus.messenger.models.Thread r0 = r6.mOcThread\n r3 = 0\n if (r0 != 0) goto L_0x0017\n r1 = 0\n L_0x0008:\n long r4 = java.lang.System.currentTimeMillis()\n int r3 = (r1 > r4 ? 1 : (r1 == r4 ? 0 : -1))\n r0 = 0\n if (r3 <= 0) goto L_0x0012\n L_0x0011:\n r0 = 1\n L_0x0012:\n java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)\n return r0\n L_0x0017:\n long r1 = r0.mMuteExpireTime\n int r0 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))\n if (r0 < 0) goto L_0x0011\n goto L_0x0008\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.messengervr.oc.models.OcMessengerThread.isMuted():java.lang.Boolean\");\n }", "public CommonAlert muted(Boolean muted) {\n this.muted = muted;\n return this;\n }", "public boolean getPropertyMute();", "public static boolean muteNeighbor(Neighbor neighbor) throws NullPointerException{\n boolean isMuted = false;\n if(!isUserMuted(neighbor)) {\n if (UDPpacketListner.doesAddressExist(neighbor.getDeviceAddress())) {\n //Get the neighbor's IP\n neighbor.setIpAddress(UDPpacketListner.getPeerAddress(neighbor.getDeviceAddress()).getHostAddress());\n\n isMuted = mutedNeighbors.add(neighbor);\n Log.i(\"mute\", neighbor.getInstanceName() + \" is muted? \" + isMuted);\n if(isMuted)\n Toast.makeText(TabsActivity.ctx, neighbor.getInstanceName()+\" has been muted\", Toast.LENGTH_LONG).show();\n\n }\n }\n return isMuted;\n }", "@Override\n\tpublic boolean isUser(User user) {\n\t\treturn false;\n\t}", "public boolean getPropertyMute()\n {\n return iPropertyMute.getValue();\n }", "void mute() {\n execute(\"player.muted = true\");\n }", "public boolean isResponsible(User user) {\n\t\tHashMap<String, Object> filters = new HashMap<>();\n\n\t\tfilters.put(\"responsible\", new ValueParameter(user));\n\n\t\treturn !this.filter(filters).isEmpty();\n\t}", "public boolean isCurrentUserCanUnlock() {\r\n return currentUserCanUnlock;\r\n }", "public boolean setPropertyMute(boolean aValue);", "public int mute(boolean mute) {\n int result = mRtcEngine.muteLocalAudioStream(mute);\n appointment.muteUser(new DatabaseUser(MainUser.getMainUser().getId()), mute);\n\n return result;\n }", "private int getTimeLeftForMute(User u) {\n if (!isMuted(u)) return 0;\n return bot.getCreditsFile().getInt(\"Mutes.\" + u + \".Mute\");\n }", "public void setMute(boolean mute);", "public boolean isCurrentUserAdmin(){\n if (getAdminUserFromId(currentUserId)!=null){\n return true;\n }\n else{\n return false;\n }\n }", "@Resource(resourceId = 2215, operation = Operation.Read)\n public Boolean readMute()\t{\n ActionInvocation actionInvocation =\n new ActionInvocation(renderingControlService.getAction(ACTION_GET_MUTE));\n actionInvocation.setInput(ARG_INSTANCE_ID, new UnsignedIntegerFourBytes(0));\n actionInvocation.setInput(ARG_CHANNEL, VALUE_CHANNEL_MASTER);\n Map<String, ActionArgumentValue> output = UpnpController.getInstance().executeUpnpAction(actionInvocation);\n return (Boolean) output.get(ARG_CURRENT_MUTE).getValue();\n }", "public boolean isUser()\n\t{\n\t\treturn (id != -1);\n\t}", "public boolean setPropertyMute(boolean aValue)\n {\n return setPropertyBool(iPropertyMute, aValue);\n }", "private boolean hasUserImportantView() {\n int userID = this.sharedPreferences.getInt(Constants.SP_USER_ID_KEY, 0);\n return this.sharedPreferences.getBoolean(serverName + \"_\" + userID, false);\n }", "void unmute() {\n execute(\"player.muted = false\");\n }", "public void muteUser(User user, int seconds) {\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Name\", user.getName());\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Mute\", seconds);\n data.saveFile(bot.getCreditsFile(), \"credits\");\n GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(user), Collections.singleton(Roles.MUTED), Collections.emptySet()).queue();\n }", "public boolean isSpectator()\n {\n NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(this.getGameProfile().getId());\n return networkplayerinfo != null && networkplayerinfo.getGameType() == GameType.SPECTATOR;\n }", "private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }", "public synchronized boolean isTestUser(User user) {\r\n return user.getEmail().endsWith(server.getServerProperties().get(TEST_DOMAIN_KEY));\r\n }", "@Override\n public boolean isUser() {\n return false;\n }", "private boolean cekUser(String user){\n return user.equals(Preferences.getRegisteredUser(getBaseContext()));\n }", "default void toggle(boolean fromUser) {\n if (isPlaying()) {\n pause(fromUser);\n } else {\n play(fromUser);\n }\n }", "public boolean checkForUser(Player p) {\n\t\tif(p.getName(p).equals(\"user\")) {\n\t\t\treturn true;\t\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean unmuteNeighbor(Neighbor neighbor){\n if(isUserMuted(neighbor))\n {\n Toast.makeText(TabsActivity.ctx, neighbor.getInstanceName()+\" has been unmuted\", Toast.LENGTH_LONG).show();\n return mutedNeighbors.remove(neighbor);}\n return false;\n }", "void play(boolean fromUser);", "public boolean isUserWorkingCopy() {\r\n boolean result = false;\r\n String sessionUser = getUserName();\r\n if (!StringUtils.isBlank(sessionUser)) {\r\n if (vocabularyFolder != null) {\r\n String workingUser = vocabularyFolder.getWorkingUser();\r\n return vocabularyFolder.isWorkingCopy() && StringUtils.equals(workingUser, sessionUser);\r\n }\r\n }\r\n \r\n return result;\r\n }", "boolean blockUser(User user);", "@WebMethod public boolean isAdmin(String user);", "private boolean isNotCurrentUser(User user) {\n if (user.getEmail().equals(mEncodedEmail)) {\n /* Toast appropriate error message if the user is trying to add themselves */\n Toast.makeText(mActivity,\n mActivity.getResources().getString(R.string.toast_you_cant_add_yourself),\n Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\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}", "boolean unblockUser(User user);", "public boolean isUserRunning(int userId, int flags) {\n UserState state = getStartedUserState(userId);\n boolean z = false;\n if (state == null) {\n return false;\n }\n if ((flags & 1) != 0) {\n return true;\n }\n if ((flags & 2) != 0) {\n switch (state.state) {\n case 0:\n case 1:\n return true;\n default:\n return false;\n }\n } else if ((flags & 8) != 0) {\n switch (state.state) {\n case 2:\n case 3:\n return true;\n case 4:\n case 5:\n return StorageManager.isUserKeyUnlocked(userId);\n default:\n return false;\n }\n } else if ((flags & 4) != 0) {\n switch (state.state) {\n case 3:\n return true;\n case 4:\n case 5:\n return StorageManager.isUserKeyUnlocked(userId);\n default:\n return false;\n }\n } else {\n if (!(state.state == 4 || state.state == 5)) {\n z = true;\n }\n return z;\n }\n }", "public boolean isSetUser() {\n return this.user != null;\n }", "public boolean isSetUser() {\n return this.user != null;\n }", "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}", "public void setMute(boolean mute) {\n \t\tthis.mute = mute;\n \t}", "public static boolean isCurrentUserVendedor() {\n return UserRole.VENDEDOR.equals(CURRENT_USER.getUserRole());\n }", "public static boolean isUserPassed() {\n return isUserPassed(user);\n }", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "public void updateMuteTime() {\n for (Member m : GuildUtils.members()) {\n final User u = m.getUser();\n if (isMuted(u)) {\n muteUser(u, getTimeLeftForMute(u) - 4);\n } else {\n GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(u), Collections.emptySet(), Collections.singleton(Roles.MUTED)).queue();\n }\n }\n }", "public boolean isSilent ( ) {\n\t\ttry {\n\t\t\treturn invokeSafe ( \"isSilent\" );\n\t\t} catch ( NoSuchMethodError ex ) { // legacy\n\t\t\tPlayer handle = handleOptional ( ).orElse ( null );\n\t\t\t\n\t\t\treturn handle != null && EntityReflection.isSilent ( handle );\n\t\t}\n\t}", "@Override\r\n\tpublic boolean isVerifiedUser(User user) {\n\t\tif (userDao.get(user.getId()).isVerified())\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "protected boolean isDiffUser() {\r\n\t\tString profileIdVap = \"\";\r\n\r\n\t\t// Retrieve current user and its profile ID from session\r\n\t\tUser currentUser = SessionUtils.getCurrentUser(request.getSession());\r\n\t\tif (currentUser.getProperty(AuthenticationConsts.PROPERTY_PROFILE_ID) != null) {\r\n\t\t\tprofileIdVap = (String)currentUser.getProperty(AuthenticationConsts.PROPERTY_PROFILE_ID);\r\n\r\n\t\t}\r\n\t\t// If profile ID is different, return true\r\n\t\tif (!profileIdVap.equals(userProfile.get(AuthenticationConsts.KEY_PROFILE_ID))) {\r\n\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\tLOG.debug(String.format(\"profile_id_vap: %s; profileid: %s; userId: %s\",\r\n\t\t\t\t\t\t profileIdVap,\r\n\t\t\t\t\t\t userProfile.get(AuthenticationConsts.KEY_PROFILE_ID),\r\n\t\t\t\t\t\t userProfile.get(AuthenticationConsts.KEY_USER_NAME)));\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\tLOG.debug(String.format(\"same user in session, profileid: %s; userid: %s\",\r\n\t\t\t\t\t\tprofileIdVap,\r\n\t\t\t\t\t\tuserProfile.get(AuthenticationConsts.KEY_USER_NAME)));\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isEnabledByUser() {\n return mEnabledByUser;\n }", "public boolean isSilent() {\n for(int iSndGrp = 0, i = 0;\n iSndGrp < XaAdpcmDecoder.ADPCM_SOUND_GROUPS_PER_SECTOR;\n iSndGrp++, i += XaAdpcmDecoder.SIZEOF_SOUND_GROUP)\n {\n // just check if all ADPCM values are 0\n for (int j = 16; j < XaAdpcmDecoder.SIZEOF_SOUND_GROUP; j++) {\n if (getCdSector().readUserDataByte(i+j) != 0)\n return false;\n }\n }\n return true;\n }", "boolean hasUserMessage();", "public boolean isCleanSession() {\n\t\tboolean enabled = true;\n\t\tString value = options.getProperty(\"Clean-Session\");\n\t\tif(value == null) {\n\t\t\tvalue = options.getProperty(\"clean-session\");\n\t\t}\n\t\tif(value != null) {\n\t\t\tenabled = Boolean.parseBoolean(trimedValue(value));\n\t\t} \n\t\treturn enabled;\n\t}", "public boolean isUserActive(String userId) {\n\t\treturn false;\n\t}", "public boolean isMyTurn() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getActivePlayer());\n }", "public boolean isUserAdmin(int userId){\n if (getAdminUserFromId(userId)!=null){\n return true;\n }\n else{\n return false;\n }\n }", "public boolean userType()\n {\n return false;\n }", "public boolean isCurrentChannelUserBlocked() {\n\t\tTVChannel ch = mTvChannelSelector.getCurrentChannel();\n\t\tif (ch != null) {\n\t\t\treturn !ch.isBlocked();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isLockScreenDisabled(int userId) {\n return this.mLockPatternUtils.isLockScreenDisabled(userId);\n }", "public boolean isGroupAdmin(int userId){\n return userId == groupAdmin;\n }", "public boolean isModerator() {\n\t\treturn this.moderator;\n\t}", "public boolean isUserMessage() {\n return (msgType == MessageType.USER_MESSAGE);\n }", "public boolean getUser () {\n return user;\n }", "public boolean mentionsUser(User user) {\n\t\tif (entities != null) {\n\t\t\tfor (int i = 0; i < entities.user_mentions.size(); i++) {\n\t\t\t\tif (entities.user_mentions.get(i).id == user.id) {\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}", "public synchronized boolean isUserCanBeRemoved(UserEntity userEntity) {\n List<PrincipalEntity> adminPrincipals = principalDAO.findByPermissionId(PermissionEntity.AMBARI_ADMINISTRATOR_PERMISSION);\n Set<UserEntity> userEntitysSet = new HashSet<>(userDAO.findUsersByPrincipal(adminPrincipals));\n return (userEntitysSet.contains(userEntity) && userEntitysSet.size() < 2) ? false : true;\n }", "@Override\n public Boolean isGradeManger(UserDTO user) {\n return user.getRoles().contains(RoleTypeEnum.GRADE);\n }", "public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }", "@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}", "public boolean isUserAnswer() {\n return this.userAnswer;\n }", "private boolean isRoleModified(User user) {\n\t\treturn isAdmin != null && !user.getRole().equals(getRole());\n\t}", "boolean hasSelectedUser();", "public static boolean isThisIPMuted(InetAddress IP){\n Iterator<Neighbor> it = mutedNeighbors.iterator();\n while (it.hasNext()) {\n Neighbor peer = it.next();\n if(peer.getIpAddress().equals(IP))\n return true;\n }\n return false;\n }", "boolean isChannelPresenceTaskEnabled();", "boolean isUser(String username);", "boolean hasUserManaged();", "public void isAllowed(String user) {\n \r\n }", "private boolean isLoggedInUser(){\n return true;\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 boolean isUserSettingsOK() {\r\n return (userSettings != null && userSettings.isValid());\r\n }", "public boolean isWinnerMe() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getWinner())\n || (getMyPlayerNumber() == 1 && getPlayerTwoPoints() == 0)\n || (getMyPlayerNumber() == 2 && getPlayerOnePoints() == 0)\n || getMyPlayerNumber() == 1 && getPlayerOnePoints() > getPlayerTwoPoints()\n || getMyPlayerNumber() == 2 && getPlayerOnePoints() < getPlayerTwoPoints();\n }", "public boolean isVtkUser( ) {\n\t\treturn chomboSolverSpec != null;\n\t}", "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 isCurrentUserCanChangeAccountStatus() {\r\n return currentUserCanChangeAccountStatus;\r\n }", "public boolean isCheckedOutByUser() {\r\n \r\n if (vocabularyFolder == null) {\r\n return false;\r\n } else {\r\n return StringUtils.isNotBlank(vocabularyFolder.getWorkingUser()) && !vocabularyFolder.isWorkingCopy()\r\n && StringUtils.equals(getUserName(), vocabularyFolder.getWorkingUser());\r\n }\r\n }", "public boolean isUser(String userName) throws Exception;", "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 }" ]
[ "0.7655979", "0.7221378", "0.69124246", "0.63007873", "0.6124169", "0.6052919", "0.5970687", "0.58669436", "0.5776508", "0.57574224", "0.5711578", "0.56914985", "0.5645711", "0.55993146", "0.5593947", "0.5572939", "0.55568594", "0.5549152", "0.5518256", "0.5516704", "0.5474104", "0.5467362", "0.54414934", "0.5429381", "0.53949755", "0.53652275", "0.5361597", "0.53210115", "0.5316479", "0.53146785", "0.5285884", "0.524979", "0.52406734", "0.52294725", "0.52061343", "0.5197171", "0.5165595", "0.5162414", "0.51267564", "0.5103836", "0.5080948", "0.5063958", "0.5053785", "0.5045611", "0.50375444", "0.5034413", "0.50337553", "0.50337553", "0.50232977", "0.5022877", "0.50202256", "0.50131357", "0.5003462", "0.5003462", "0.5003462", "0.5003462", "0.5003462", "0.5003462", "0.5003462", "0.49992147", "0.49923447", "0.4983717", "0.49668917", "0.4963042", "0.49603295", "0.4951439", "0.49433923", "0.49411678", "0.49335065", "0.4929395", "0.49229178", "0.49223974", "0.49127662", "0.49056768", "0.49006227", "0.48956797", "0.4895674", "0.4894156", "0.4890594", "0.48830417", "0.4878331", "0.48776096", "0.4877592", "0.4866374", "0.48577535", "0.4850044", "0.48415095", "0.48413938", "0.48394343", "0.48309544", "0.48216036", "0.481944", "0.48149067", "0.48042896", "0.48042533", "0.47995034", "0.47994104", "0.4798976", "0.47951114", "0.47839242" ]
0.79022473
0
Updates the time mute for everyone (which is called every 4 seconds)
public void updateMuteTime() { for (Member m : GuildUtils.members()) { final User u = m.getUser(); if (isMuted(u)) { muteUser(u, getTimeLeftForMute(u) - 4); } else { GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(u), Collections.emptySet(), Collections.singleton(Roles.MUTED)).queue(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void muteTimer(){\n\t\t//TODO: impl.\n\t\t/*\n\t\tThread worker;\n\t\t//do it in its own thread\n\t\tworker = new Thread() {\n \tpublic void run() {\n \t\t//mute and wait a bit (2s)\n \t\tmute();\n \t\ttry { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); }\n \t\t//then start checking for ILA actions\n \t\tint counter=100;\t\t//max wait 20s\n \t\twhile( (ILA_interface.avatar.isILAspeaking() || ILA_interface.avatar.is_recording==1) & counter>1 ){\n \t\t\tcounter--;\n \t\t\tILA_debug.println(\"ADDON-KODI - mute timer is waiting...\",2);\t\t\t//debug\n \t\t\ttry { Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); }\n \t\t}\n \t\t//timers are over: unmute\n \t\tunmute();\n \t}\n };\n worker.start();\n */\n\t}", "void mute() {\n execute(\"player.muted = true\");\n }", "public void updateMute() {\n if (game.isMuted()) {\n mute.setIcon(muted);\n } else {\n mute.setIcon(unmuted);\n }\n }", "public void mute() {\n\t\tstate.mute();\n\t}", "public void setMute(boolean mute);", "public static void toggleMute()\n\t{\n\t\tmute = !mute;\n\t\tif (mute)\n\t\t{\n\t\t\t// Stop all sounds\n\t\t\tmusic.stop();\n\t\t\tlaserContinuous.stop();\n\t\t\tlaser.stop();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Start sounds\n\t\t\tstartMusic();\n\t\t\tif (laserRunning)\n\t\t\t{\n\t\t\t\tlaserContinuous.loop();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onSetMute(int result) {\n Log.d(\"DLNA\", \"onSetMute result:\" + result);\n }", "void unmute() {\n execute(\"player.muted = false\");\n }", "protected void enableActionSetMute()\n {\n Action action = new Action(\"SetMute\");\n action.addInputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateSetMute = new DoSetMute();\n enableAction(action, iDelegateSetMute);\n }", "public void mute() {\n\t\tif (isMute) {\n\t\t\tplaybin.setVolume(0);\n\t\t\tisMute = false;\n\t\t} else {\n\t\t\tplaybin.setVolume(volume);\n\t\t\tisMute = true;\n\t\t}\n\t}", "public void muteUser(User user, int seconds) {\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Name\", user.getName());\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Mute\", seconds);\n data.saveFile(bot.getCreditsFile(), \"credits\");\n GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(user), Collections.singleton(Roles.MUTED), Collections.emptySet()).queue();\n }", "public void setMute(boolean mute) {\n \t\tthis.mute = mute;\n \t}", "@Override\r\n\t\tpublic void dmr_setMute(boolean mute) throws RemoteException {\n\t\t\tmAmanager.setStreamMute(AudioManager.STREAM_MUSIC, mute);\r\n\t\t\tUtils.printLog(TAG, \"mAmanager.setStreamMute()\" + mute);\r\n\t\t}", "@Override\n\tpublic void onMute(String clientName) {\n\t\t// TODO Auto-generated method stub\n\t\tlog.log(Level.INFO, \"Tiggered sendMute()\");\n\t\tIterator<User> iter = users.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\t// try {\n\t\t\tString name = clientName;\n\t\t\tUser client = iter.next();\n\t\t\tif (name.equals(client.getName())) {\n\t\t\t\tmuteName = client.getName();\n\t\t\t\tmuteClient = client;\n\t\t\t\tlog.log(Level.INFO, \"Passed name check\");\n\t\t\t}\n\t\t\t// } catch (ConcurrentModificationException e) {\n\t\t\t// log.log(Level.INFO, \"Caught ConcurrentModification\");\n\t\t\t// }\n\t\t}\n\t\treplaceClient(\"<font color=silver>\" + muteName + \"</font>\", muteClient);\n\t\tlog.log(Level.INFO, \"Reached replaceClient with \" + muteName + \" and \" + muteClient.getName());\n\t}", "public boolean getMute();", "protected void enableActionMute()\n {\n Action action = new Action(\"Mute\");\n action.addOutputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateMute = new DoMute();\n enableAction(action, iDelegateMute);\n }", "public void muteUserLocally(boolean muted, String id) {\n for (int uid : usersCallId.keySet()) {\n if (usersCallId.get(uid).equals(id)) {\n mRtcEngine.adjustUserPlaybackSignalVolume(uid, muted ? VOLUME_OFF : STANDARD_VOLUME);\n }\n }\n }", "public int mute(boolean mute) {\n int result = mRtcEngine.muteLocalAudioStream(mute);\n appointment.muteUser(new DatabaseUser(MainUser.getMainUser().getId()), mute);\n\n return result;\n }", "@Test\n\tpublic void muteTest() throws IllegalArgumentException, IllegalAccessException {\n\n\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime &&\n\t\t\t\tConfiguration.mute) {\n\t\t\tstart();\n\t\t\tdemo.menuItemWithPath(\"Datei\", \"Datei \\u00F6ffnen\").click();\n\t\t\tdemo.fileChooser().setCurrentDirectory(new File(\"media/\"));\n\t\t\tFile file = new File(\"note.mp3\");\n\t\t\tdemo.fileChooser().selectFile(file);\n\t\t\tdemo.fileChooser().approveButton().click();\n\t\t\tdemo.button(\"play\").click();\n\t\t\tassertFalse(gui.muted);\n\t\t\tdemo.button(\"mute\").click();\n\t\t\tassertTrue(gui.muted);\n\t\t\tint oldVolume= (int) MemberModifier.field(Application.class, \"oldVolume\").get(gui);\n\t\t\tassertEquals(oldVolume, 100);\n\t\t\t//assertEquals(gui.getVolume(),0);\n\t\t\tJSlider slider= (JSlider) MemberModifier.field(Application.class, \"slider\").get(gui);\n\t\t\tassertFalse(slider.isEnabled());\n\t\t\n\t\t\tJButton btnmute= (JButton) MemberModifier.field(Application.class, \"btnmute\").get(gui);\n\t\t\tassertTrue(btnmute.getIcon().toString().contains(\"mute.png\"));\n\t\t\tdemo.button(\"mute\").click();\n\t\t\tassertFalse(gui.muted);\n\t\t\tassertTrue(slider.isEnabled()); \n\t\t\tassertEquals(gui.getVolume(),100);\n\t\t\tbtnmute= (JButton) MemberModifier.field(Application.class, \"btnmute\").get(gui);\n\t\t\tassertTrue(btnmute.getIcon().toString().contains(\"unmute.png\"));\n\t\t\tdemo.slider(\"slider\").slideToMinimum();\n\t\t\tassertEquals(gui.getVolume(),0);\n\t\t\tdemo.slider(\"slider\").slideToMaximum();\n\t\t\tassertEquals(gui.getVolume(),100);\n\t\t\tdemo.slider(\"slider\").slideTo(50);\n\t\t\tassertEquals(gui.getVolume(),50);\n\t\t\t\n\t\t}\n\t}", "public void mute() {\n this.tv.setVolume(0);\r\n }", "protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }", "public void mo10094d() {\n mo10068a(\"Caching mute images...\");\n Uri a = m2342a(this.f2759a.mo9919ay(), \"mute\");\n if (a != null) {\n this.f2759a.mo9922b(a);\n }\n Uri a2 = m2342a(this.f2759a.mo9920az(), \"unmute\");\n if (a2 != null) {\n this.f2759a.mo9923c(a2);\n }\n StringBuilder sb = new StringBuilder();\n sb.append(\"Ad updated with muteImageFilename = \");\n sb.append(this.f2759a.mo9919ay());\n sb.append(\", unmuteImageFilename = \");\n sb.append(this.f2759a.mo9920az());\n mo10068a(sb.toString());\n }", "private void mute(String[] command) {\n\t\ttry {\n\t\t\tnew ProcessBuilder(Constants.CH_PATH_NIRCMD, \"mutesysvolume\", \"1\")\n\t\t\t\t\t.start();\n\t\t\tSystem.out.println(\"Muting sound.\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void resetPlayerTime ( ) {\n\t\texecute ( handle -> handle.resetPlayerTime ( ) );\n\t}", "public void onLocalAudioMuteClicked(View view) {\n // Change the value of muted\n mMuted = !mMuted;\n // Update the agora engine with the mute\n mRtcEngine.muteLocalAudioStream(mMuted);\n // Get the correct mute button\n int res = mMuted ? R.drawable.btn_mute : R.drawable.btn_unmute;\n // Apply the correct img\n mMuteBtn.setImageResource(res);\n }", "private int getTimeLeftForMute(User u) {\n if (!isMuted(u)) return 0;\n return bot.getCreditsFile().getInt(\"Mutes.\" + u + \".Mute\");\n }", "void setTime(){\n gTime += ((float)millis()/1000 - millisOld)*(gSpeed/4);\n if(gTime >= 4) gTime = 0;\n millisOld = (float)millis()/1000;\n }", "public void onLocalAudioMuteClicked(View view) {\n // Toggle audio mute.\n setAudioState(!mMuted);\n }", "@Override\n public void timeChanged(MediaPlayer mp, long l) {\n }", "@Override\n public void onGetMute(int result, boolean mute) {\n Log.d(\"DLNA\", \"onGetMute result:\" + result);\n }", "public void updateDuration(User user);", "public void setAudioMuteOn(int streamType) {\n mAudioManager.setStreamMute(streamType, true);\n }", "public boolean toggleMute() {\n SoundPlayer.toggleMusicMute();\n SoundPlayer.toggleSoundFxMute();\n muted = !muted;\n return muted;\n }", "public void setCurrentTime(long time) {\n playerTimeTextView.setText(Utils.getTimeFormat4Hsm2(time) );\n playerTimeTextViewAll.setText(Utils.getTimeFormat4Hsm2(mMusicDuration));\n }", "public void setCurrentTime(double time) {\n if (time < 0) {\n time = 0;\n }\n \n nextStartTime = time;\n \n makeNewMusic();\n }", "public abstract void setSecondsPerUpdate(float secs);", "Boolean isMuted() {\n return execute(\"player.muted\");\n }", "@SubscribeEvent\n public void onUpdate(LocalPlayerUpdateEvent event) {\n \tObfuscationReflectionHelper.setPrivateValue(Minecraft.class, MC, 0, \"rightClickDelayTimer\", \"field_71467_ac\");\n }", "@Override\r\n\t\tpublic boolean dmr_getMute() throws RemoteException {\n\t\t\tboolean mute = soundManager.getAudioMuteEnabled();\r\n\t\t\tUtils.printLog(TAG, \"soundManager.getAudioMuteEnabled()\" + mute);\r\n\t\t\treturn mute;\r\n\t\t}", "public boolean setPropertyMute(boolean aValue);", "public void m12820g() {\n this.f10117d.mo1750d(this.f10114a, m12803a(C1478b.UNMUTE));\n }", "public void timeUpdate(int time) {\r\n handler.setTime(time);\r\n }", "void setCurrentTime(long currentTime);", "public static void triggerHushMute(Context context) {\n // We can't call AudioService#silenceRingerModeInternal from here, so this is a partial copy of it\n int silenceRingerSetting = Settings.Secure.getIntForUser(context.getContentResolver(),\n Settings.Secure.VOLUME_HUSH_GESTURE, Settings.Secure.VOLUME_HUSH_OFF,\n UserHandle.USER_CURRENT);\n\n int ringerMode;\n int toastText;\n if (silenceRingerSetting == Settings.Secure.VOLUME_HUSH_VIBRATE) {\n ringerMode = AudioManager.RINGER_MODE_VIBRATE;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_vibrate;\n } else {\n // VOLUME_HUSH_MUTE and VOLUME_HUSH_OFF\n ringerMode = AudioManager.RINGER_MODE_SILENT;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_silent;\n }\n AudioManager audioMan = (AudioManager)\n context.getSystemService(Context.AUDIO_SERVICE);\n audioMan.setRingerModeInternal(ringerMode);\n Toast.makeText(context, toastText, Toast.LENGTH_SHORT).show();\n }", "private void setAudioState(boolean muted) {\n mMuted = muted;\n mRtcEngine.muteLocalAudioStream(mMuted);\n if (mMuted) {\n mMuteBtn.setImageResource(R.drawable.btn_mic_muted);\n } else {\n mMuteBtn.setImageResource(R.drawable.btn_mic_unmuted);\n }\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) \n\t{\n\t\tManager = (AudioManager)(this.getBaseContext().getSystemService(Context.AUDIO_SERVICE));\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main);\n\n\t\ttimeToMute = (TimePicker)findViewById(R.id.MuteTimePicker);\n\t\ttimeToRestore = (TimePicker)findViewById(R.id.RestoreTimePicker);\n\t\t\n\t\tTimePicker muteTime = (TimePicker)findViewById(R.id.MuteTimePicker);\n\t\tTimePicker restoreTime = (TimePicker)findViewById(R.id.RestoreTimePicker);\n\n\t\tSharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\n\t\tint mutehour = settings.getInt(\"MuteHour\", 22);\n\t\tint muteminute = settings.getInt(\"MuteMinute\", 0);\n\t\tint restorehour = settings.getInt(\"RestoreHour\", 8);\n\t\tint restoreminute = settings.getInt(\"RestoreMinute\", 0);\n\n\n\t\t//read from file of what settings to use....\n\t\tmuteTime.setCurrentHour(mutehour);\n\t\trestoreTime.setCurrentHour(restorehour);\n\t\tmuteTime.setCurrentMinute(muteminute);\n\t\trestoreTime.setCurrentMinute(restoreminute);\n\n\t\tmuteTime.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() {\n\n\t\t\tpublic void onTimeChanged(TimePicker view, int hourOfDay, int minute) {\n\t\t\t\tUpdateTimers();\n\t\t\t}\n\t\t});\n\t\trestoreTime.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() {\n\n\t\t\tpublic void onTimeChanged(TimePicker view, int hourOfDay, int minute) {\n\t\t\t\tUpdateTimers();\n\t\t\t}\n\t\t});\n\t\tUpdateTimers();\n\n\n\n\n\t\t/*\n timer = new CountDownTimer(10000, 10000) {\n\n \t public void onTick(long millisUntilFinished) {\n \t int i=0;\n \t i++;\n \t i--;\n \t }\n\n \t public void onFinish() {\n \t \t if(restore)\n \t \t {\n \t \tManager.setStreamVolume(AudioManager.STREAM_NOTIFICATION, NotificationVolume, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE|AudioManager.FLAG_SHOW_UI);\n \t \t\tManager.setStreamVolume(AudioManager.STREAM_RING, RingVolume, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE|AudioManager.FLAG_SHOW_UI);\n \t \t\tManager.setStreamVolume(AudioManager.STREAM_SYSTEM, SystemVolume, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE|AudioManager.FLAG_SHOW_UI);\n \t \t\trestore = false;\n \t \t\tthis.start();\n \t \t }\n \t \t else\n \t \t {\n \t \t\tSystemVolume = Manager.getStreamVolume(AudioManager.STREAM_SYSTEM);\n \t \t\tRingVolume = Manager.getStreamVolume(AudioManager.STREAM_RING);\n \t \t\tNotificationVolume = Manager.getStreamVolume(AudioManager.STREAM_NOTIFICATION);\n \t \t\tManager.setStreamVolume(AudioManager.STREAM_NOTIFICATION|AudioManager.STREAM_RING|AudioManager.STREAM_SYSTEM, 0, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE|AudioManager.FLAG_SHOW_UI);\n \t \t\trestore = true; \n \t \t\tthis.start();\n \t \t }\n \t }\n \t }.start();\n\t\t */\n\t\t/* \n try {\n\n // setup and start MyService\n {\n s = new MyService();\n s.SetVolumeAdjuster(this);\n Intent svc = new Intent(this, MyService.class);\n //svc.setComponent(\"MyService\");\n ComponentName test = startService(svc);\n Class<MyService> c = svc.getClass();\n Method[] a = c.getMethods();\n int a=0;\n a++;\n }\n\n }\n catch (Exception e) {\n int l=0;\n l++;\n }\n\t\t */\n\n\t}", "public void update() {\n\t\tMusicTicker.MusicType var1 = this.mc.getAmbientMusicType();\n\t\t\n\t\tif (this.currentMusic != null) {\n\t\t\tif (!var1.getMusicLocation().equals(this.currentMusic.getSoundLocation())) {\n\t\t\t\tthis.mc.getSoundHandler().stopSound(this.currentMusic);\n\t\t\t\tthis.timeUntilNextMusic = MathHelper.getRandomIntegerInRange(this.rand, 0, var1.getMinDelay() / 2);\n\t\t\t}\n\t\t\t\n\t\t\tif (!this.mc.getSoundHandler().isSoundPlaying(this.currentMusic)) {\n\t\t\t\tthis.currentMusic = null;\n\t\t\t\tthis.timeUntilNextMusic = Math.min(MathHelper.getRandomIntegerInRange(this.rand, var1.getMinDelay(), var1.getMaxDelay()), this.timeUntilNextMusic);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.currentMusic == null && this.timeUntilNextMusic-- <= 0) {\n\t\t\tthis.currentMusic = PositionedSoundRecord.createPositionedSoundRecord(var1.getMusicLocation());\n\t\t\tthis.mc.getSoundHandler().playSound(this.currentMusic);\n\t\t\tthis.timeUntilNextMusic = Integer.MAX_VALUE;\n\t\t}\n\t}", "@EventHandler(priority = EventPriority.HIGH)\n\tpublic void onPlayerChat(AsyncPlayerChatEvent e) {\n\t\tif (e.isCancelled()) return;\n\t\t\n\t\tPlayer player = e.getPlayer();\n\t\tString uuid = player.getUniqueId().toString();\n\t\t\n\t\t// stop the method here if the player is muted\n\t\tif (!Banana.getMuteCache().isMuted(uuid)) return;\n\t\t\n\t\tif (!Banana.getMuteCache().isTempMuted(uuid)) {\n\t\t\t\n\t\t\t// if the player is muted, stop the event and don't run any checks\n\t\t\te.setCancelled(true);\n\t\t\t\n\t\t\t// checking to make sure the config allows the notification to muted players\n\t\t\tif (Values.MUTE_NOTIFY_ON_CHAT) {\n\t\t\t\t// tell the player that they are muted\n\t\t\t\tplayer.sendMessage(Lang.NO_SPEAK_MUTED.toString());\n\t\t\t}\n\t\t\treturn;\n\t\t\t\n\t\t}\n\t\t\n\t\t// this will continue to run if the player is temp muted\n\t\t\n\t\tCalendar currentDate = Calendar.getInstance();\n\t\t\n\t\tcurrentDate.setTimeInMillis(System.currentTimeMillis());\n\t\t\n\t\tDate systemDate = currentDate.getTime();\n\t\tDate unMuteDate = Banana.getMuteCache().getTempMuteRemovalDate(uuid);\n\t\t\n\t\tif (systemDate.equals(unMuteDate) || systemDate.after(unMuteDate)) {\n\t\t\t\n\t\t\t// check to see if this option is enabled in the config\n\t\t\t\n\t\t\tif (Values.NOTIFY_UNMUTE) {\n\t\t\t\t// this will run if the player will be allowed to chat because their mute time is up\n\t\t\t\tAction.notifyPlayer(Action.UNMUTE, player, Lang.MUTE_TIME_EXPIRED.toString());\n\t\t\t}\n\t\t\t\n\t\t\t// remove the mutes in the database and cache\n\t\t\tBanana.getDatabaseManager().asyncRemoveMute(uuid);\n\t\t\tBanana.getMuteCache().unMutePlayer(uuid);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// cancel the event because the player is still muted!\n\t\t\te.setCancelled(true);\n\t\t\t\n\t\t\t// check to see if this option is enabled\n\t\t\tif (Values.MUTE_NOTIFY_ON_CHAT) {\n\t\t\t\n\t\t\t\t// tell the player that they are muted\n\t\t\t\tplayer.sendMessage(Lang.NO_SPEAK_MUTED.toString());\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void update() {\n\t\tfor(String key : actives.keys()) {\n\t\t\tActiveSound snd = actives.get(key);\n\t\t\tsnd.lifespan++;\n\t\t\tif (snd.lifespan > timeLimit) {\n\t\t\t\tcollection.add(key);\n\t\t\t\tsnd.sound.setLooping(snd.id,false); // Will eventually garbage collect\n\t\t\t\tsnd.sound.setVolume(snd.id, 0.0f); \n\t\t\t}\n\t\t}\n\t\tfor(String key : collection) {\n\t\t\tactives.remove(key);\n\t\t}\n\t\tcollection.clear();\n\t\tcurrent = 0;\n\t}", "@Override\n public void onClick(View v) {\n Log.d(TAG, \"Set LCD mute ON. (display OFF)\");\n mDisplayControl.setMute(true);\n try{\n Thread.sleep(3000); //3000É~ÉäïbSleepÇ∑ÇÈ\n }catch(InterruptedException e){}\n\n Log.d(TAG, \"Set LCD mute OFF. (display ON)\");\n mDisplayControl.setMute(false);\n }", "private void renewTimes() {\n String time_morgens_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n String time_mittags_new = time_prefs.getString(\"time_mittags\", getResources().getString(R.string.default_mittags));\n String time_abends_new = time_prefs.getString(\"time_abends\", getResources().getString(R.string.default_abends));\n String time_zur_nacht_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n /*comparison of class local time variblaes with new Preferences\n deletes alarms affected medicines and creates new alarms for them\n */\n\n if (!time_morgens.equals(time_morgens_new)) {\n //list all affected Meds and iterate for each\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n\n if (!time_mittags.equals(time_mittags_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Mittags\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_abends.equals(time_abends_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Abends\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_zur_nacht.equals(time_zur_nacht_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n }", "public void setMuted(boolean b)\n\t{\n\t\tm_isMuted = b;\n\t}", "public boolean isMuted(User u) {\n return bot\n .getCreditsFile()\n .getInt(\"Mutes.\" + u + \".Mute\") > 0;\n }", "public void updateTime(int time)\n\t{\n\t\tshotsRemaining = rateOfFire;\n\t}", "public void testMixer_MuteMany() throws InterruptedException { \n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1);\n mixer.getInput(1).set(1);\n mixer.getInput(2).set(1);\n \n mixer.setMute(0, false);\n mixer.setMute(1, true);\n mixer.setMute(2, true);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 1.0, mixer.getOutput().get(), tolerance);\n\n mixer.getInput(0).set(0.2);\n mixer.getInput(1).set(0.7);\n mixer.getInput(2).set(0.9);\n\n mixer.setMute(0, true);\n mixer.setMute(1, false);\n mixer.setMute(2, true);\n \n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.7, mixer.getOutput().get(), tolerance);\n }", "public void m12819f() {\n this.f10117d.mo1750d(this.f10114a, m12803a(C1478b.MUTE));\n }", "public void enablePropertyMute()\n {\n iPropertyMute = new PropertyBool(new ParameterBool(\"Mute\"));\n addProperty(iPropertyMute);\n }", "public void setTime()\n \t{\n \t\tif( !paused )\n \t\t{\n\t \t\tlong playingTime = System.currentTimeMillis() - startTime;\n\t \t\tlong timeLeft = 180000 - playingTime;\n\t \t\tlong min = timeLeft / 60000;\n\t \t\tlong sec = ( timeLeft - ( min * 60000 ) ) / 1000L;\n\t \t\t\n\t \t\tif( timeLeft < 0 )\n\t \t\t{\n\t \t\t\t//Game over!\n\t \t\t\tgameOver();\n\t \t\t\treturn;\n\t \t\t}\n\t \t\t\n\t \t\tString s = \"Time: \";\n\t \t\ts += Integer.toString( (int)min ) + \":\";\n\t \t\tif( sec >= 10 )\n\t \t\t\ts += Integer.toString( (int)sec );\n\t \t\telse\n\t \t\t\ts += \"0\" + Integer.toString( (int)sec );\n\t \t\t\n\t \t\ttimerLabel.setText( s );\n \t\t}\n \t}", "@Override\n public void videoStarted() {\n super.videoStarted();\n img_playback.setImageResource(R.drawable.ic_pause);\n if (isMuted) {\n muteVideo();\n img_vol.setImageResource(R.drawable.ic_mute);\n } else {\n unmuteVideo();\n img_vol.setImageResource(R.drawable.ic_unmute);\n }\n }", "static int bukkitToneAmount() { return 25; }", "@Command\n\t@NotifyChange(\"currentTime\")\n\tpublic void updateTime() {\n\t}", "public void start(){\n\t\tif (host.getGameSettings().isMusicOn()) {\r\n\t\t\tspr_btnMute.setFrame(0);\r\n\t\t}else{\r\n\t\t\tspr_btnMute.setFrame(1);\r\n\t\t}\r\n\t}", "public void SetEatenTime(double time) {\n\t\tEatenTime = time ;\n\t}", "public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }", "public boolean getPropertyMute();", "void setTime(final int time);", "public static void update() \r\n {\r\n lastTime = currentTime; \r\n currentTime = getTime(); \r\n }", "public void setTime(){\r\n \r\n }", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "public abstract void updateWhatsOn();", "public void setPlayerTime ( long time , boolean relative ) {\n\t\texecute ( handle -> handle.setPlayerTime ( time , relative ) );\n\t}", "public void updateTime() {\n\t\tthis.currentTime = System.currentTimeMillis();\n\t}", "void updateNextUnblockTime(int t);", "void currentTime(double timeInSeconds) {\n execute(\"player.currentTime = \" + timeInSeconds);\n }", "public void m6656s() {\n if (Build.VERSION.SDK_INT >= 26 && this.f5405Y.getRingerMode() != 0) {\n this.f5432na.vibrate(VibrationEffect.createOneShot(12, 75));\n }\n }", "public void updateLastAttackTime(long nowTime) {\r\n\t\tthis.lastAttackTime = nowTime;\r\n\t}", "private void matikanAlarm() {\n\t\t\n\t\tif (mediaplayer.isPlaying() == true) {\n\t\t\t//matikan media player\n\t\t\tmediaplayer.pause();\n\t\t}\n\t\telse {\n\t\t\t//tidak melakukan apa apa\n\t\t}\t\t\t\t\n\t}", "public void mutate() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutate = rand.nextInt(4);\n\t\t\twhile (mutate == 0) {\n\t\t\t\tmutateHelper();\n\t\t\t\tmutate = rand.nextInt(4);\n\t\t\t}\n\t\t}\n\t}", "private void resetCooldown() {\n nextAttack = tower.getFireFrequency();\n }", "public void testMixer_MuteAll() throws InterruptedException {\n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1);\n mixer.getInput(1).set(1);\n mixer.getInput(2).set(1);\n \n mixer.setMute(0, true);\n mixer.setMute(1, true);\n mixer.setMute(2, true);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.0, mixer.getOutput().get(), tolerance);\n\t\t\n mixer.getInput(0).set(0.2);\n mixer.getInput(1).set(0.7);\n mixer.getInput(2).set(0.9);\n\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.0, mixer.getOutput().get(), tolerance);\n\t\t\n }", "@Override\n public void onLocalAudioStats(LocalAudioStats stats) {\n if (timeCodeIndicator % TIME_CODE_FREQUENCY == 0) {\n appointment.setTimeCode(new DatabaseUser(MainUser.getMainUser().getId()), System.currentTimeMillis());\n }\n timeCodeIndicator += 1;\n }", "public void newTurnPauseCountdown()\n {\n pauseNewTurn = true;\n pauseNewTurnTimer = 169;\n }", "public void actualizarMusicaInfo() {\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n int currentDuration;\n //currentDuration = MediaPlayerController.getCurrentDuration();\n currentDuration = mediaPlayerService.getCurrentDuration();\n updateSeekBar(currentDuration);\n handler.postDelayed(this, 1000);\n }\n }, 0); // si delay 0 para arrancar\n }", "public void ReplayCurrentLevel(){\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"TimeoutSound\");\n }\n musicName = \"TimeoutSound\";\n JOptionPane.showMessageDialog(null, \"Oops! Time out. Please replay current level.\", \"Timeout\", JOptionPane.INFORMATION_MESSAGE);\n newGameStart(level);\n }", "private void handleMute(Call c)\n {\n // handle only established call\n if(c.getCallState() != CallState.CALL_IN_PROGRESS)\n return;\n\n // handle only connected peer (no on hold peer)\n if(c.getCallPeers().next().getState() != CallPeerState.CONNECTED)\n return;\n\n MediaAwareCall<?,?,?> cc = (MediaAwareCall<?,?,?>)c;\n if(mute != cc.isMute())\n {\n cc.setMute(mute);\n }\n }", "public void updatePatience(){\n Patience = Patience - 1;\n }", "private void UpdateTimeSong()\n {\n final Handler handler= new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n SimpleDateFormat dinhdanggio= new SimpleDateFormat(\"mm:ss\");\n txtTimeSong.setText(dinhdanggio.format(mediaPlayer.getCurrentPosition()));\n skSong.setProgress(mediaPlayer.getCurrentPosition());\n handler.postDelayed(this,500);\n }\n },100);\n }", "public void setTime(){\n Date currentDate = new Date();\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putLong(\"WAIT_TIME\", currentDate.getTime() + 1800000); //30 min\n editor.commit();\n }", "public boolean isMuted()\n\t{\n\t\treturn m_isMuted;\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n int timeToSet = (hourOfDay * 1000 + (minute * 1000)/60 + 18000) % 24000;\n prompt.sendCommand(CommandSet.getCommand(CommandSet.TIME) + \"set \"+timeToSet, new ResponseToastGenerator(getActivity(), \n new CommandResponseEvaluator(EvaluatorType.time),\n R.string.time_set_ok, R.string.time_set_failed));\n }", "public void timeUpdate(AudioHandler handler, long time) {\r\n slrTime.setValue((int) time);\r\n lblTime.setText(Utility.formatTime(time, false) + \" / \" + Utility.formatTime(handler.getDuration(), false));\r\n if (panGlassPane.isVisible()) panGlassPane.repaint();\r\n }", "void onUserAttentionGone() {\n if (isPlaying()) { //If video is playing pause it.\n mPauseTime = getCurrentPosition(); //mPauseTime is an int\n super.pause();\n }\n }", "public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n if (!muted) {\n System.out.println(\"sleep\\t|\\tzzzZZZ *sheep*\");\n }\n }", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "private void setTime(long value) {\n bitField0_ |= 0x00000002;\n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "@Override\r\n\tpublic void showDoTimeMessage(Player player) {\n\t}", "public void setMute(boolean mute) throws IllegalStateException,\n\t\t\tRemoteException {\n\t\tgetService().setMute(mute, mVolume, mIsMute);\n\t}" ]
[ "0.7334468", "0.70764685", "0.6647209", "0.64725274", "0.62100255", "0.61750084", "0.6165773", "0.6154372", "0.6067745", "0.6062168", "0.60544276", "0.60175556", "0.59751755", "0.59353346", "0.58927155", "0.5889862", "0.58726764", "0.58260256", "0.5801954", "0.57919747", "0.5749437", "0.5742457", "0.57267785", "0.5715482", "0.5696098", "0.5634387", "0.5579364", "0.55214727", "0.5492475", "0.5464858", "0.5463765", "0.5459679", "0.5456762", "0.54544926", "0.5452764", "0.5440047", "0.5414483", "0.54062957", "0.53887564", "0.5384868", "0.5383088", "0.5370989", "0.5347744", "0.53374577", "0.53287345", "0.531812", "0.53108805", "0.5307921", "0.52990377", "0.52958333", "0.52909684", "0.5288721", "0.52871555", "0.52759326", "0.5273325", "0.52701783", "0.52627116", "0.5245107", "0.52380604", "0.5233064", "0.52307695", "0.52203053", "0.5217467", "0.51933473", "0.51799", "0.51775455", "0.5173803", "0.5153105", "0.51510286", "0.5144529", "0.5136239", "0.5120607", "0.51197004", "0.51146483", "0.51117736", "0.51049346", "0.51032877", "0.5098658", "0.5097549", "0.5093546", "0.50867516", "0.50846666", "0.5081763", "0.5078451", "0.507433", "0.5069172", "0.506875", "0.50625104", "0.50582844", "0.5053159", "0.5052045", "0.5051726", "0.5050378", "0.5047839", "0.5046242", "0.5039092", "0.5039092", "0.5039092", "0.5036205", "0.50304323" ]
0.83057153
0
Name: SyncFirebaseToCalendar Description: Main method for handling syncing between Firebase and Calendar
public SyncFirebaseToCalendar (GoogleAccountCredential credential, Context context) { System.err.println("SYNCING FIREBASE TO CALENDAR"); final String[] SCOPES = {CalendarScopes.CALENDAR}; mContext = context; mActivity = (Activity) context; HttpTransport transport = AndroidHttp.newCompatibleTransport(); JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); mCredential = GoogleAccountCredential.usingOAuth2( context.getApplicationContext(), Arrays.asList(SCOPES)) .setBackOff(new ExponentialBackOff()); mService = new com.google.api.services.calendar.Calendar.Builder( transport, jsonFactory, credential) .setApplicationName("Quick Calendar") .build(); android_id = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); //Device ID mAuth = FirebaseAuth.getInstance(); mAuthListener = new FirebaseAuth.AuthStateListener() { @Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { FirebaseUser user = firebaseAuth.getCurrentUser(); if (user != null) { // User is signed in Log.d(TAG, "onAuthStateChanged:signed_in:" + user.getUid()); } else { // User is signed out Log.d(TAG, "onAuthStateChanged:signed_out"); } } }; db = FirebaseDatabase.getInstance().getReference(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pullData() {\n // Listener for changes in the database\n ValueEventListener postListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.d(TAG, \"Preparing to update the Calendar\");\n\n Object o = dataSnapshot.child(TAG).getValue();\n\n if (o == null)\n return;\n\n // We don't know what type object will be\n List <Map<String, Object>> list = new ArrayList<>();\n\n if (o.getClass().isInstance(list))\n list = (List<Map<String, Object>>) o;\n\n for (int i = 0; i < list.size(); i++) {\n Map<String, Object> map = list.get(i);\n\n // Get name of the list from the map\n String date;\n if (map.get(\"date\") == null)\n ; // Purposely empty because\n // We don't want to add a ToDoList\n // with a null name.\n else {// Otherwise, we translate the map data to create an event list\n date = (String) map.get(\"date\");\n\n // Get List of bools from the map\n List<Object> event = new ArrayList<>();\n if (map.get(\"eventList\") != null) {\n event = (List<Object>) map.get(\"eventList\");\n\n EventList eventList = new EventList(date);\n\n for (int j = 0; j < event.size(); j++) {\n Map<String, Object> eventMap = (Map<String, Object>) event.get(j);\n\n String end;\n String start;\n String eventName;\n\n if (eventMap.get(\"end\") != null) {\n end = (String) eventMap.get(\"end\");\n }\n else\n end = \"\";\n if (eventMap.get(\"start\") != null) {\n start = (String) eventMap.get(\"start\");\n }\n else\n start = \"\";\n if (eventMap.get(\"eventName\") != null) {\n eventName = (String) eventMap.get(\"eventName\");\n }\n else\n eventName = \"\";\n\n eventList.add(new Event(eventName, start, end));\n }\n\n events.add(eventList);\n }\n }\n }\n\n Log.d(TAG, \"Calendar has been updated\");\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n // Getting Post failed, log a message\n Log.w(TAG, \"onCancelled\", databaseError.toException());\n }\n };\n\n // Add the database listeners (I hope this works here *fingers crossed*)\n databaseRef.addListenerForSingleValueEvent(postListener);\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.i(\"*********\", \"Here the adapter be created and set\");\n //CalendarAdapter adapter = new CalendarAdapter(getApplicationContext(), drawMonth2(), workingDays, holidays, requestedHolidays, generalCalendar);\n //calendarGrid.setAdapter(adapter);\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//problably will need to add to workingDays the dates read from the database\n\n }", "public void scheduleRecurringContactsSync() {\n Driver driver = new GooglePlayDriver(mContext);\n FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(driver);\n\n // Create the Job to periodically sync Sunshine\n Job syncContactsJob = dispatcher.newJobBuilder()\n /* The Service that will be used to sync contacts's data */\n .setService(FirebaseContanctsSyncJobService.class)\n .setTag(CONTACTS_SYNC_TAG)\n .setConstraints(Constraint.ON_ANY_NETWORK)\n .setLifetime(Lifetime.FOREVER)\n .setRecurring(true)\n .setTrigger(Trigger.executionWindow(\n SYNC_INTERVAL_SECONDS,\n SYNC_INTERVAL_SECONDS + SYNC_FLEXTIME_SECONDS))\n .setReplaceCurrent(true)\n .build();\n\n // Schedule the Job with the dispatcher\n dispatcher.schedule(syncContactsJob);\n Log.d(LOG_TAG, \"Contacts sync job scheduled\");\n }", "@Override\n\t\t\tpublic void syncDateChange(Map<String, Set<DbxRecord>> mMap) {\n\t\t\t\tToast.makeText(this, \"Dropbox sync successed\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tif (attachFragment != null ) {\n\t\t\t\t\t OnSyncFinishedListener onSyncFinishedListener = (OnSyncFinishedListener)attachFragment;\n\t\t\t\t\t onSyncFinishedListener.onSyncFinished();\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "private void setUpCalRecyclerView() {\n dates = new ArrayList<>();\n\n\n Query query = calTaskRef.whereEqualTo(\"m_Privacy\", \"Private\");\n\n tasks = new FirestoreRecyclerOptions.Builder<Task>()\n .setQuery(query, Task.class)\n .build();\n\n db.collection(\"Task\").whereEqualTo(\"m_Privacy\", \"Private\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull com.google.android.gms.tasks.Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult() != null) {\n List<Task> tasks = task.getResult().toObjects(Task.class);\n for (Task dbDate : tasks) {\n //Get date from firebase\n //Set date to CalendarDay\n dates.add(CalendarDay.from(dbDate.getM_DueDate().getTime()));\n calendarView.addDecorator(new DayViewDecorator() {\n @Override\n public boolean shouldDecorate(CalendarDay day) {\n return dates.contains(day);\n }\n @Override\n public void decorate(DayViewFacade view) {\n view.setBackgroundDrawable(ContextCompat.getDrawable(getContext(),R.drawable.logo));\n }\n });\n }\n }\n }else {\n Toast.makeText(getActivity(), \"Error getting documents.\" + task.getException(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n protected String doInBackground(Void... params) {\n credential = GoogleAccountCredential.usingOAuth2(activity,\n Collections.singleton(CalendarScopes.CALENDAR));\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(activity);\n Log.d(tag, \"Google account name: \" + sharedPref.getString(activity.getString(R.string.pref_key_google_account_name),\n null));\n credential.setSelectedAccountName(sharedPref.getString(activity.getString(R.string.pref_key_google_account_name),\n null));\n\n /* Getting Google Calendar client */\n com.google.api.services.calendar.Calendar client =\n new com.google.api.services.calendar.Calendar.Builder(transport, jsonFactory,\n credential).setApplicationName(activity.getString(R.string.app_name)).build();\n\n /* Asking user for choosing Google account */\n if (credential.getSelectedAccountName() == null) {\n activity.startActivityForResult(credential.newChooseAccountIntent(),\n ACCOUNT_REQUEST_CODE);\n retry = true;\n return null;\n }\n\n /* Asking user for permission if needed */\n try {\n Log.d(tag, \"Token: \" + GoogleAuthUtil.getToken(activity.getApplicationContext(),\n credential.getSelectedAccount(), credential.getScope()));\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (UserRecoverableAuthException e) {\n Log.d(tag, \"Need permission\");\n activity.startActivityForResult(e.getIntent(),PERMISSION_REQUEST_CODE);\n retry = true;\n return null;\n } catch (GoogleAuthException e) {\n e.printStackTrace();\n return null;\n }\n Log.d(tag, \"Permission OK\");\n\n Event event = new Event()\n .setSummary(meeting.name)\n .setLocation(meeting.location)\n .setDescription(meeting.notes);\n\n /* Parsing the meeting date */\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MM/dd/yyyy-HH:mm\", Locale.ENGLISH);\n DateTime startDateTime;\n try {\n startDateTime = new DateTime(dateFormatter.parse(meeting.date\n + \"-\" + meeting.time).getTime());\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n Log.d(tag, \"Parsing meeting date OK\");\n\n EventDateTime start = new EventDateTime()\n .setDateTime(startDateTime);\n event.setStart(start);\n\n EventDateTime end = new EventDateTime()\n .setDateTime(startDateTime);\n event.setEnd(end);\n\n /* Setting attendees list */\n ArrayList<Integer> ids = attendToRepo.getAttendeeIDs(meeting.meeting_ID);\n ArrayList<EventAttendee> attendees = new ArrayList<>();\n for (int id : ids){\n Attendee attendee = attendeeRepo.getAttendeeById(id);\n EventAttendee eventAttendee = new EventAttendee();\n eventAttendee.setDisplayName(attendee.name);\n\n /* Email is mandatory for the API request */\n eventAttendee.setEmail(attendee.name + activity.getString(R.string.google_calendar_email_example));\n attendees.add(eventAttendee);\n Log.d(tag, \"GoogleCalendarTask \" + attendee.name + \" added to attendees\");\n }\n event.setAttendees(attendees);\n\n EventReminder[] reminderOverrides = new EventReminder[] {\n new EventReminder().setMethod(\"popup\").setMinutes(10),\n };\n Event.Reminders reminders = new Event.Reminders()\n .setUseDefault(false)\n .setOverrides(Arrays.asList(reminderOverrides));\n event.setReminders(reminders);\n\n String calendarId = \"primary\";\n try {\n event = client.events().insert(calendarId, event).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Log.d(tag, \"Event created link: \" + event.getHtmlLink());\n\n return event.getHtmlLink();\n }", "@SuppressWarnings(\"deprecation\")\r\n\tprivate void createCalendarEntry(){\r\n\t\t\r\n\t\tUri calendars = Uri.parse(CALENDAR_URI);\r\n\t\t \r\n\t\tCursor managedCursor = managedQuery(calendars, projection, null, null, null);\r\n\t\tString calName = \"\"; \r\n\t\tString calId = \"\"; \r\n\t\tif (managedCursor.moveToFirst()) {\r\n\t\t\t \r\n\t\t\t int idColumn = managedCursor.getColumnIndex(projection[0]);\r\n\t\t\t int nameColumn = managedCursor.getColumnIndex(projection[1]); \r\n\t\t\t \r\n\t\t\t do {\r\n\t\t\t calName = managedCursor.getString(nameColumn);\r\n\t\t\t calId = managedCursor.getString(idColumn);\r\n\t\t\t if (calName.contains(\"gmail\"))\r\n\t\t\t \tbreak;\r\n\t\t\t } while (managedCursor.moveToNext());\r\n\t }\r\n\t\t\r\n\t\tlong start = System.currentTimeMillis() + 120000;\r\n\t\tlong duration = DURATION + start;\r\n\t\t\r\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(DATE_START, start);\r\n\t\tvalues.put(DATE_END, duration);\r\n\t\tvalues.put(EVENT_TITLE, ocrData.getMedicine().getMedicine());\r\n\t\tvalues.put(EVENT_DESCRIPTION, \"Take \" + ocrData.getPatient2Medicine().getFrequencyOfIntake() \r\n\t\t\t\t+ \" by \" + ocrData.getPatient2Medicine().getMode());\r\n\t\tvalues.put(CALENDAR_ID, calId);\r\n\t\tvalues.put(EVENT_RULE, \"FREQ=\" + ocrData.getPatient2Medicine().getFrequencyOfIntake() + \";\");\r\n\t\tvalues.put(HAS_ALARM, 1);\r\n\t\t\r\n\t\tContentResolver cr = getContentResolver();\r\n\t\tUri event = cr.insert(Uri.parse(EVENT_URI), values);\r\n\t\t\r\n\t\tvalues = new ContentValues();\r\n\t\tvalues.put(\"event_id\", Long.parseLong(event.getLastPathSegment()));\r\n\t\tvalues.put(\"method\", 1);\r\n\t\tvalues.put(\"minutes\", 10 );\r\n\t\tcr.insert(Uri.parse(REMINDER_URI), values);\r\n\t}", "private void onAddToCalendarSuccess() {\r\n database.eventDao().update(event);\r\n updateSpeedDialActionItems();\r\n showToast(getString(R.string.event_calendar_add_event_sucess), Toast.LENGTH_LONG);\r\n }", "private void Register(String mailSTR, String passwordSTR, String fNameSTR, String lNameSTR, String citySTR, String phoneNumberSTR) throws Exception {\n mAuth.createUserWithEmailAndPassword(mailSTR, passwordSTR)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n final Map<String, Object>[] dataToSave = new Map[]{new HashMap<String, Object>()};\n dataToSave[0].put(constants.FIRST_NAME, fNameSTR);\n dataToSave[0].put(constants.SEC_NAME, lNameSTR);\n dataToSave[0].put(constants.CITY, citySTR);\n dataToSave[0].put(constants.EMAIL, mailSTR);\n dataToSave[0].put(constants.PHONE, phoneNumberSTR);\n\n\n\n FirebaseDatabase.getInstance().getReference(constants.DOC_REF_USERS)\n //here we creating users folder in real time data baes , getting uid from user and storing the data in folder named by id\n .child(Objects.requireNonNull(FirebaseAuth.getInstance().getCurrentUser()).getUid())\n .setValue(dataToSave[0]).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(register3.this,\n R.string.register_toast_success, Toast.LENGTH_LONG).show();\n {//adds all new data for newely registered clients\n dayTime dtDEF = new dayTime(0, 0, 23, 59);//default for first time\n Gson gson = new Gson();\n SharedPreferences sp = getSharedPreferences(constants.SHARED_PREFS,\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n String dayDEF = gson.toJson(dtDEF);\n Map<String, String> docData = new HashMap<>();\n for (String day : constants.daysNames) {\n docData.put(day, dayDEF);\n editor.putString(day, dayDEF);\n }\n docData.put(constants.rangeChoice, \"\" + 10.0);\n editor.putFloat(constants.rangeChoice, (float) 10.0);\n\n docData.put(constants.SHARED_PREFS_LOCATION, constants.CITY);\n editor.putString(constants.SHARED_PREFS_LOCATION, constants.CITY);\n editor.putBoolean(\"sync\",true);\n FirebaseAuth userIdentifier = FirebaseAuth.getInstance();\n String UID = userIdentifier.getCurrentUser().getUid();\n DocumentReference DRF = FirebaseFirestore.getInstance()\n .document(constants.DOC_REF_USERS+\"/\" + UID);\n final boolean[] success = {true};\n final Exception[] failToRet = new Exception[1];\n DRF.set(docData).addOnFailureListener(e -> {\n success[0] = false;\n failToRet[0] = e;\n });\n if (!success[0]) {\n // show/make log for case of failure\n }\n editor.apply();\n\n }\n }\n });\n\n\n }\n\n }).addOnFailureListener(e -> {\n try {\n throw new Exception(constants.FAILED_REGISTER);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n\n\n }", "private void setupFirebaseAuth(){\r\n Log.d(TAG, \"setupFirebaseAuth: setting up setupFirebaseAuth\");\r\n\r\n mAuth = FirebaseAuth.getInstance();\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n myRef = mFirebaseDatabase.getReference();\r\n\r\n mAuthListener = new FirebaseAuth.AuthStateListener() {\r\n @Override\r\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\r\n FirebaseUser user = firebaseAuth.getCurrentUser();\r\n\r\n if (user != null) {\r\n // User is signed in\r\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\r\n } else {\r\n // User is signed out\r\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\r\n }\r\n // ...\r\n }\r\n };\r\n\r\n myRef.addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n\r\n // retrieve user info from database\r\n// setProfileWidgets(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n\r\n // retrieve job Post info from database\r\n// setJobPost(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n// mFirebaseMethods.addNewJobPost(job_date,job_description, job_title,user_name );\r\n\r\n //retrieve bids from database\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n }", "private void upToFireBase(Bill _bill)\n {\n Log.d(\"RECORD\", \"Up to firebase\"+_fbfs);\n String _number_room = _bill.getRoom().getPhase()+String.valueOf(_bill.getRoom().getFloor())+_bill.getRoom().getNumber_room();\n _fbfs.collection(\"Resident\")\n .document(\"USER\")\n .collection(_number_room)\n .document(_bill.getMonth()+_bill.getYear())\n .set(_bill)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(\"RECORD\", \"SUCCESS\");\n PHASE_CHOOSE = _room.getPhase();\n FLOOR_CHOOSE = String.valueOf(_room.getFloor());\n goToNextPage();\n Toast.makeText(getActivity(), \"Success\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"RECORD\", \"FAILED\");\n Toast.makeText(getActivity(), \"Not found\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n @Transactional(value = \"transactionManager\")\n public void update(Calendar calendar, boolean neo4jSynchronize) {\n Calendar currentInDb = get(calendar.getId());\n if(currentInDb.getCalendarDates() != null) {\n for(CalendarDate calendarDate : currentInDb.getCalendarDates()) {\n calendarDateService.delete(calendarDate.getId());\n }\n }\n\n //pak provedu update calendar zaznamu\n dao.update(calendar);\n\n //a nakonec ulozim vsechny calendarDates znovu\n if(calendar.getCalendarDates() != null) {\n for(CalendarDate calendarDate : calendar.getCalendarDates()) {\n calendarDate.setId(null);\n calendarDateService.create(calendarDate);\n }\n }\n\n if(neo4jSynchronize) {\n //update take v neo4j!\n //smazu vsechny calendarDateNodes k tomuto calendar z neo4j\n calendarDateNodeService.deleteByCalendarId(calendar.getId());\n\n //vytvorim si novy objekt calendarNode\n CalendarNode calendarNode = getCalendarNodeFromCalendar(calendar);\n //nasetuji mu id z neo4j, pokud uz tam existuje (aby se provedl update)\n CalendarNode calendarNodeInNeo4j = calendarNodeService.findByCalendarId(calendar.getId());\n if (calendarNodeInNeo4j != null) {\n calendarNode.setId(calendarNodeInNeo4j.getId());\n }\n\n //a calendarNode ulozim i se vsemi calendarDates\n calendarNodeService.save(calendarNode, -1);\n\n //aktualizace datumu v neo4j\n calendarNodeService.initCalendarDates();\n }\n }", "private void loadDataFromFirebase() {\n\n db.collection(\"users\").document(userId).collection(\"sleep\")\n .orderBy(\"dateTime\", Query.Direction.ASCENDING)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n\n for (QueryDocumentSnapshot querySnapshot : task.getResult()) {\n\n timestampToDate = querySnapshot.getTimestamp(\"dateTime\").toDate();\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\", Locale.ENGLISH);\n dayDate = sdf.format(timestampToDate);\n sensorPressure = querySnapshot.getBoolean(\"sensorPressure\");\n sleepDateTimeData.add(new SleepDateTimeData(dayDate, sensorPressure, timestampToDate));\n i++;\n }\n\n accumulateData();\n\n }\n\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(SleepActivity.this, \"Problem ---1---\", Toast.LENGTH_SHORT).show();\n Log.w(\"!---1---\", e.getMessage());\n }\n });\n }", "private void initFirebase() {\n //инициализируем наше приложение для Firebase согласно параметрам в google-services.json\n // (google-services.json - файл, с настройками для firebase, кот. мы получили во время регистрации)\n FirebaseApp.initializeApp(this);\n //получаем точку входа для базы данных\n database = FirebaseDatabase.getInstance();\n myRef = database.getReference();\n\n }", "private void Register(String mailSTR, String passwordSTR, String fNameSTR, String lNameSTR, String citySTR, String phoneNumberSTR) throws Exception {\n mAuth.createUserWithEmailAndPassword(mailSTR, passwordSTR)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n final Map<String, Object>[] dataToSave = new Map[]{new HashMap<String, Object>()};\n dataToSave[0].put(constants.FIRST_NAME, fNameSTR);\n dataToSave[0].put(constants.SEC_NAME, lNameSTR);\n dataToSave[0].put(constants.CITY, citySTR);\n dataToSave[0].put(constants.EMAIL, mailSTR);\n dataToSave[0].put(constants.PHONE, phoneNumberSTR);\n dataToSave[0].put(constants.VOLUNTEER, \"false\");\n\n\n FirebaseDatabase.getInstance().getReference(constants.DOC_REF_USERS)\n //here we creating users folder in real time data baes , getting uid from user and storing the data in folder named by id\n .child(Objects.requireNonNull(FirebaseAuth.getInstance().getCurrentUser()).getUid())\n .setValue(dataToSave[0]).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(register2.this,\n R.string.register_toast_success, Toast.LENGTH_LONG).show();\n {//adds all new data for newely registered clients\n dayTime dtDEF = new dayTime(0, 0, 23, 59);//default for first time\n Gson gson = new Gson();\n SharedPreferences sp = getSharedPreferences(constants.SHARED_PREFS,\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n String dayDEF = gson.toJson(dtDEF);\n Map<String, String> docData = new HashMap<>();\n for (String day : constants.daysNames) {\n docData.put(day, dayDEF);\n editor.putString(day, dayDEF);\n }\n docData.put(constants.rangeChoice, \"\" + 10.0);\n editor.putFloat(constants.rangeChoice, (float) 10.0);\n\n docData.put(constants.SHARED_PREFS_LOCATION, constants.SET_CITY);\n editor.putString(constants.SHARED_PREFS_LOCATION, constants.SET_CITY);\n\n FirebaseAuth userIdentifier = FirebaseAuth.getInstance();\n String UID = userIdentifier.getCurrentUser().getUid();\n DocumentReference DRF = FirebaseFirestore.getInstance()\n .document(constants.DOC_REF_USERS+\"/\" + UID);\n final boolean[] success = {true};\n final Exception[] failToRet = new Exception[1];\n DRF.set(docData).addOnFailureListener(e -> {\n success[0] = false;\n failToRet[0] = e;\n });\n if (!success[0]) {\n // show/make log for case of failure\n }\n editor.apply();\n\n }\n }\n });\n\n\n }\n\n }).addOnFailureListener(e -> {\n try {\n throw new Exception(constants.FAILED_REGISTER);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n\n\n }", "public static void setupFirebase(Context context) {\n // initialised Firebase\n com.firebase.client.Firebase.setAndroidContext(context);\n }", "public static void dispatchSyncNow(Context context) {\n FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(context));\n Job syncJob = dispatcher.newJobBuilder()\n .setTag(SYNC_TAG)\n .setService(FirebaseSyncJobService.class)\n .setTrigger(Trigger.NOW)\n .setRecurring(false)\n .setReplaceCurrent(true)\n .setLifetime(Lifetime.UNTIL_NEXT_BOOT)\n .addConstraint(Constraint.ON_ANY_NETWORK)\n .build();\n dispatcher.mustSchedule(syncJob);\n Log.d(LOG_TAG, \"Sync job dispatched\");\n }", "private void attachDatabaseReference_requested_holidays() {\n if (mChildEventListenerDaysRequested == null) {\n mChildEventListenerDaysRequested = new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Log.v(\"***********\", \"There has beem an addition in daysRequested\");\n //List<Long> longList = (List) dataSnapshot.getValue();\n if (dataSnapshot.getKey().equals(mUserID)) {//check if it's the current user branch\n RequestedHolidays reques = new RequestedHolidays();\n //reques = dataSnapshot.getValue(RequestedHolidays.class);\n GenericTypeIndicator<List<Long>> t =\n new GenericTypeIndicator<List<Long>>() {\n };\n\n Object objecto = dataSnapshot.getValue();\n //List<Long> messages = dataSnapshot.getValue(t);\n //makeMapHash(objecto);\n //HashMap<String, Long> map = new HashMap<String, Long>();\n //map.put (1, \"Mark\");\n //map.put (2, \"Tarryn\");\n //map = (HashMap) dataSnapshot.getValue();\n //List<Long> list = new ArrayList<Long>(map.values());\n\n //List<Long> longList = (List) dataSnapshot.getValue();\n List<Long> longList = (List<Long>) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n Log.i(\"***********\", \"DrawMonth called in attach...requested\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n }\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a change in daysRequested\");\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n Log.i(\"***********\", \"There has beem a removed in daysRequested\");\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a moved in daysRequested\");\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(), \"ONCANCELLED in /requested_holidays\", Toast.LENGTH_LONG).show();\n Log.i(\"***********\", \"ONCANCELLED IN /requested_holidays\");\n }\n };\n //when days are added to the requestedHolidays in the DB this will trigger\n //mDatabaseReferenceHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n mDatabaseReferenceRequestedHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n //mDatabaseReference.addChildEventListener(mChildEventListenerDaysRequested);\n }\n }", "@Override\n //this one is called when days are added and also the first time the database is called\n //therefore should bring all the workingdays from the database\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Object object = dataSnapshot.getValue();\n if (dataSnapshot.getKey().equals(\"workInts\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n workingDays = ConvertHashToList(longList);\n }\n if (dataSnapshot.getKey().equals(\"holidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n holidays = ConvertHashToList(longList);\n }\n if (dataSnapshot.getKey().equals(\"requested_holidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n //because the worker only can modify his requested_holidays only here makes sense...\n requestedHolidaysaux = (HashSet) requestedHolidays.clone();\n int hola = 4;\n }\n // I will need the requestedHolidays in order to tell the admin and add them to holidays\n if (dataSnapshot.getKey().equals(\"requestedHolidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n }\n //drawMonth(workingDays, holidays, requestedHolidays);//here i should have the days from the database\n Worker worker = dataSnapshot.getValue(Worker.class);\n String laestring = dataSnapshot.getKey();//i think this is the id\n if (worker != null) {\n if (laestring.equals(mUserID)) {\n //if (worker.getNumber_id().equals(mUserID)) {\n List<Long> longList = worker.getWorkInts();\n List<Long> longListHolidays = worker.getHolidays();\n List<Long> longRequested = worker.getRequestedHolidays();\n if (longRequested.size() != 0 && isAdmin) {\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //List<Long> auxlis = new ArrayList<Long>();\n //auxlis = makeListOfDatesLong((requestedHolidays));\n //mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n //mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n okButton.setText(ADMIN_BUTTON_ACCEPT_HOLIDAYS);\n }\n });\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n workingDays = ConvertHashToList(longList);\n holidays = ConvertHashToList(longListHolidays);\n requestedHolidays = ConvertHashToList(longRequested);\n Log.i(\"***********\", \"DrawMonth called in attach...workers\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//here i should have the daya from the database\n }\n }\n\n\n\n\n\n\n\n if (3==4) {//condition to show the alert dialog for when holidays have been requested\n\n // 1. Instantiate an AlertDialog.Builder with its constructor\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n // 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n\n // 3. Get the AlertDialog from create()\n //AlertDialog dialog = builder.create();\n // Add the buttons\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n List<Long> auxlis = new ArrayList<Long>();\n auxlis = makeListOfDatesLong((requestedHolidays));\n mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n// Set other dialog properties\n//...\n\n// Create the AlertDialog\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n //drawMonth(workingDays,holidays, requestedHolidays);//here i should have the daya from the database\n }", "public static void dispatchScheduledSync(Context context) {\n FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(context));\n Job syncJob = dispatcher.newJobBuilder()\n .setTag(SYNC_TAG_SCHEDULED)\n .setService(FirebaseSyncJobService.class)\n .setTrigger(Trigger.NOW)\n .setRecurring(false)\n .setReplaceCurrent(true)\n .setLifetime(Lifetime.UNTIL_NEXT_BOOT)\n .addConstraint(Constraint.ON_ANY_NETWORK)\n .build();\n dispatcher.mustSchedule(syncJob);\n Log.d(LOG_TAG, \"Recurring sync job dispatched\");\n }", "private void makeLocalCalendar() {\n\t\t// TODO Auto-generated method stub\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(Calendars.ACCOUNT_NAME, PATIENT_ACCOUNT_NAME);\n\t\tvalues.put(Calendars.ACCOUNT_TYPE, CalendarContract.ACCOUNT_TYPE_LOCAL);\n\t\tvalues.put(Calendars.NAME, PATIENT_NAME);\n\t\tvalues.put(Calendars.CALENDAR_DISPLAY_NAME, PATIENT_NAME);\n\t\tvalues.put(Calendars.CALENDAR_COLOR, Color.BLACK);\n\t\tvalues.put(Calendars.CALENDAR_ACCESS_LEVEL, Calendars.CAL_ACCESS_OWNER);\n\t\tvalues.put(Calendars.OWNER_ACCOUNT, PATIENT_EMAIL);\n\t\tvalues.put(Calendars.CALENDAR_TIME_ZONE, TimeZone.getAvailableIDs()\n\t\t\t\t.toString());\n\t\tvalues.put(Calendars.SYNC_EVENTS, 1);\n\n\t\tUri.Builder builder = CalendarContract.Calendars.CONTENT_URI\n\t\t\t\t.buildUpon();\n\t\tbuilder.appendQueryParameter(Calendars.ACCOUNT_NAME,\n\t\t\t\t\"com.grokkingandroid\");\n\t\tbuilder.appendQueryParameter(Calendars.ACCOUNT_TYPE,\n\t\t\t\tCalendarContract.ACCOUNT_TYPE_LOCAL);\n\t\tbuilder.appendQueryParameter(CalendarContract.CALLER_IS_SYNCADAPTER,\n\t\t\t\t\"true\");\n\n\t\tUri uri = getContentResolver().insert(builder.build(), values);\n\n\t}", "public void signin(String emailaddress, String password) {\n if (emailaddress.isEmpty() || emailaddress == null) {\n email.setError(\"Email address required \");\n email.requestFocus();\n } else if (!emailaddress.contains(\"@\")) {\n email.setError(\"Not a valid Email address \");\n email.requestFocus();\n } else if (password.isEmpty()) {\n password1.setError(\"Password required\");\n password1.requestFocus();\n } else {\n btnSignIn.setProgress(50);\n mAuth.signInWithEmailAndPassword(emailaddress, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser currentUser = FirebaseAuth.getInstance().\n getCurrentUser();\n btnSignIn.setProgress(100);\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n finish();\n overridePendingTransition(R.anim.slide_from_right,\n R.anim.slide_to_left);\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"UsersStepData/\"\n + currentUser.getUid());\n // initial the database for the new user\n myRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Date now = new Date();\n SimpleDateFormat simpleDateformat =\n new SimpleDateFormat(\"MM-dd-yyyy\");\n SimpleDateFormat simpleDateformat2 =\n new SimpleDateFormat(\"E\");\n // the day of the week abbreviated\n String date = simpleDateformat.format(now);\n String day = simpleDateformat2.format(now);\n // init new user\n if (dataSnapshot.getChildrenCount() == 0 ||\n dataSnapshot == null) {\n HashMap<String, StepData> map = initUserData();\n\n for (String key : map.keySet()) {\n myRef.child(\"WeeklyStepData\").child(key).\n setValue(map.get(key));\n }\n } else {\n // reset data after one week\n if (dataSnapshot.child(\"WeeklyStepData\").child(day).\n child(\"date\").getValue(String.class) != null) {\n if (!dataSnapshot.child(\"WeeklyStepData\").\n child(day).child(\"date\").\n getValue(String.class).equals(date)) {\n for (DataSnapshot childSnap : dataSnapshot.\n child(\"WeeklyStepData\").getChildren()) {\n myRef.child(\"WeeklyStepData\").\n child(childSnap.getKey()).\n child(\"stepsCount\").\n setValue((float) 0);\n\n }\n\n }\n }\n\n }\n myRef.child(\"WeeklyStepData\").child(day).child(\"date\").\n setValue(date);\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n } else {\n // If sign in fails, display a message to the user.\n\n Toast.makeText(getApplicationContext(), task.getException().\n getMessage(),\n Toast.LENGTH_SHORT).show();\n btnSignIn.setProgress(0);\n\n }\n\n\n }\n });\n }\n }", "public void initConnection() {\n try {\n FileInputStream serviceAccount = new FileInputStream(\"serviceAccountKey.json\");\n\n FirebaseOptions options = new FirebaseOptions.Builder()\n .setCredentials(GoogleCredentials.fromStream(serviceAccount))\n .setDatabaseUrl(\"https://yieldcomparisontool.firebaseio.com\")\n .build();\n try {\n if (FirebaseApp.getInstance(FirebaseApp.DEFAULT_APP_NAME) == null) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IllegalStateException e) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IOException e) {\n System.out.println(\"ERROR Invalid Firebase Service account credentials.\");\n System.out.println(e);\n System.exit(1);\n }\n }", "private void setupFirebase() {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(Constants.ROOM_DATABASE_REFERENCE);\r\n mQuery = mFirebaseDatabaseReference.orderByChild(Constants.ROOM_INT_REFERENCE).startAt(Utils.convertHallStart(mHallStart)).endAt(Utils.convertHallEnd(mHallEnd));\r\n }", "static void scheduleWeatherSync(@NonNull final Context context) {\n Driver driver = new GooglePlayDriver(context);\n FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(driver);\n\n Job syncJob = dispatcher.newJobBuilder()\n .setService(FirebaseJobService.class)\n .setTag(SYNC_TAG)\n .setConstraints(Constraint.ON_ANY_NETWORK)\n .setLifetime(Lifetime.FOREVER) // set how long this sync job persists\n .setRecurring(true)\n .setTrigger(Trigger.executionWindow(\n SYNC_INTERVAL_SEC,\n SYNC_INTERVAL_SEC + SYNC_FLEXTIME_SEC\n ))\n .setReplaceCurrent(true)\n .build();\n\n dispatcher.schedule(syncJob);\n\n }", "private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n }", "public void testSyncDates(){\r\n \ts1.syncDates();\r\n \ts2.syncDates();\r\n \tassertSame(si.getStartDate(), s1.getStartDate());\r\n \tassertSame(si.getStartDate(), s2.getStartDate());\r\n \t\r\n \tassertSame(si.getEndDate(), s1.getEndDate());\r\n \tassertSame(si.getEndDate(), s2.getEndDate());\r\n \t\r\n \t//site investigator is null. \r\n \tDate now = new Date();\r\n \tStudyInvestigator s3 = new StudyInvestigator();\r\n \ts3.setStartDate(now);\r\n \ts3.syncDates();\r\n \tassertSame(now, s3.getStartDate());\r\n \tassertNull(s3.getEndDate());\r\n \t\r\n \t\r\n }", "private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n\n mAuth = FirebaseAuth.getInstance();\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n myRef = mFirebaseDatabase.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if (user != null) {\n // User is signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n } else {\n // User is signed out\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n // ...\n }\n };\n\n\n }", "private void saveEvent(){\n String eventName = eventNameView.getText().toString().trim();\n String dateString = eventDateView.getText().toString();\n String timeString = eventTimeView.getText().toString();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm a\");\n Calendar cal = Calendar.getInstance();\n try{\n Date date = sdf.parse(dateString+ \" \" + timeString);\n cal.setTime(date);\n }\n catch (Exception e){\n Log.d(\">>>\",e.toString());\n }\n\n if(eventName.length()>=1){\n final Event event = new Event(eventName, dateString, timeString, memberStatus, chat.getChatKey());\n String reminderPreferenceKeyTemp = \"\";\n if(this.event!=null){\n event.setEventKey(this.event.getEventKey());\n final DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n database.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot e : dataSnapshot.getChildren()){\n if(e.child(\"eventKey\").getValue().toString().equals(event.getEventKey())){\n database.child(e.getKey()).setValue(event);\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(patternDate);\n try {\n Date date = sdf.parse(eventDateView.getText().toString());\n cal.setTime(date);\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n catch(Exception exception){\n\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n reminderPreferenceKeyTemp = event.getEventKey() + \"reminders\";\n }\n else{\n //creating event for the first time\n DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n eventFirebase = database.push();\n event.setEventKey(eventFirebase.getKey());\n database.push().setValue(event);\n reminderPreferenceKeyTemp = eventFirebase.getKey() + \"reminders\";\n }\n //write sharedpreferences for reminder\n final String reminderPreferenceKey = reminderPreferenceKeyTemp;\n Spinner spinner = (Spinner) findViewById(R.id.reminder_spinner);\n final SharedPreferences pref = getApplicationContext().getSharedPreferences(\"MyPref\", 0);\n final SharedPreferences.Editor editor = pref.edit();\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n if(position==0){\n //turn on\n editor.putBoolean(reminderPreferenceKey, true);\n editor.commit();\n }\n else if(position == 1){\n //turn off\n editor.putBoolean(reminderPreferenceKey, false);\n editor.commit();\n }\n }\n @Override\n public void onNothingSelected(AdapterView<?> parentView) { }\n });\n\n //create reminders\n boolean notify = pref.getBoolean(reminderPreferenceKey, false);\n\n if(notify){\n Intent intent = new Intent(Intent.ACTION_EDIT);\n intent.setType(\"vnd.android.cursor.item/event\");\n intent.putExtra(\"beginTime\", cal.getTimeInMillis());\n intent.putExtra(\"allDay\", false);\n intent.putExtra(\"title\", event.getEventName());\n startActivity(intent);\n }\n if(!creatingNewChat){\n statusAdapter.updateFirebase();\n }\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n else{\n Toast.makeText(this, \"Event name is invalid\", Toast.LENGTH_SHORT).show();\n }\n }", "private static void performFutureSync(final long startTime) throws IOException,ConfigurationException {\n\n LOGGER.info(\"Starting to perform future sync\");\n startupDisruptor();\n TapStream tapStream = tapClient\n .tapBackfill(tapName, startTime, 0, TimeUnit.MILLISECONDS);\n RingBuffer<CouchbaseEvent> ringBuffer = disruptor.getRingBuffer();\n\n CouchbaseEventProducer producer = new CouchbaseEventProducer(\n ringBuffer);\n while (!tapStream.isCompleted()) {\n while (tapClient.hasMoreMessages()) {\n ResponseMessage responseMessage;\n responseMessage = tapClient.getNextMessage();\n if (null != responseMessage) {\n String key = responseMessage.getKey();\n String value = new String(responseMessage.getValue());\n producer.onData(new String[] {key, value},\n responseMessage.getOpcode());\n }\n }\n }\n }", "public abstract Date computeFirstFireTime(Calendar calendar);", "static synchronized BasisGoogleCalendar getCalendar(UpodWorld w)\n{\n if (DATA_STORE_DIR == null) return null;\n if (cal_service == null) {\n try {\n\t cal_service = getCalendarService();\n }\n catch (IOException e) {\n\t BasisLogger.logE(\"GOOGLECAL: Authorization problem with calendar api: \" + e);\n\t DATA_STORE_DIR = null;\n\t HTTP_TRANSPORT = null;\n\t DATA_STORE_FACTORY = null;\n\t return null;\n }\n }\n\n BasisGoogleCalendar rslt = the_calendars.get(w);\n if (rslt == null) {\n rslt = new BasisGoogleCalendar();\n the_calendars.put(w,rslt);\n }\n\n return rslt;\n}", "public static void updateData(Context context) {\n if (context == null) {\n throw new IllegalArgumentException();\n }\n if (isNetworkConnected(context)) {\n List<Event> allEvents = new ArrayList<>();\n List<Registration> registrations = new ArrayList<>();\n String userName = MainActivity.getPreferences().getString(USERNAME.get(), \"\");\n try {\n allEvents.addAll(getEventClient().fetchAll());\n registrations.addAll(getEventClient().fetchForUser(userName));\n } catch (EventClientException e) {\n Log.e(\"FetchEvent\", e.getMessage());\n }\n Collections.sort(allEvents);\n REGISTRATIONS.clear();\n REGISTRATIONS.addAll(registrations);\n ALL_EVENTS.clear();\n ALL_EVENTS.addAll(allEvents);\n }\n }", "public abstract void updateWithNewCalendar(Calendar cal, long misfireThreshold);", "private synchronized void syncData() {\n try {\n // pulling data from server\n pullData();\n\n // pushing local changes to server\n// recordStatus=2\n pushData();\n// recordStatus=1\n// pushData1();\n } catch (Throwable throwable) {\n Log.d(TAG, \"doWork: \" + throwable.getMessage());\n }\n // Toast.makeText(getApplicationContext(), \".\", Toast.LENGTH_SHORT).show();\n }", "@PostConstruct\r\n\tprivate void firebaseLogIn() {\n\t\ttry {\r\n\r\n\t\t\tInputStream serviceAccount = getClass()\r\n\t\t\t\t\t.getResourceAsStream(\"/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n//\t\t\t\t\tnew FileInputStream(\r\n//\t\t\t\t\t\"src/main/resources/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n\t\t\tFirebaseOptions options = FirebaseOptions.builder()\r\n\t\t\t\t\t.setCredentials(GoogleCredentials.fromStream(serviceAccount))\r\n\t\t\t\t\t.setDatabaseUrl(\"https://avisosnick.firebaseio.com\").build();\r\n\r\n\t\t\tFirebaseApp.initializeApp(options);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n String key = dataSnapshot.getKey();\n Object data = dataSnapshot.getValue();\n\n\n Worker worker = dataSnapshot.getValue(Worker.class);\n String laestring = dataSnapshot.getKey();//i think this is the id\n if (worker != null) {\n if (laestring.equals(mUserID)) {\n //if (worker.getNumber_id().equals(mUserID)) {\n List<Long> longList = worker.getWorkInts();\n List<Long> longListHolidays = worker.getHolidays();\n List<Long> longRequested = worker.getRequestedHolidays();\n if (longRequested.size() != 0 && isAdmin) {\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //List<Long> auxlis = new ArrayList<Long>();\n //auxlis = makeListOfDatesLong((requestedHolidays));\n //mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n //mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n }\n });\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n workingDays = ConvertHashToList(longList);\n holidays = ConvertHashToList(longListHolidays);\n requestedHolidays = ConvertHashToList(longRequested);\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//here i should have the daya from the database\n }\n }\n\n\n if (dataSnapshot.getKey().equals(\"workInts\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n //workingDays = ConvertHashToList(longList);//i should ADD not convert\n workingDays.addAll(ConvertHashToList(longList));\n }\n //drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n Toast.makeText(getApplicationContext(), \"onChildChanged in Calendar Activity\", Toast.LENGTH_LONG).show();\n Log.i(\"**********\", \"childChanged \" + dataSnapshot.toString());\n }", "public void saveDay() {\n day.setServices(serviciosTotales);\n day.setTasks(tasksTotales);\n\n databaseReference.child(day.getDate() + \"_\" + day.getUserId()).setValue(day);\n Toast.makeText(context, \"Creando archivo para enviar por correo.\", Toast.LENGTH_LONG).show();\n //todo, so far it will keep updating the day\naskPermissions();\n createExcel();\n\n }", "private void setupFirebaseAuth() {\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n mAuth = FirebaseAuth.getInstance();\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n //check if the user is logged in\n checkCurrentUser(user);\n\n if (user != null) {\n //User is signed in\n Log.d(TAG, \"onAuthStateChanged: signed_in:\" + user.getUid());\n }\n else {\n //User is signed out\n Log.d(TAG, \"onAuthStateChanged: signed out\");\n }\n }\n };\n }", "private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }", "private void sendGuideRegDataToFireBase(){\n }", "public void update() {\n Log.d(TAG, \"Updating database\");\n databaseRef.child(TAG).setValue(events);\n Log.d(TAG, \"Database update complete\");\n }", "public static void initialize() {\n //Get Firebase auth instance\n GlobalData.auth = FirebaseAuth.getInstance();\n\n GlobalData.u = new User();\n GlobalData.u.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");//\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n /**\n * Start Firebase!\n */\n FirebaseCore.start();\n// User u = new User();\n// u.setId(\"6ZxSGeHS4DOoFHEE2McBcGH7XHP2\");\n//\n// try {\n// u = DUser.crud(u, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n// Log.e(\"Test\", u.getEmail());\n//\n// Message m = new Message();\n// m.setMessage(\"Hello \" + System.currentTimeMillis());\n// m.setBlobname(null);\n// m.setBlob(null);\n// m.setTimestamp(System.currentTimeMillis());\n//\n// try {\n// m.setOrder(DAutoIncrement.order(DAutoIncrement.MESSAGE));\n//\n// m = DMessage.crud(m, false, false);\n// Message m2 = new Message();\n// m2.setId(m.getId());\n// m2 = DMessage.crud(m2, true, false);\n//// Log.w(\"Message\",m2.getId());\n// Message m3 = new Message();\n// m3.setId(m.getId());\n//// DMessage.crud(m3,false, true);\n//// Log.w(\"Message2\",m3.getId());\n// DMessageList.crd(u, u, m, false, false);\n//\n// final ArrayList<Message> messages = DMessageList.crd(u, u, null, true, false);\n// for (Message mes : messages\n// ) {\n// DMessage.crud(mes, true, false); // Fill the message with data\n//\n// }\n// // Sorting require all messages element to be filled, otherwise, it won't work\n// Collections.sort(messages);\n// for (Message mes : messages\n// ) {\n// Log.e(mes.getId(), mes.getMessage());\n//\n// }\n//\n// RunnableDataSnapshot rds = new RunnableDataSnapshot() {\n// @Override\n// public void run(DataSnapshot dataSnapshot, Object object) {\n// ArrayList<Message> messages2 = (ArrayList<Message>) object;\n// Collections.sort(messages2);\n// for (int i = messages.size(); i < messages2.size(); i++) {\n// Log.e(\"New Input\", messages2.get(i).getId());\n// messages.add(messages2.get(i));\n// }\n// Log.e(\"Data change\", \"Data is changing\");\n// }\n// };\n// DMessageList.nonblockRead(u, u, rds);\n// User u2 = new User();\n// u2.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");\n// ArrayList<User> users = new ArrayList<User>();\n// users.add(u2);\n// HashMap<String, ArrayList<User>> hm = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 1\", users);\n// DBroadcast.uBroadcastPushorDelete(u, hm, true);\n// ArrayList<User> users2 = new ArrayList<User>();\n// users2.add(u);\n// users2.add(u2); // it add itself which must be avoided!\n// HashMap<String, ArrayList<User>> hm2 = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 2\", users2);\n// DBroadcast.uBroadcastPushorDelete(u2, hm2, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n }\n });\n t.start();\n\n }", "private void realTimeUpdate(){\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n\r\n if (user == null) {\r\n return;\r\n }\r\n\r\n String userId = user.getUid();\r\n String email = user.getEmail();\r\n DocumentReference reference = mFirebaseFirestore.collection(\"users\").document(userId);\r\n reference.addSnapshotListener(new EventListener<DocumentSnapshot>() {\r\n @Override\r\n public void onEvent(@Nullable DocumentSnapshot documentSnapshot, @Nullable FirebaseFirestoreException e) {\r\n if (e != null){\r\n Toast.makeText(Testing.this, \"Error: \" + e.toString(), Toast.LENGTH_LONG).show();\r\n return;\r\n }else if (documentSnapshot != null && documentSnapshot.exists()) {\r\n Toast.makeText(Testing.this, \"Current data:\" + documentSnapshot.getData(), Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n });\r\n }", "private static void performInitialSync() throws IOException,ConfigurationException {\n\n LOGGER.info(\"Starting to perform initial sync\");\n //tapDump is basically that -- a dump of all data currently in CB.\n TapStream tapStream = tapClient.tapDump(tapName);\n SolrBatchImportEventHandler couchbaseToSolrEventHandler = new SolrBatchImportEventHandler();\n startupBatchDisruptor(couchbaseToSolrEventHandler);\n RingBuffer<CouchbaseEvent> ringBuffer = disruptor.getRingBuffer();\n\n CouchbaseEventProducer producer = new CouchbaseEventProducer(ringBuffer);\n //While there is data keep reading and producing\n while (!tapStream.isCompleted()) {\n while (tapClient.hasMoreMessages()) {\n ResponseMessage responseMessage;\n responseMessage = tapClient.getNextMessage();\n if (null != responseMessage) {\n String key = responseMessage.getKey();\n String value = new String(responseMessage.getValue());\n producer.onData(new String[] {key, value}, responseMessage.getOpcode());\n\n }\n }\n }\n LOGGER.info(\"Finished initial sync\");\n shutdownBatchDisruptor();\n //Since this event handler is batch based, we need to let it know we are done and it could flush the remaining data.\n couchbaseToSolrEventHandler.flush();\n\n }", "private void testFirebase() {\n Intent launchIntent = new Intent(this, HomeActivity.class);\n launchIntent.putExtra(Constants.FIREBASE_ACTION, true);\n launchIntent.putExtra(Constants.FIREBASE_TITLE, \"Sample Title\");\n launchIntent.putExtra(Constants.FIREBASE_BODY, \"Sample Body\");\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, launchIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Bitmap rawBitmap = BitmapFactory.decodeResource(getResources(),\n R.mipmap.ic_launcher_round);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_stat_notif_icon_firebase_om)\n .setLargeIcon(rawBitmap)\n .setContentTitle(getResources().getString(R.string.app_name))\n .setContentText(\"Sample body\")\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Notification notification = notificationBuilder.build();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n notificationManager.notify(0 /* ID of notification */, notification);\n }", "public CalendarUtils(Calendar baseCalendar) {\r\n\t\tthis(baseCalendar.getTime(), baseCalendar.getTimeZone());\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_calendar, container, false);\n\n mFirebaseAuth = FirebaseAuth.getInstance();\n user = mFirebaseAuth.getCurrentUser();\n userName = user.getDisplayName();\n\n mCalendarView = (CalendarView) view.findViewById(R.id.calendarView);\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd\");\n\n selectedDate = sdf.format(new Date(mCalendarView.getDate()));\n\n mCalendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {\n\n @Override\n public void onSelectedDayChange(CalendarView calendarView, int year, int month,\n int dayOfMonth) {\n\n final Calendar cal = Calendar.getInstance();\n cal.set(year, month, dayOfMonth);\n\n // Get habits from FireBase and set depend of date.\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n CollectionReference collectionReference = db.collection(\"habits\");\n collectionReference.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n mHabits = new ArrayList<>();\n for (QueryDocumentSnapshot document : task.getResult()) {\n Habit habit = document.toObject(Habit.class);\n if (cal.getTime().compareTo(habit.getStartDate()) == 0\n || cal.getTime().compareTo(habit.getEndDate()) == 0\n || (cal.getTime().after(habit.getStartDate()) && cal.getTime().before(habit.getEndDate()))) {\n mHabits.add(habit);\n }\n }\n mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view_calendar);\n // mRecyclerView.setHasFixedSize(true);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n mCalendarAdapter = new CalendarAdapter(getContext(),mHabits, R.layout.fragment_habit_today);\n mRecyclerView.setAdapter(mCalendarAdapter);\n mCalendarAdapter.notifyDataSetChanged();\n }\n });\n }\n });\n return view;\n }", "private void initFirebase() {\n database = FirebaseDatabase.getInstance();\n user = FirebaseAuth.getInstance().getCurrentUser();\n dRef = database.getReference(\"Trails\");\n }", "@Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(), \"onCancelled in Calendar Activity\", Toast.LENGTH_LONG).show();\n Log.v(\"*********\", databaseError.toString());\n //FirebaseCrash.report(databaseError.toException());\n //FirebaseCrash.report(databaseError.toException());\n }", "@Test\n\tpublic void Calendar_20329_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\t\t\n\t\tFieldSet customData = testData.get(testName).get(0);\n\t\tSimpleDateFormat sdFmt = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n\t\t// TODO: VOOD-863 need support for Calendar module.\n\t\t// Click Day button\n\t\tsugar.navbar.navToModule(\"Calendar\");\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\t\t\n\t\tnew VoodooControl(\"input\", \"id\", \"day-tab\").click();\n\t\t\n\t\t// Access 08:00 time slot and click Schedule Call from warning \n\t\tnew VoodooControl(\"div\", \"css\", \".week div[time='\"+ customData.get(\"callTime\") +\"']\").click();\n\t\tVoodooUtils.focusDefault();\n\t\tsugar.alerts.getWarning().clickLink(1);\n\t\t\n\t\t// Enter Call Subject data, end time and save.\n\t\tsugar.calls.createDrawer.getEditField(\"name\").set(testName);\n\t\tnew VoodooDate(\"input\", \"css\", \".fld_date_end.edit input[data-type='time']\").set(customData.get(\"callTime\"));\n\t\tsugar.calls.createDrawer.getControl(\"saveButton\").click();\t\n\t\tsugar.alerts.getSuccess().waitForVisible();\n\t\t\n\t\t// Assert that a Call with 0 min duration is successfully created\n\t\tsugar.alerts.getSuccess().assertEquals(customData.get(\"alertMessage\") + \" \" + testName \n\t\t\t\t+\" for \"+ sdFmt.format(new Date()) +\" \"+ customData.get(\"callTime\")+\".\",true);\n\t\t\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "private void getSchedules() {\n //Clearing List Items Before Adding it\n schedulesArrayList.clear();\n // Create a reference to the Schedules collection\n CollectionReference schedulesRef = db.collection(\"schedules\");\n\n // Create a query against the collection.\n Query query = schedulesRef;\n if (getArguments() != null) {\n if (dataBundle.getString(\"from\").equals(\"league Features\")) {\n query = schedulesRef.whereEqualTo(\"league_id\", dataBundle.getString(\"league_id\"));\n }\n }\n\n //Fetching data and assigning it to Recycler View to Display On Screen\n query.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n Calendar c = Calendar.getInstance();\n int yy = c.get(Calendar.YEAR);\n int mm = c.get(Calendar.MONTH) + 1;\n int dd = c.get(Calendar.DAY_OF_MONTH);\n QuerySnapshot documentSnapshots = task.getResult();\n if(documentSnapshots.size()==0){\n Toast.makeText(context,\"Match Schedule Is Not Created Yet!\",Toast.LENGTH_LONG).show();\n }\n progressDialog.dismiss();\n for (QueryDocumentSnapshot document : task.getResult()) {\n try {\n JSONObject Team1object = (JSONObject) teamsObject.get(document.get(\"team1_id\").toString());\n JSONObject Team2object = (JSONObject) teamsObject.get(document.get(\"team2_id\").toString());\n\n if (getArguments() == null) {\n String[] date = document.get(\"match_date\").toString().split(\"-\");\n if (Integer.parseInt(date[0]) > yy) {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n else if(Integer.parseInt(date[0]) == yy){\n\n if (Integer.parseInt(date[1]) > mm) {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n else if(Integer.parseInt(date[1]) == mm){\n if (Integer.parseInt(date[2]) >= dd) {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n }\n }\n } else {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n schedules_rec_adapter.notifyDataSetChanged();\n schedules_rec_adapter.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n RecyclerView.ViewHolder viewHolder = (RecyclerView.ViewHolder) view.getTag();\n int position = viewHolder.getAdapterPosition();\n Bundle dataBundle = new Bundle();\n dataBundle.putString(\"match_id\",schedulesArrayList.get(position).getMatch_id());\n dataBundle.putString(\"match_date\",schedulesArrayList.get(position).getMatch_date());\n dataBundle.putString(\"match_time\",schedulesArrayList.get(position).getMatch_time());\n dataBundle.putString(\"match_location\",schedulesArrayList.get(position).getMatch_location());\n dataBundle.putString(\"team1_id\",schedulesArrayList.get(position).getTeam1_id());\n dataBundle.putString(\"team1_name\",schedulesArrayList.get(position).getTeam1_name());\n dataBundle.putString(\"team1_icon\",schedulesArrayList.get(position).getTeam1_icon());\n dataBundle.putString(\"team2_id\",schedulesArrayList.get(position).getTeam2_id());\n dataBundle.putString(\"team2_name\",schedulesArrayList.get(position).getTeam2_name());\n dataBundle.putString(\"team2_icon\",schedulesArrayList.get(position).getTeam2_icon());\n dataBundle.putString(\"league_id\",schedulesArrayList.get(position).getLeague_id());\n if (getArguments() != null) {\n if (getArguments().getString(\"from\") != null && getArguments().getString(\"from\").equals(\"league Features\")) {\n dataBundle.putString(\"from\", \"league Features\");\n HomeNavController.navigate(R.id.matchScheduleInfoFragment, dataBundle);\n }\n } else {\n HomeNavController.navigate(R.id.matchScheduleInfoFragment,dataBundle);\n }\n }\n });\n } else {\n Toast.makeText(context, task.getException().getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "void setCalendarId(Long calendarId);", "private void setFirebase() {\n auth = FirebaseAuth.getInstance();\n\n //get current user\n final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n authListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user == null) {\n // user auth state is changed - user is null\n // launch login activity\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n }\n };\n }", "private static com.google.api.services.calendar.Calendar getCalendarService() throws IOException\n{\n Credential cred = authorize();\n com.google.api.services.calendar.Calendar.Builder bldr =\n new com.google.api.services.calendar.Calendar.Builder(HTTP_TRANSPORT,JSON_FACTORY,cred);\n bldr.setApplicationName(APPLICATION_NAME);\n\n com.google.api.services.calendar.Calendar cal = bldr.build();\n\n return cal;\n}", "private void addToCalendar() {\r\n if (!requireCalendarPermissions())\r\n return;\r\n\r\n if (CalendarUtil.createEntry(this, event))\r\n onAddToCalendarSuccess();\r\n else\r\n onRequireCalendarPermissionsDenied();\r\n }", "public void createCalendar() throws Exception, IOException, ServiceException {\n // If true, the calendar already exists\n if (getDestinationCalendarUrl() != null) {\n return;\n }\n\n CalendarEntry calendar = new CalendarEntry();\n calendar.setTitle(new PlainTextConstruct(destinationCalendarName));\n// calendar.setSummary(new PlainTextConstruct(\"Lotus Notes Calendar\"));\n // Get this machine's current time zone when creating the new Google calendar\n TimeZone localTimeZone = TimeZone.getDefault();\n calendar.setTimeZone(new TimeZoneProperty(localTimeZone.getID()));\n \n calendar.setHidden(HiddenProperty.FALSE);\n calendar.setSelected(SelectedProperty.TRUE);\n calendar.setColor(new ColorProperty(COLOR));\n\n CalendarEntry returnedCalendar = service.insert(mainCalendarFeedUrl, calendar);\n returnedCalendar.update();\n\n // Get the feed url reference so that we can add events to the new calendar.\n destinationCalendarFeedUrl = new URL(returnedCalendar.getLink(\"alternate\", \"application/atom+xml\").getHref());\n\n return;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_home, container, false);\n\n gson = new Gson();\n\n pref = getActivity().getApplicationContext().getSharedPreferences(\"TutorProfile\", 0);\n String json = pref.getString(\"TutorProfile\", \"\");\n tutorProfile = gson.fromJson(json, TutorProfile.class);\n\n compactCalendarView = view.findViewById(R.id.compactcalendar_view);\n\n mTutor = FirebaseDatabase.getInstance().getReference().child(\"TutorInfo\").child(tutorProfile.getUid()).child(\"Responses\");\n mTutor.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n arrayListEvents.clear();\n compactCalendarView.removeAllEvents();\n\n for (DataSnapshot snapshot: dataSnapshot.getChildren())\n {\n ObjectRequest objectRequest = snapshot.getValue(ObjectRequest.class);\n\n if (objectRequest.isAccepted && !objectRequest.isCancelled)\n {\n Date date = convertToDate(objectRequest.Date);\n Event event = new Event(Color.GREEN, date.getTime(), objectRequest);\n arrayListEvents.add(event);\n }\n }\n\n compactCalendarView.addEvents(arrayListEvents);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n img_ProfilePic = view.findViewById(R.id.img_ProfilePic);\n text_Welcome = view.findViewById(R.id.text_Welcome);\n\n Glide.with(this)\n .load(tutorProfile.getUrlPic())\n .apply(RequestOptions.circleCropTransform())\n .into(img_ProfilePic);\n\n text_Welcome.setText(\"Welcome Back \\n\" + tutorProfile.getName() + \"!\");\n\n final DateFormat dateFormat = new DateFormat();\n\n text_Month = view.findViewById(R.id.text_Month);\n text_Month.setText(dateFormat.format(\"MMMM, yyyy\", compactCalendarView.getFirstDayOfCurrentMonth()));\n\n compactCalendarView.setListener(new CompactCalendarView.CompactCalendarViewListener() {\n @Override\n public void onDayClick(Date dateClicked) {\n for (int i = 0; i < arrayListEvents.size(); i++)\n {\n ObjectRequest objectRequest = (ObjectRequest) arrayListEvents.get(i).getData();\n\n if (dateClicked.compareTo(convertToDate(objectRequest.getDate())) == 0)\n {\n final Intent intent = new Intent(getContext(), ActivityRequestChat.class);\n intent.putExtra(\"Request\", objectRequest);\n DatabaseReference mImage = FirebaseDatabase.getInstance().getReference().child(\"TutorInfo\").child(objectRequest.getRequesterUid()).child(\"urlPic\");\n mImage.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n urlPic = dataSnapshot.getValue().toString();\n intent.putExtra(\"Image\", urlPic);\n startActivity(intent);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n }\n }\n\n @Override\n public void onMonthScroll(Date firstDayOfNewMonth) {\n text_Month.setText(dateFormat.format(\"MMMM, yyyy\", compactCalendarView.getFirstDayOfCurrentMonth()));\n }\n });\n\n\n compactCalendarView.showCalendar();\n\n return view;\n }", "Calendar registeredAt();", "private void setUpFirebaseAuthentication() {\n authentication = FirebaseAuth.getInstance();\n authStateListener = firebaseAuth -> {\n currentUser = firebaseAuth.getCurrentUser();\n if (currentUser != null) {\n Log.d(TAG, \"Success\");\n Intent intent = new Intent(SignInActivity.this, HomePageActivity.class);\n startActivity(intent);\n\n } else {\n Log.d(\"HIRHEFOIH\", \"signed out\");\n }\n };\n }", "public void fetchEventsFromFirebase(final String day, final String month, final DisplayNotesDatabaseManagerInterface callback){\n db.collection(NOTES_COLLECTION_PATH).document(EVENTS_COLLECTION_PATH).collection(month).document(day).get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n DocumentSnapshot document = task.getResult();\n if(document.exists()){\n ArrayList<String> note = (ArrayList<String>)document.get(KEY_NOTE);\n callback.prepareArray(note);\n } else {\n callback.prepareArray(null);\n }\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);\n mInAppMessaging = FirebaseInAppMessaging.getInstance();\n mInAppMessaging.setAutomaticDataCollectionEnabled(true);\n mInAppMessaging.setMessagesSuppressed(false);\n Button remindersDebugButton = findViewById(R.id.reminders_debug);\n if (!BuildConfig.DEBUG) {\n remindersDebugButton.setVisibility(View.GONE);\n }\n\n // For newly signed up users and existing users from previous version of the app, we need\n // to schedule reminder.\n Reminders.getInstance().scheduleIfNecessary(getApplicationContext());\n }", "private void refreshGoogleCalendarToken() {\n this.getGoogleToken();\n }", "private void addDatatoFirebase(String name, String phone, String address) {\n employeeInfo.setstartUpName(name);\n employeeInfo.setpotential(phone);\n employeeInfo.setbuildTime(address);\n String id = databaseReference.push().getKey();\n\n\n assert id != null;\n\n databaseReference.child(id).setValue(employeeInfo);\n\n\n\n\n\n // we are use add value event listener method\n // which is called with database reference.\n// databaseReference.addValueEventListener(new ValueEventListener() {\n// @Override\n// public void onDataChange(@NonNull DataSnapshot snapshot) {\n// // inside the method of on Data change we are setting\n// // our object class to our database reference.\n// // data base reference will sends data to firebase.\n// databaseReference.setValue(employeeInfo);\n//\n// // after adding this data we are showing toast message.\n// Toast.makeText(MainActivity.this, \"data added\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// @Override\n// public void onCancelled(@NonNull DatabaseError error) {\n// // if the data is not added or it is cancelled then\n// // we are displaying a failure toast message.\n// Toast.makeText(MainActivity.this, \"Fail to add data \" + error, Toast.LENGTH_SHORT).show();\n// }\n// });\n }", "static public void main(String [] args)\n{\n new BasisGoogleCalendar();\n}", "private void onPressCalendarEntry() {\r\n if (event.hasCalendarEntry())\r\n onPressRemoveFromCalendar();\r\n else\r\n onPressAddToCalendar();\r\n }", "private void addStartUp() {\n DatabaseReference firebaseDatabase = FirebaseDatabase.getInstance().getReference(STARTUP_FIREBASE_DATABASE_REFERENCE);\n String id = firebaseDatabase.push().getKey();\n StartUpField startUpField = new StartUpField(id, startupName.getText().toString().trim(),\n startupDescription.getText().toString().trim(), startupFounder.getText().toString().trim(),\n startupCoFounder.getText().toString().trim(), startupWebsite.getText().toString().trim(),\n facebookUrl.getText().toString().trim(), twitterUrl.getText().toString().trim(), imageUrl,\n telephone.getText().toString().trim(), email.getText().toString().trim());\n firebaseDatabase.child(id).setValue(startUpField).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n if (getView() != null) {\n Navigation.findNavController(requireView()).navigate(R.id.action_addStartUpFragment_to_navigation_startup);\n }\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n Toast.makeText(getParentFragment().getContext(), \"Startup added\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getParentFragment().getContext(), \"Unable to add Startup\", Toast.LENGTH_SHORT).show();\n Timber.d(\"database Write Error: %s\", task.getException().getLocalizedMessage());\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n }\n });\n }", "public void inicializarFirebaseAuth() {\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n uID = user.getUid();\n\n mDatabase.child(\"users\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n boolean check = false;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()){\n if (snapshot.getKey().equals(uID)) {\n check = true;\n break;\n }\n }\n if(!check){\n mDatabase.child(\"users\").child(uID).setValue(true);\n setCategories();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n }\n\n // [START_EXCLUDE]\n hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n }", "public static void readEventos(){\n\n //Cojemos el dni del trabajador logado\n dni_trabajador = DatosUsuario.getDNI();\n\n //Inicializamos\n db = FirebaseFirestore.getInstance();\n listaEventos = new ArrayList<RecyclerViewCalTrabajador>();\n listaEventosDias = new ArrayList<RecyclerViewCalTrabajador>();\n\n //Leemos todos y los metemos en un array\n db.collection(\"Evento\")\n .whereEqualTo(\"Trabajador\", dni_trabajador)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n /*Cogemos el dato fecha de la bbdd y hacemos el casting\n * a millisegundos para darselo a el evento.*/\n\n\n // Timestamp f = (Timestamp) document.get(\"Fecha\");\n Fecha = document.getString(\"Fecha\");\n System.out.println(Fecha);\n Log.d(Values.tag_log, \"Fecha: \" + document.get(\"Fecha\"));\n //Date f1 = f.toDate();\n Log.d(Values.tag_log, \"Fecha: \" );\n\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss.SSS\");\n parsedDate = dateFormat.parse(Fecha);\n timestamp = new java.sql.Timestamp(parsedDate.getTime());\n } catch(Exception e) { //this generic but you can control another types of exception\n // look the origin of excption\n }\n\n\n listaEventos.add(new RecyclerViewCalTrabajador(timestamp,document.get(\"Titulo\").toString(),\n document.get(\"Trabajador\").toString(),document.get(\"Adress\").toString()));\n //Date f1 = f.toDate();\n Log.d(Values.tag_log, \"Fecha: \" + d);\n\n\n /* listaEventos.add(new RecyclerViewCalTrabajador(d,document.get(\"Titulo\").toString(),\n document.get(\"Trabajador\").toString(),document.get(\"Adress\").toString()));*/\n }\n } else {\n Log.d(TAG, \"Error getting documents: \", task.getException());\n }\n }\n });\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n //The UI environment is set\n setContentView(R.layout.activity_main);\n\n //At the very first time, the database is created; then this only connect the app to it.\n applicationDB = new MyCalendarDB(this); \n if(applicationDB.getSettingByName(\"def_view\") == null)\n \tapplicationDB.addSetting(\"def_view\", \"Month\");\n if(applicationDB.getSettingByName(\"def_calendar\") == null)\n \tapplicationDB.addSetting(\"def_calendar\", \"No default\");\n defaultView = applicationDB.getSettingByName(\"def_view\");\n// actualView = applicationDB.getSettingByName(\"last_view\");\n actualCalendar = Calendar.getInstance();\n }", "private void updateDashboardData(DataSnapshot d) {\n currentUser = d.getValue(generic);\n DataSnapshot goalSnapshot = d.child(\"goals\");\n DataSnapshot runsSnapshot = d.child(\"runs\");\n DataSnapshot shoeSnapshot = d.child(\"shoes\");\n DataSnapshot recordSnapshot = d.child(\"records\");\n\n //init goals\n userGoals = new Goal();\n userGoals.setWeekOfYear(Integer.parseInt(goalSnapshot.child(\"weekOfYear\").getValue().toString()));\n userGoals.setMilesPerWeekTarget(Double.parseDouble(goalSnapshot.child(\"milesPerWeekTarget\").getValue().toString()));\n userGoals.setRunsPerWeekTarget(Integer.parseInt(goalSnapshot.child(\"runsPerWeekTarget\").getValue().toString()));\n userGoals.setMilesPerWeekActual(Double.parseDouble(goalSnapshot.child(\"milesPerWeekActual\").getValue().toString()));\n userGoals.setRunsPerWeekActual(Integer.parseInt(goalSnapshot.child(\"runsPerWeekActual\").getValue().toString()));\n if (goalSnapshot.child(\"dateOfRace\").getValue() == null) {\n userGoals.setDaysUntilRace(\"\");\n } else {\n userGoals.setDaysUntilRace(goalSnapshot.child(\"dateOfRace\").getValue().toString());\n }\n\n //init runs\n if(runsSnapshot.exists() && runsSnapshot.getValue() != null) {\n runMap = runsSnapshot.getValue(gRun);\n } else {\n LinearLayout l1 = (LinearLayout) findViewById(R.id.row1);\n LinearLayout l2 = (LinearLayout) findViewById(R.id.row2);\n TextView cardDate =(TextView) findViewById(R.id.cardDate);\n l1.setVisibility(View.GONE);\n l2.setVisibility(View.GONE);\n cardDate.setText(\"You don't have any runs yet !\");\n }\n\n //init shoes\n userShoes = shoeSnapshot.getValue(gShoe);\n\n if(currentUser == null){\n drawerusername.setText(text);\n }else {\n HashMap<String, Object> temp = (HashMap<String, Object>) currentUser.get(\"info\");\n drawerusername.setText(temp.get(\"username\").toString());\n }\n\n //init records\n userRecords = new Record();\n userRecords.setRecordDistance(Integer.parseInt(recordSnapshot.child(\"recordDistance\").getValue().toString()));\n userRecords.setRecordTime(Integer.parseInt(recordSnapshot.child(\"recordTime\").getValue().toString()));\n userRecords.setRecordPace(Integer.parseInt(recordSnapshot.child(\"recordPace\").getValue().toString()));\n\n\n //Background updates relating to user goals\n if(check == 0) {\n refreshGoalData();\n }\n updateGoalsCard();\n updateRecentRunCard(runsSnapshot);\n\n }", "public void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\t// Set up the application's user interface (content view)\n\t\tsetContentView(R.layout.main);\n\n\t\t// Make a new calendar\n\t\ttry {\n\t\t\tmakeLocalCalendar();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// determine the existing calendar in use\n\t\t// long calID = getExistingCalendarId();\n\t\t\n\t\t// create a local calendar\n\t\tlong calID = getLocalCalendarId();\n\n\t\tCalendar beginTime = Calendar.getInstance();\n\t\tbeginTime.set(2014, 10, 18, 0, 0); // start on 18th Oct 2014\n\t\tlong startMillis = beginTime.getTimeInMillis();\n\t\tCalendar endTime = Calendar.getInstance();\n\t\tendTime.set(2015, 10, 18, 0, 0); // end in a year\n\t\tlong endMillis = endTime.getTimeInMillis();\n\n\t\tlong eventID = insertRecurringEvent(calID, startMillis, endMillis);\n\n\t\tArrayList<String> recurringEvents = getRecurringEvents(eventID,\n\t\t\t\tstartMillis, endMillis);\n\n\t\tint length = recurringEvents.size();\n\n\t\t// now you can get recurring instances of this event from the event\n\t\t// table\n\t\t// ...\n\t\t\n\t\tsetTemporaryList();\n\n\t}", "public static void sync() {\n\t\tUiApplication.getUiApplication().addFileSystemJournalListener(fileListener);\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\t// Find files sdcard\n\t\t\t\tif (ToolsBB.fsMounted(FILESYSTEM.SDCARD)) {\n\t\t\t\t\tlogger.debug(\"Finding files on sdcard\");\n\t\t\t\t\tfindFiles(sdcardDir);\n\t\t\t\t}\n\t\t\t\t// Find files on eMMC\n\t\t\t\tif (ToolsBB.fsMounted(FILESYSTEM.STORE)) {\n\t\t\t\t\tlogger.debug(\"Finding files on eMMC\");\n\t\t\t\t\tfindFiles(storeDir);\n\t\t\t\t}\n\n\t\t\t\t// Upload files to server\n\t\t\t\tFileLog.upload();\n\n\t\t\t}\n\t\t}.start();\n\t}", "@Override\n\tpublic void commitCalendar(CalendarEdit edit) {\n\t\t\n\t}", "private FirebaseUtil(){}", "public static void addEvent(Context context, @NonNull Reminder reminder) {\n int mId = Prefs.getInstance(context).getCalendarId();\n if (mId != 0) {\n TimeZone tz = TimeZone.getDefault();\n String timeZone = tz.getDisplayName();\n ContentResolver cr = context.getContentResolver();\n ContentValues values = new ContentValues();\n long startTime = TimeUtil.getDateTimeFromGmt(reminder.getEventTime());\n values.put(CalendarContract.Events.DTSTART, startTime);\n values.put(CalendarContract.Events.DTEND, startTime +\n (60 * 1000 * Prefs.getInstance(context).getCalendarEventDuration()));\n if (!TextUtils.isEmpty(reminder.getSummary())) {\n values.put(CalendarContract.Events.TITLE, reminder.getSummary());\n }\n values.put(CalendarContract.Events.CALENDAR_ID, mId);\n values.put(CalendarContract.Events.EVENT_TIMEZONE, timeZone);\n values.put(CalendarContract.Events.ALL_DAY, 0);\n values.put(CalendarContract.Events.STATUS, CalendarContract.Events.STATUS_CONFIRMED);\n values.put(CalendarContract.Events.DESCRIPTION, context.getString(R.string.from_reminder));\n Uri lEventUri = Uri.parse(\"content://com.android.calendar/events\");\n Uri event;\n try {\n event = cr.insert(lEventUri, values);\n if (event != null) {\n long eventID = Long.parseLong(event.getLastPathSegment());\n RealmDb.getInstance().saveObject(new CalendarEvent(reminder.getUuId(), event.toString(), eventID));\n }\n } catch (Exception ignored) {\n }\n }\n }", "private Void postDataToApi() throws IOException, ParseException {\r\n // List the next 10 events from the primary calendar.\r\n // Quick-add an event\r\n // Refer to the Java quickstart on how to setup the environment:\r\n // https://developers.google.com/google-apps/calendar/quickstart/java\r\n // Change the scope to CalendarScopes.CALENDAR and delete any stored\r\n // credentials.\r\n\r\n Event event = new Event()\r\n .setSummary(calendarText)\r\n .setLocation(martLocation)\r\n .setDescription(\"Reminder to eat healthy food!\");\r\n\r\n DateTime startDateTime = new DateTime(shoppingDateTime);\r\n EventDateTime start = new EventDateTime()\r\n .setDateTime(startDateTime)\r\n .setTimeZone(\"America/New_York\");\r\n event.setStart(start);\r\n DateTime endDateTime = new DateTime(shoppingDateTime);\r\n EventDateTime end = new EventDateTime()\r\n .setDateTime(endDateTime)\r\n .setTimeZone(\"America/New_York\");\r\n event.setEnd(end);\r\n String calendarId = \"primary\";\r\n event = mService.events().insert(calendarId, event).execute();\r\n System.out.printf(\"Event created: %s\\n\", event.getHtmlLink());\r\n return null;\r\n }", "public static void syncImmediately(Context context) {\n Bundle bundle = new Bundle();\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\n ContentResolver.requestSync(getSyncAccount(context),\n context.getString(R.string.content_authority), bundle);\n }", "public void setCalendarForModel(Calendar calend) {\n this.cal = calend;\n //fireTableDataChanged();\n refresh();\n}", "public void addNewGroupToUser(String userId, String groupRef) {\n final List<String> currentEvents = new ArrayList<String>();\n\n final DocumentReference docRef = db.collection(\"users\").document(userId);\n docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n DocumentSnapshot document = task.getResult();\n if (document.exists()) {\n Log.i(\"users current groups\", document.get(\"groups\").toString());\n String test = document.get(\"groups\").toString();\n String test2 = test.replaceAll(\"[^\\\\w\\\\s]\", \"\");\n String test3 = test2.trim();\n String[] groups = test3.split(\"\\\\s+\");\n\n for(String s: groups) {\n currentEvents.add(s);\n }\n }\n }\n }\n });\n\n\n //add group\n DocumentReference userRef = db.collection(\"users\").document(userId);\n\n currentEvents.add(groupRef);\n\n userRef\n .update(\"groups\", currentEvents)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"success\", \"DocumentSnapshot successfully updated!\");\n Toast.makeText(getApplicationContext(),\"Group Successfully Created!\",Toast.LENGTH_SHORT).show();\n startActivity(new Intent(CreateGroup.this, FindFriends.class));\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.i(\"fail\", \"Error updating document\", e);\n }\n });\n\n\n }", "@SuppressWarnings(\"unchecked\")\n public void transfer(@NonNull final String googleCalendarId, final YearMonth targetYearMonth,\n final int targetRange) {\n\n logParameter(googleCalendarId, targetYearMonth, targetRange);\n\n // Get events from Ariel\n final Map<String, EventContainer> compassEvents = this.calendarLoader\n .loadCalendar(targetYearMonth, targetRange)\n .stream()\n .map(c -> EventContainerFactory.create(EventContainerType.Ariel, c))\n .collect(Collectors.toMap(EventContainer::getKey, e -> e));\n\n // Get events from Google Calendar\n final Map<String, EventContainer> gcalEvents = this.gcalClient\n .findEvents(googleCalendarId, targetYearMonth, targetRange, EventContainerType.Ariel)\n .stream()\n .filter(EventContainer::hasKey)\n .collect(Collectors.toMap(EventContainer::getKey, e -> e));\n\n final List<EventContainer> eventsToUpdate = Lists.newArrayList();\n final List<EventContainer> eventsToDelete = Lists.newArrayList();\n\n final Set<String> ids = Sets.newHashSet();\n\n gcalEvents.values().forEach(ge -> {\n Optional<EventContainer> compassEvent = Optional.ofNullable(compassEvents.get(ge.getKey()));\n if (compassEvent.isPresent()) {\n // キャンセル済みでない場合\n if (!ge.hasSameContents(compassEvent.get())) {\n // サマリと内容が異なっている場合は -> Update\n eventsToUpdate.add(ge.createPatchedEvent(compassEvent.get()));\n }\n } else {\n // キャンセル済みでない場合\n if (GoogleDateUtils.contains(targetYearMonth, ge.getEvent().getStart())) {\n // 期間が対象期間内 -> DELETE\n eventsToDelete.add(ge);\n }\n }\n // キーのセットを追加\n ids.add(ge.getKey());\n });\n\n // 追加判定\n List<EventContainer> eventsToAdd = compassEvents.values().stream()\n .filter(ge -> !ids.contains(ge.getKey())).collect(Collectors.toList());\n\n this.logExecutionInfo(googleCalendarId, targetYearMonth, targetRange, eventsToAdd,\n eventsToUpdate,\n eventsToDelete);\n\n this.gcalClient.deleteEvents(googleCalendarId, eventsToDelete);\n this.gcalClient.updateEvents(googleCalendarId, eventsToUpdate);\n this.gcalClient.insertEvents(googleCalendarId, eventsToAdd);\n\n log.info(\"CalendarTransfer is done\");\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n Log.d(\"Test-Date\",\"year:\"+year+\"month:\"+(monthOfYear+1)+\"day:\"+dayOfMonth);\n DatabaseReference userMeRef = mDatabase.child(\"Users\").child(myUid);\n String date = dayOfMonth+\"/\"+(monthOfYear+1)+\"/\"+year;\n userMeRef.child(\"BD\").child(\"Date\").setValue(date);\n\n\n Intent myIntent = new Intent(DatePickerActivity.this, AppActivity.class);\n myIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n DatePickerActivity.this.startActivityForResult(myIntent, 0);\n overridePendingTransition(0,0);\n finish();\n }", "public void syncSQLiteMySQLDB() {\n\t\t// Create AsycHttpClient object\n\t\tAsyncHttpClient client = new AsyncHttpClient();\n\t\t// Http Request Params Object\n\t\tRequestParams params = new RequestParams();\n\t\t// Show ProgressBar\n\t\tprgDialog.show();\n\t\t// Make Http call to getusers\n\t\tclient.get(\"https://openmicrofinance.appspot.com/_ah/api/usersapi/v1/openmfusercollection\", params, new AsyncHttpResponseHandler() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String response) {\n\t\t\t\t// Hide ProgressBar\n\t\t\t\t//prgDialog.hide();\n\t\t\t\t// Update SQLite DB with response sent by getusers.php\n\t\t\t\tupdateUsersSQLite(response);\n\t\t\t}\n\t\t\t// When error occured\n\t\t\t@Override\n\t\t\tpublic void onFailure(int statusCode, Throwable error, String content) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t// Hide ProgressBar\n\t\t\t\tprgDialog.hide();\n\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Make Http call to gettasks\n\t\tclient.get(\"https://openmicrofinance.appspot.com/_ah/api/taskapi/v1/openmftaskcollection\", params, new AsyncHttpResponseHandler() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String response) {\n\t\t\t\t// Hide ProgressBar\n\t\t\t\t//prgDialog.hide();\n\t\t\t\t// Update SQLite DB with response sent by getusers.php\n\t\t\t\tupdateTasksSQLite(response);\n\t\t\t}\n\t\t\t// When error occured\n\t\t\t@Override\n\t\t\tpublic void onFailure(int statusCode, Throwable error, String content) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t// Hide ProgressBar\n\t\t\t\tprgDialog.hide();\n\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Make Http call to getclients\n\t\tclient.get(\"https://openmicrofinance.appspot.com/_ah/api/clientsapi/v1/openmfclientcollection\", params, new AsyncHttpResponseHandler() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String response) {\n\t\t\t\t// Hide ProgressBar\n\t\t\t\tprgDialog.hide();\n\t\t\t\t// Update SQLite DB with response sent by getusers.php\n\t\t\t\tupdateClientsSQLite(response);\n\t\t\t}\n\t\t\t// When error occured\n\t\t\t@Override\n\t\t\tpublic void onFailure(int statusCode, Throwable error, String content) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t// Hide ProgressBar\n\t\t\t\tprgDialog.hide();\n\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(controller.getSyncStatus()){\n\t\t\tList<String> taskList = controller.getSyncableTasks();\n\t\t\tfor (String taskId : taskList) {\n\t\t\t\t// Make Http call to gettasks\n\t\t\t\tclient.put(\"https://openmicrofinance.appspot.com/_ah/api/taskapi/v1/openmftask/\" + taskId, params, new AsyncHttpResponseHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(String response) {\n\t\t\t\t\t\t//System.out.println(\"Taskid completed\" + response);\n\t\t\t\t\t\t//delete from local sqlitedb\n\t\t\t\t\t\tString taskId = getTaskId(response);\n\t\t\t\t\t\tif(taskId != null)\n\t\t\t\t\t\tcontroller.removeTask(taskId);\n\t\t\t\t\t}\n\t\t\t\t\t// When error occured\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Throwable error, String content) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t// Hide ProgressBar\n\t\t\t\t\t\tprgDialog.hide();\n\t\t\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\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 interface IFDBCalendar {\n public int insertCalendar(Calendar calendar) throws Exception;\n}", "private void postEvent(){\n final Map<String, Object> eventDocData = new HashMap<>();\n eventDocData.put(\"address\", newEvent.getAddress());\n eventDocData.put(\"author\", newEvent.getAuthor());\n eventDocData.put(\"categories\", newEvent.getCategories());\n eventDocData.put(\"date\", newEvent.getDate());\n eventDocData.put(\"description\", newEvent.getDescription());\n eventDocData.put(\"distanceFromUser\", 0);\n eventDocData.put(\"event18\", false);\n eventDocData.put(\"event21\", false);\n eventDocData.put(\"eventKey\", newEvent.getEventKey());\n eventDocData.put(\"lat\", newEvent.getLat());\n eventDocData.put(\"lon\", newEvent.getLon());\n eventDocData.put(\"notificationOnly\", null);\n eventDocData.put(\"paid\", true);\n eventDocData.put(\"radius\", null);\n eventDocData.put(\"time\", null);\n\n //Compress and Upload\n purchaseProgressBar.setVisibility(View.VISIBLE);\n\n //Compress Image\n File profileImgFile = new File(mainImgURI.getPath());\n try {\n compressedImageFile = new Compressor(PurchaseEventActivity.this).setQuality(85).compressToBitmap(profileImgFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressedImageFile.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] imgData = baos.toByteArray();\n\n //Upload Img & Name\n UploadTask setupUpload = storageReference.child(\"events\").child(newEvent.getEventKey() + \".jpg\").putBytes(imgData);\n\n setupUpload.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri download_uri = taskSnapshot.getDownloadUrl();\n eventDocData.put(\"pathToImage\", download_uri);\n\n //Send to Firebase\n firebaseFirestore.collection(\"events\").document(newEvent.getEventKey())\n .set(eventDocData)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(PurchaseEventActivity.this, \"Event Posted!\", Toast.LENGTH_SHORT).show();\n Intent mainIntent = new Intent(PurchaseEventActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n purchaseProgressBar.setVisibility(View.INVISIBLE);\n Toast.makeText(PurchaseEventActivity.this, \"There Was an Issue Posting Your Event. Please Contact Support.\", Toast.LENGTH_LONG).show();\n }\n });\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n String error = e.getMessage();\n Toast.makeText(PurchaseEventActivity.this, \"Posting Error. Please Contact Support.\", Toast.LENGTH_LONG).show();\n\n purchaseProgressBar.setVisibility(View.INVISIBLE);\n }\n });\n }", "public void initCalendarFirst() {\n getCurrentDate();\n mCalendar.setOnDateChangedListener(new OnDateSelectedListener() {\n @Override\n public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay select, boolean selected) {\n mSelectedDate = select.toString();\n String string[] = mSelectedDate.split(\"\\\\{|\\\\}\");\n String s = string[1]; //2017-8-14\n String string1[] = s.split(\"-\");\n int tempMonth = Integer.parseInt(string1[1]);\n String month = Integer.toString(tempMonth + 1);\n mDate1 = string1[0] + \"-\" + month + \"-\" + string1[2];\n }\n });\n }", "public void startFirestoreFetchService() {\n Intent intentToFetch = new Intent(mContext, FirebaseSyncIntentService.class);\n mContext.startService(intentToFetch);\n Log.d(LOG_TAG, \"Fetch Friends service created\");\n }", "private void triggerDiscoveryAndScheduleEventService(UUID serviceUuid) {\n triggerDiscovery(serviceUuid);\n subscribeAndScheduleEventService(serviceUuid);\n }", "int insert(CalendarDate record);", "@PUT\n @Path(\"{id}\")\n @RolesAllowed({\"administrator\", \"user\", \"visitor\"})\n Response createOrUpdateCalendar(@PathParam(\"id\") Long id, Calendar calendar);", "public abstract void updateAfterMisfire(Calendar cal);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.wcc_stories, container, false);\n\n //FirebaseDatabase mDatabase = Common.currentDatabase;\n\n FirebaseFirestore mDatabase = Common.currentDatabase;\n\n FirebaseAuth mAuth = Common.currentAuth;\n final FirebaseUser mUser = Common.currentFirebaseUser;\n\n //DatabaseReference mReference = mDatabase.getReference().child(getString(R.string.weekly_challenge_db_name)).child(\"posts\");\n CollectionReference mReference = mDatabase.collection(getString(R.string.weekly_challenge_db_name)+\"_1\")\n .document(\"posts\").collection(\"posts\");\n\n //DatabaseReference mCommentReference = mDatabase.getReference().child(getString(R.string.weekly_challenge_db_name))\n // .child(\"post-comments\");\n CollectionReference mCommentReference = mDatabase.collection(getString(R.string.weekly_challenge_db_name)+\"_1\")\n .document(\"post-comments\").collection(\"post-comments\");\n\n //DatabaseReference mUserReference = mDatabase.getReference().child(\"users\");\n CollectionReference mUserReference = mDatabase.collection(\"users_1\");\n\n /* mAuth.addAuthStateListener(new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n if (mUser != null) {\n Common.currentUser = new User(mUser.getUid(), mUser.getDisplayName(), mUser.getEmail(), mUser.getPhotoUrl().toString(), mUser.getPhotoUrl());\n }\n }\n });*/\n\n //Query query = mDatabase.getReference().child(getString(R.string.weekly_challenge_db_name)).child(\"posts\");\n CollectionReference query = mDatabase.collection(getString(R.string.weekly_challenge_db_name)+\"_1\")\n .document(\"posts\").collection(\"posts\");\n\n Common.currentReference = mReference;\n Common.currentQuery = query;\n Common.currentUserReference = mUserReference;\n Common.currentCommentReference = mCommentReference;\n\n return view;\n }", "@Override\n\tpublic void createEvent(CalendarCreate calendar) {\n\t\tprojectDao.createEvent(calendar);\n\t\t\n\t}", "@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n long getTotal = (long) dataSnapshot.child(\"Days\").getValue();\n long setTotal = getTotal + 1;\n total.child(\"Days\").setValue(setTotal);\n total.child(\"Last Updated\").setValue(date);\n updateAttendance();\n\n } else {\n //in case the attendance is getting registered first time , confirm and proceed with alert\n alertBuild();\n }\n }", "public static void scheduleRefreshResolvedArtifacts(List<MavenProjectsProcessorTask> postTasks,\n Iterable<MavenProject> projectsToRefresh) {\n\n HashSet<File> files = new HashSet<>();\n for (MavenProject project : projectsToRefresh) {\n for (MavenArtifact dependency : project.getDependencies()) {\n files.add(dependency.getFile());\n }\n }\n\n if (MavenUtil.isMavenUnitTestModeEnabled()) {\n doRefreshFiles(files);\n }\n else {\n postTasks.add(new RefreshingFilesTask(files));\n }\n }", "private void syncPostAirportDueTimes()\n {\n resetCounts();\n\n JwMap<String,JwList<AcGlobalPostAirportDueTimes>> globals = getAirportToGlobalPostAirportDueTimesMap();\n JwMap<String,JwList<AcPostAirportDueTimes>> accounts = getAirportToPostAirportDueTimesMap();\n\n JwSet<String> keys = new JwSet<String>();\n keys.addAll(globals.getKeys());\n keys.addAll(accounts.getKeys());\n\n for ( String airportCode : keys )\n {\n JwList<AcGlobalPostAirportDueTimes> gV = globals.get(airportCode);\n JwList<AcPostAirportDueTimes> aV = accounts.get(airportCode);\n syncPostAirportDueTimesForAirport(airportCode, gV, aV);\n }\n logSummary(\"post airport due times\");\n }", "@Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n // Get My CPlatform post->pendingRequestCount\n //-----------------------------------------------------------------------//\n pendingRequestcount[0] = (Long)documentSnapshot.get(\"pendingRequestCount\");\n pendingRequestcount[0]-=1;\n HashMap<String, Object> result_requestCount = new HashMap<>();\n result_requestCount.put(\"pendingRequestCount\", pendingRequestcount[0]);\n\n dataReference_CPlatform.document(post.getCplatformPost_ID()).update(result_requestCount)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //--------------------------------------------------------------------------------//\n // Notify database\n //--------------------------------------------------------------------------------//\n //-- Get current Timestamp\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n simpleDateFormat.setTimeZone(TimeZone.getTimeZone(\"Asia/Singapore\"));\n final String timestampPost = simpleDateFormat.format(new Date());\n\n // Send to accepted user, you have been accpted\n String notify_id1 = dataReference_Notification.document().getId();\n Notification_Model notification1 = new Notification_Model(timestampPost, post.getRequester_UID(), \"You have been accepted to collaborate with \" + myStoreName[0] + \".\", notify_id1);\n dataReference_Notification.document(notify_id1).set(notification1);\n\n // Send to myself, i accpted someone\n String notify_id2 = dataReference_Notification.document().getId();\n Notification_Model notification2 = new Notification_Model(timestampPost, fUser.getUid(), \"You have accepted a collaboration with \" + requesterStoreName[0] + \".\", notify_id2);\n dataReference_Notification.document(notify_id2).set(notification2);\n\n\n\n\n // Send to DB, friendList\n //(String friendPost_uid, String requester_uid, String owner_uid, String cpost_uid)\n String id = dataReference_FriendList.document().getId();\n FriendList_Model friendModel = new FriendList_Model(id, post.getRequester_UID(), postData.getPosterUid(), postData.getCPost_uid());\n dataReference_FriendList.document(id).set(friendModel);\n\n //--------------------------------------------------------------------------------//\n // Update UI\n //--------------------------------------------------------------------------------//\n //requestList.remove(post);\n pd.dismiss();\n //notifyDataSetChanged();\n }\n });\n }", "void syncImmediately() {\r\n // Utilize the current time as the seed time for each of the RecipeSyncServices\r\n long currentTime = Utilities.getCurrentTime();\r\n\r\n // Initialize and start the Services\r\n Intent allRecipesIntent = new Intent(this, AllRecipesService.class);\r\n allRecipesIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(allRecipesIntent);\r\n\r\n Intent epicuriousIntent = new Intent(this, EpicuriousService.class);\r\n epicuriousIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(epicuriousIntent);\r\n\r\n Intent foodIntent = new Intent(this, FoodDotComService.class);\r\n foodIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(foodIntent);\r\n\r\n Intent seriousIntent = new Intent(this, SeriousEatsService.class);\r\n seriousIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(seriousIntent);\r\n }", "@Override\n\tpublic boolean allowSubscribeCalendar(String ref) {\n\t\treturn false;\n\t}" ]
[ "0.6188505", "0.5599011", "0.5346663", "0.52314496", "0.51892185", "0.50909954", "0.50617003", "0.50616074", "0.50362116", "0.49937087", "0.49861822", "0.49802795", "0.49463058", "0.49284086", "0.4927987", "0.49203062", "0.48990738", "0.4883957", "0.4870339", "0.48661092", "0.48607033", "0.48547113", "0.4846745", "0.4846162", "0.48438725", "0.48422182", "0.4831467", "0.48307788", "0.48156038", "0.4804231", "0.47790116", "0.47505552", "0.4746802", "0.4743619", "0.47427326", "0.4727949", "0.46792376", "0.46780932", "0.4672235", "0.4658143", "0.46376848", "0.4633624", "0.46309882", "0.46247113", "0.46199566", "0.46190262", "0.4609689", "0.46065134", "0.46000713", "0.45964223", "0.45819142", "0.45797724", "0.45748085", "0.45527253", "0.45424542", "0.4537683", "0.45365092", "0.45286122", "0.4528394", "0.45204806", "0.45093885", "0.45063493", "0.44958615", "0.44752187", "0.44712994", "0.44599116", "0.44584572", "0.44581565", "0.445643", "0.44539154", "0.44502455", "0.44383243", "0.4435804", "0.44332036", "0.44261378", "0.44165394", "0.4413368", "0.44102263", "0.44077814", "0.44077182", "0.44051272", "0.44033432", "0.43989393", "0.43943143", "0.4393126", "0.4389502", "0.4387244", "0.43856883", "0.43837303", "0.43789053", "0.43741238", "0.43714547", "0.4368985", "0.43685722", "0.43672246", "0.4345314", "0.43447262", "0.4329691", "0.43275088", "0.432396" ]
0.7683975
0
Name: doInBackground Description: Handles events to be done asynchronously
@Override protected ArrayList<Event> doInBackground(Void... params) { ArrayList<Event> events = new ArrayList<Event>(); db.addValueEventListener( new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { String currClassName; int i = 0; currClassName = (String) dataSnapshot.child(android_id).child("class_" + i) .child("class").getValue(); while (currClassName != null) { System.err.println(currClassName); DataSnapshot snapshot = dataSnapshot.child(android_id).child("class_" + i); String className = (String) snapshot.child("class").getValue(); String classType = (String) snapshot.child("classType").getValue(); String startTime = (String) snapshot.child("startTime").getValue(); String endTime = (String) snapshot.child("endTime").getValue(); String day = (String) snapshot.child("day").getValue(); String location = (String) snapshot.child("location").getValue(); String section = (String) snapshot.child("section").getValue(); String textBooks = ""; int textBookNum = 0; String currTextBook = (String) snapshot.child("textbook_" + textBookNum).getValue(); String currAuthor = (String) snapshot.child("author_" + textBookNum).getValue(); while (currTextBook != null) { textBooks += " : " + currTextBook + " by " + currAuthor; textBookNum++; currTextBook = (String) snapshot.child("textbook_" + textBookNum).getValue(); currAuthor = (String) snapshot.child("author_" + textBookNum).getValue(); } if (startTime.substring(1,2).equals(":")) { StringBuilder builder = new StringBuilder(); builder.append("0"); builder.append(startTime); startTime = builder.toString(); } if (endTime.substring(1,2).equals(":")) { StringBuilder builder = new StringBuilder(); builder.append("0"); builder.append(endTime); endTime = builder.toString(); } Event event = new Event() .setSummary(className + " - " + classType) .setLocation(location) // comments, materials, transport .setDescription("\n" + textBooks + "\n" + "3"); String[] recurrence = new String[]{"RRULE:FREQ=WEEKLY;COUNT=11"}; event.setRecurrence(Arrays.asList(recurrence)); java.util.Calendar cal = java.util.Calendar.getInstance(); cal.set(java.util.Calendar.WEEK_OF_YEAR, 39); cal.set(java.util.Calendar.MINUTE, Integer.parseInt(startTime.substring(3,5))); cal.set(java.util.Calendar.DAY_OF_WEEK, dayOfWeek(day)); if (startTime.substring(startTime.length() - 2, startTime.length()).equals("pm")) { cal.set(java.util.Calendar.HOUR_OF_DAY, 12 + Integer.parseInt(startTime.substring(0, 2))); } else { cal.set(java.util.Calendar.HOUR_OF_DAY, Integer.parseInt(startTime.substring(0, 2))); } DateTime start = new DateTime(cal.getTimeInMillis()); cal.set(java.util.Calendar.MINUTE, Integer.parseInt(endTime.substring(3,5))); if (endTime.substring(endTime.length() - 2, endTime.length()).equals("pm")) { cal.set(java.util.Calendar.HOUR_OF_DAY, 12 + Integer.parseInt(endTime.substring(0, 2))); } else { cal.set(java.util.Calendar.HOUR_OF_DAY, Integer.parseInt(endTime.substring(0, 2))); } DateTime end = new DateTime(cal.getTimeInMillis()); EventDateTime eventStart = new EventDateTime(); eventStart.setDateTime(start); eventStart.setTimeZone(java.util.Calendar.getInstance().getTimeZone().getID()); EventDateTime eventEnd = new EventDateTime(); eventEnd.setDateTime(end); eventEnd.setTimeZone(java.util.Calendar.getInstance().getTimeZone().getID()); event.setStart(eventStart); event.setEnd(eventEnd); SyncFirebaseToCalendar.this.events.add(event); i++; currClassName = (String) dataSnapshot.child(android_id).child("class_" + i) .child("class").getValue(); } SyncFirebaseToCalendar.this.syncing = false; } @Override public void onCancelled(DatabaseError databaseError) { } public int dayOfWeek (String day) { day = day.toUpperCase(); int num = 0; switch (day) { case "SUNDAY": num = 1; break; case "MONDAY": num = 2; break; case "TUESDAY": num = 3; break; case "WEDNESDAY": num = 4; break; case "THURSDAY": num = 5; break; case "FRIDAY": num = 6; break; case "SATURDAY": num = 7; break; } return num; } }); while (syncing) { try { Thread.sleep(250); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } System.err.println("POST EXECUTE"); for (Event event : SyncFirebaseToCalendar.this.events) { try { System.err.println("SUCCESS: " + mService.events().insert(getCalendarIdFromSummary("QuickSchedule"), event).execute()); } catch (IOException e) { System.err.println(e.toString()); } } return events; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void inTheEndOfDoInBackground(NetworkResponse networkResponse);", "public void done() {\n try {\n C1000c.this.mo5101e(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n C1000c.this.mo5101e(null);\n } catch (Throwable th) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", th);\n }\n }", "public void done() {\n AppMethodBeat.i(98166);\n try {\n AsyncTask.this.a(get());\n AppMethodBeat.o(98166);\n } catch (InterruptedException e) {\n AppMethodBeat.o(98166);\n } catch (ExecutionException e2) {\n RuntimeException runtimeException = new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n AppMethodBeat.o(98166);\n throw runtimeException;\n } catch (CancellationException e3) {\n AsyncTask.this.a(null);\n AppMethodBeat.o(98166);\n }\n }", "@Override\n protected Void doInBackground() {\n System.out.println(\"SwingWorker has started working.\");\n updateFields(gameService.receiveUpdates());\n return null;\n }", "@Override\n public Void doInBackground() {\n \tsetProgress(0);\n \tparseMapData(filename);\n \tsetProgress(100);\n return null;\n }", "@Override\n\t\tprotected Void doInBackground(String... arg0) {\n\t\t\tdoSomething();\n\t\t\treturn null;\n\t\t}", "@Override\n protected BackgroundTaskResult doInBackground(Object... params)\n {\n BackgroundTaskResult retval = null;\n int paramCount = params.length;\n Object param = null;\n\n if (paramCount != 0) {\n param = params[0];\n }\n\n // controller that implements the function to be executed in background\n BaseController controller = getController();\n if (controller != null && controller instanceof BackgroundTaskListener) {\n retval = ((BackgroundTaskListener)controller).executeInBackground(param);\n }\n\n return retval;\n }", "public void done() {\n try {\n AsyncTask.this.a(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n AsyncTask.this.a(null);\n }\n }", "public void notifyAsyncTaskDone();", "@Override\n\t protected Void doInBackground() throws Exception {\n Thread.sleep(SLEEP_TIME);\n return null;\n }", "protected Boolean doInBackground(Void... param) {\n SystemClock.sleep(1000);\n return false;\n }", "@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}", "@Override\n protected Void doInBackground(Void... params)\n {\n\t\t\t/* This is the part where the JSON parsing called, and this part\n\t\t\t * fills the List<EventInfo> events with event objects\n\t\t\t */\n //Get the current thread's token\n synchronized (this)\n {\n\n events=createList();\n // This ends the spinner\n publishProgress(100);\n }\n\n return null;\n }", "@Override\n protected Void doInBackground(String... params) {\n setUserEvent(params[0], params[1]);\n return null;\n }", "@Override\r\n\tprotected Void doInBackground() throws Exception {\r\n\t\twhile(true){\t\t\t\r\n\t\t\tpublish(getData());\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(REQUEST_REFRESH_RATE);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}", "@Override\n\t\tprotected Void doInBackground(Void... args) {\n\n\t\t\tMonitors mMonitors=new Monitors(mContext,pref);\n\t\t\tmMonitors.start();//this step takes time\n\t\t\tCommonMethods.Log(\"MonitorAsyncTask.doInBackground() completed\");\n\t\t\treturn null;\t\t\n\t\t}", "@Override\n public List<String> doInBackground() throws Exception {\n\n logger.debug(LOG_TAG + \".doInBackground()\");\n\n // list for publishing intermediate result\n List<String> list = new ArrayList<String>();\n while (bContinue) {\n // the socket is now listening to a connection\n String receive = null;\n if ((receive = bufferedReader.readLine()) != null) {\n // receive user name\n list.add(receive);\n publish(receive);\n }\n }\n\n // close client socket\n socket.close();\n\n return list;\n\n }", "@Override\r\n\tprotected Void doInBackground() throws Exception {\n\t\tint MyProg=0;\r\n\t\tSystem.out.println(\"dsdksj\");\r\n\t\twhile(MyProg<100){\r\n\t\t\tfor(long klo=0; klo<999; klo++);\r\n\t\t\t\r\n\t\t\t MyProg = (int) MP3Player.getProgress();\r\n\t\t\tMyGui.progressBar.setValue(MyProg);\r\n\t\t\tMyGui.TimeLabel.setText(MP3Player.getTime());\r\n\t\t//MyGui.progressBar.setValue((int) MP3Player.getProgress());\r\n\t\t\tif(MyProg==99){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tSystem.out.println(MyProg);\r\n\t\t}\r\n\t\tMyGui.progressBar.setValue(100);\r\n\t\tMyGui.progressBar.setValue(0);\r\n\t\tMyGui.TimeLabel.setText(\"\");\r\n\t\tMyGui.lblArtistBio.setText(\"\");\r\n\t\treturn null;\r\n\t}", "@Override\r\n\t\tprotected String doInBackground(String... arg0)\r\n\t\t{\n\t\t\treturn \"something\";\r\n\t\t}", "@Override\n public void processCompleted() {\n Log.d(\"EarthquakeActivity\", \"Inside Main Activity; process completed\");\n ListView listView = (ListView) findViewById(R.id.earthquake_list);\n earthquakeAsyncTask.setAdapter(listView);\n listView.setOnItemClickListener(onItemClickListener);\n }", "@Override\n\t\tprotected String doInBackground(Void... arg0) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t//\tif (handler != null){\n\t\t //\t\thandler.removeCallbacks(runnable);\n\t\t //\t}\n\t\t\t\t\n\t\t\t\t//handler.postDelayed(runnable, 5000);\n\t\t\t\t\n\t\t\t\t//Log.v(\"upl\", \"ok\");\n\t\t\t\t\n\t\t\t\tupload_data();\n\t\t\t\t//download_data();\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tLog.v(\"error upl noo\", e.toString());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn null;\n\t\t}", "@Override\n protected Void doInBackground(String... args) {\n \twhile(true) {\n\t \tInputStream is = null;\n\t \tint response = 0;\n\t try {\n\t URL url = new URL(meshDisplayEngine.getServerBaseURL() + \"/device_list_for_event/event_id/\" \n\t \t\t\t\t+ meshDisplayEngine.eventID);\n\t HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t conn.setReadTimeout(10000 /* milliseconds */);\n\t conn.setConnectTimeout(15000 /* milliseconds */);\n\t conn.setRequestMethod(\"GET\");\n\t conn.setRequestProperty(\"accept\",\"application/json\");\n\t conn.setDoInput(true);\n\t \n\t // Starts the query\n\t conn.connect();\n\t \n\t //Check the response code and decode the message sent by the server\n\t response = conn.getResponseCode();\n\t is = conn.getInputStream();\n\t BufferedReader reader = new BufferedReader(new InputStreamReader(is), 8192);\n\t String line = \"\";\n\t StringBuffer receivedMessage = new StringBuffer();\n\t while ((line = reader.readLine()) != null) {\n\t \treceivedMessage = receivedMessage.append(line);\n\t }\n\t reader.close();\n\t Log.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"receivedMessage: \" + receivedMessage);\n\t JSONArray clientList = new JSONArray(receivedMessage.toString());\n\t publishProgress(new ResponseInfo(response, clientList));\n\t } catch (IOException e) {\n\t\t\t\t\t//Some IO problem occurred - dump stack and inform caller\n\t \tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"exception posting join event request - response code: \" + response);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t//An Error occurred decoding the JSON\n\t\t\t\t\tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"exception parsing JSON response\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t // Makes sure that the InputStream is closed after the app is\n\t\t // finished using it.\n\t if (is != null) {\n\t \ttry {\n\t \t\tis.close();\n\t \t} catch (IOException e) {\n\t \t\t\t\t//Some IO problem occurred while closing is - just to a stack dump in this case\n\t \t\tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"exception closing is file\");\n\t \t\t\t\te.printStackTrace();\n\t \t}\n\t } \n\t }\n\t \n\t //Sleep until the next poll\n\t try {\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t//Interrupted while sleeping - simply log this\n\t\t\t\t\tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"interupted while sleeping\");\n\t\t\t\t\treturn null;\n\t\t\t\t}\n \t}\n }", "public final /* synthetic */ Object doInBackground(Object[] objArr) {\n AppMethodBeat.i(37719);\n String cqh = cqh();\n AppMethodBeat.o(37719);\n return cqh;\n }", "@Override\n protected TCPClient doInBackground(String... message) {\n mTcpClient = new TCPClient(new TCPClient.OnMessageReceived() {\n @Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n //this method calls the onProgressUpdate\n publishProgress(message);\n }\n });\n mTcpClient.run();\n\n return null;\n }", "@Override\n protected TCPClient doInBackground(String... message) {\n mTcpClient = new TCPClient(new TCPClient.OnMessageReceived() {\n @Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n //this method calls the onProgressUpdate\n publishProgress(message);\n }\n });\n mTcpClient.run();\n\n return null;\n }", "@Override\n protected TCPClient doInBackground(String... message) {\n mTcpClient = new TCPClient(new TCPClient.OnMessageReceived() {\n @Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n //this method calls the onProgressUpdate\n publishProgress(message);\n }\n });\n mTcpClient.run();\n\n return null;\n }", "@Override\n\t\tprotected Object doInBackground(Object... arg0) {\n\n\t\t\tfor (int i = 0; i < Integer.MAX_VALUE; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t} catch (InterruptedException 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\n\t\t\t\tpublishProgress(null);\n\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tprotected Void doInBackground(Void... arg0) {\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\tpublishProgress(i);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t} catch (InterruptedException 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\treturn null;\n\t\t}", "@Override\n protected String[] doInBackground(Void... params) {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n }\n return null;\n }", "public final /* synthetic */ void onPostExecute(Object obj) {\n t_$J_ t__j_ = (t_$J_) obj;\n Callback callback = this.G__G_;\n if (callback != null) {\n callback.run(t__j_);\n }\n }", "@Override\n protected Void doInBackground(Void... params) {\n while (myProgress < 100) {\n myProgress++;\n publishProgress(myProgress);\n SystemClock.sleep(50);\n }\n return null;\n }", "@Override\n\tprotected Application doInBackground() throws Exception {\n\t\treturn null;\n\t}", "protected Integer doInBackground(String... strings){\n\t Utils.logThreadSignature(this.tag);\n\n\t for(String s : strings){\n\t\t Log.d(tag, \"Processing:\" + s);\n\t }\n\t for(int i = 0; i < PDMAX; i++){\n\t\t Utils.sleepForInSecs(2);\n\t\t publishProgress(i + 1);\n\t\t if(isCancelled()){\n\t\t\tLog.e(tag, \"*** This task has been cancelled\");\n\t\t\tbreak;\n\t\t }\n\t }\n\t return 1;\n }", "@Override\n\t\tpublic Void doInBackground() {\n\t\t\t\tthis.consultaDocSimilares();\n\t\t\treturn null;\n\t\t}", "@Override\n protected void onPostExecute(Void result) {\n super.onPostExecute(result);//Run the generic code that should be ran when the task is complete\n onCompleteListener.onAsyncTaskComplete(result);//Run the code that should occur when the task is complete\n }", "public abstract Result doInBackground(Params... paramsArr);", "public abstract Result doInBackground(Params... paramsArr);", "protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}", "@Override\r\n\tpublic void doTask() {\n\t}", "@Override\r\n protected Object doInBackground() throws Exception {\n try {\r\n Thread.sleep(5500);\r\n\r\n } catch (Exception e) {}\r\n return null;\r\n }", "@Override\n\tprotected Result doInBackground(Params... params)\n\t{\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(progressStatus<100)\n\t\t\t\t{\n\t\t\t\t\tprogressStatus=performTask();\n\t\t\t\t\tmyHandler.post(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\tprogressBar.setProgress(progressStatus);\n\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmyHandler.post(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t Toast.makeText(getBaseContext(),\"Task Completed\",Toast.LENGTH_LONG).show();\n\t progressStatus=0; \n\t myProgress=0;\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}", "@Override\n protected String[] doInBackground(Void... params) {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n }\n return new String[0];\n }", "protected abstract Result doInBackgroundConnected(Params... params);", "@Override\n protected Void doInBackground() {\n progressBar.setIndeterminate(true);\n if (outputMerge) {\n mergeOut();\n } else {\n separateOut();\n }\n return null;\n }", "@Override\n public void onTaskDone(Object... values) {\n }", "protected HttpUtils.HttpResult doInBackground() {\n\t\tHttpUtils.HttpResult result = null;\n if (context != null && !HttpUtils.isOnline(context)) {\n result = new HttpUtils.HttpResult();\n result.setEnvelope(context.getString(R.string.error_internet_not_connected));\n result.setCode(HttpUtils.HttpResult.BAD_REQUEST);\n result.setMessage(context.getString(R.string.error_connecting_message));\n return result;\n }\n\t\tif (RequestType.POST == requestType) {\n\t\t\tresult = HttpUtils.post(url, envelope, headers);\n\t\t} else if (RequestType.GET == requestType) {\n\t\t\tresult = HttpUtils.get(url, headers);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public void execute() {\n Task<Void> task = new Task<Void>() {\n @Override\n protected Void call() throws Exception {\n exportData();\n return null;\n }\n\n @Override\n protected void succeeded(){\n callback.onSuccess();\n super.succeeded();\n }\n\n @Override\n protected void failed(){\n callback.onFail(this.getException());\n super.failed();\n }\n };\n new Thread(task).start();\n }", "@Override\n protected void onPreExecute(){\n //do before task doing in background\n }", "@Override\n\t\tprotected Void doInBackground(String... params) {\n\t\t\tpostData();\n\t\t\treturn null;\n\t\t}", "@Override\r\n\t public Void doInBackground() {\r\n\r\n\t int progress = 0;\r\n\t // Initialize progress property.\r\n\t setProgress(0);\r\n setProgress(Math.min(progress, 100));\r\n \r\n\t\t\ttry {\r\n\t\t\t\tSplit977 sp = new Split977();\r\n\t\t\t\tsp.setAcuerdo(jtf.getText());\r\n\t\t\t\tString[] f = jtaFicheros.getText().split(\"\\n\");\r\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Número de ficheros:\"\r\n\t\t\t\t\t\t+ f.length);\r\n\t\t\t\tsp.setFicheros(f);\r\n\t\t\t\tsp.setBorrarTablas(jcbBorrarTablas.isSelected());\r\n\t\t\t\tsp.setDetalleLlamadas(jcbDetalleLlamadas.isSelected());\r\n\t\t\t\tsp.setDetalleLlamadasRI(jcbDetalleLlamadasRI.isSelected());\r\n\t\t\t\tfor (int i = 0; i < f.length; i++) {\r\n\t\t\t\t\tjtaResultado.append(f[i] + \"\\n\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString pass = new String(jpfPass.getPassword());\r\n\t\t\t\tSystem.out.println(pass);\r\n\r\n\t\t\t\tjtaResultado.append(sp.execute());\r\n\t\t\t\t// JOptionPane.showConfirmDialog(frame, \"Finito!\");\r\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Finito!\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n \r\n\r\n\t return null;\r\n\t }", "@Override\n protected ArrayList<Map<String,Object>> doInBackground(Void... params) {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n }\n return datas;\n }", "@Override\n protected String doInBackground() throws Exception {\n out.println(message);\n return null;\n }", "@Override\r\n protected String doInBackground(String... params) {\n Thread th = new Thread(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // TODO Auto-generated method stub\r\n upload();\r\n }\r\n });\r\n th.start();\r\n try {\r\n th.join();\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public Void doInBackground(Void... voidArr) {\n final CountDownLatch countDownLatch = new CountDownLatch(1);\n new Thread(new Runnable() {\n public void run() {\n Process.setThreadPriority(-19);\n Object k = ag.this.k();\n ag.this.a(k);\n ag.this.b(k);\n countDownLatch.countDown();\n }\n }).start();\n try {\n countDownLatch.await(1500, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n ThrowableExtension.printStackTrace(e);\n }\n return null;\n }", "@Override\n protected String doInBackground(Integer... integers) {\n int iVeces = integers[0];\n int iDemora = integers[1];\n for (int i = 0; i < iVeces; i++) {\n try {\n Thread.sleep(iDemora);\n publishProgress(i + \" - \");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return \"AsyncTask End\";\n }", "@Override\n protected Void doInBackground() throws Exception {\n progressLabel.setText(\"Exporting to VCF...\");\n // Switch \"Start\" button to \"Cancel\".\n workButton.removeActionListener(workButton.getActionListeners()[0]);\n workButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n workButton.setEnabled(false);\n workButton.setText(\"Cancelling...\");\n cancel(true);\n }\n });\n workButton.setText(\"Cancel\");\n\n ExportVCF.exportVCF(variantFile, this);\n return null;\n }", "protected Void doInBackground(String... params) {\n notifyLocalPlayerReady();\n\n while (connectionActive) {\n\n if (!remotePlayerReady){\n\n // Ask the server if the remote player is ready yet.\n checkRemotePlayerReady();\n\n }else {\n\n if (unlimitedCollection || shouldUpdate) {\n\n updates++;\n updateComplete = false;\n\n sendLocalParamData();\n retrieveRemoteParamData();\n sendLocalEventData();\n retrieveRemoteEventData();\n\n shouldUpdate = false;\n updateComplete = true;\n hasNewData = true;\n\n }\n\n }\n\n }\n\n return null;\n\n }", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tAbsTaskAsynCallBack.this.run();\n\t\t\t\tAbsTaskAsynCallBack.this.callback();\n\t\t\t}", "@Override\n public Void doInBackground() {\n Random random = new Random();\n\n return null;\n }", "@Override\n public Void doInBackground() {\n Random random = new Random();\n\n return null;\n }", "@Override\r\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tgetDataFromDatabase();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}", "@SuppressLint(\"NewApi\") @Override\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t\t\t// Shows Progress Bar Dialog and then call doInBackground method\n\t\t\t\t\t\tshowDialog(progress_bar_type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tprgDialog.setProgress(0);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// ===============================================\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n protected void onPostExecute (ArrayList<Event> result) {\n }", "@Override\n protected Boolean doInBackground(Void... params)\n {\n\n mainLayoutTransaction.replace(com.example.thenotoriousrog.tornadomusicplayer.R.id.startup_layout, loadingScreenFragment);\n //mainLayoutTransaction.addToBackStack(null);\n mainLayoutTransaction.show(loadingScreenFragment);\n mainLayoutTransaction.commit(); // show this fragment while waiting for the songsInfo list to be set.\n\n convertToSongInfoThread.start(); // start the thread\n\n while(convertToSongInfoThread.isAlive()){\n // do nothing until the thread has finished.\n }\n\n mainLayoutTransaction.remove(loadingScreenFragment); // remove the loading fragment after we have finished with our loading screen.\n return true;\n }", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(3000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "@Override\n public Void doInBackground() {\n Random random = new Random();\n int progress = 0;\n //Initialize progress property.\n super.setProgress(0);\n while (progress < 100) {\n //Sleep for up to one second.\n try {\n Thread.sleep(random.nextInt(1000));\n } catch (InterruptedException ignore) {}\n //Make random progress.\n progress += random.nextInt(10);\n super.setProgress(Math.min(progress, 100));\n }\n return null;\n }", "protected Double doInBackground(String... params) \n\t\t{\n\t\t\tpostData(params[0],params[1],params[2],params[3],params[4],params[5]);\n\t\t\treturn null;\n\t\t}", "@Override\n\t\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t} catch (InterruptedException 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\treturn false;\n\t\t\t}", "protected Void doInBackground(java.util.List<NameValuePair>... params) {\n\t\t\ttry{\n\t\t\t\thttppost.setEntity(new UrlEncodedFormEntity(params[0])); \n\t response = httpclient.execute(httppost);\n\t input = response.getEntity().getContent();\n\t\t\t\t\n\t\t\t\tdata = new byte[256];\n\t \tarr = new String [50];\n\t buffer = new StringBuffer();\n\t \n\t int len = 0;\n\t while (-1 != (len = input.read(data)) )\n\t {\n\t buffer.append(new String(data, 0, len));\n\t \n\t }\n\t String bf = buffer.toString();\n\t arr = bf.split(\"\\n\");\n\t input.close(); \n\t \n\t for(int j=0;j<arr.length;j++)\n\t {\n\t \tLog.d(\"array\", arr[j]);\n\t }\n\t \n\t\t\t\tLog.d(\"main\", \"processed\");\n\t\t\t\t/*if (preferences.getInt(\"numberOfbooks\", 0)>0)\n\t\t {\n\t\t \tLog.d(\"in condition\", numberOfbooks+\"\");\n\t\t \tLog.d(\"preference number of books\", preferences.getInt(\"numberOfbooks\", 0)+\"\");\n\t\t \tfor(int p=0;p<preferences.getInt(\"numberOfbooks\",0);p++)\n\t\t \t{\n\t\t \t\tLog.d(\"CalSync.getIndex\", CalSync.getIndex[p]);\n\t\t \t\tobj.DeleteCalendarEntry(Integer.parseInt(CalSync.getIndex[p]));\n\t\t \t}\n\t\t }*/\n\t\t\t\t\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t {\n\t\t\t\tLog.d(\"catch\", e.toString());\n\t\t\t\tflag=false;\n\t\t\t\terr = e.toString();\n\t }\n\t\t\t\n\t\t\treturn null;\n\t\t}", "@Override\n protected JSONArray doInBackground(String... params) {\n String url = params[0];\n Log.i(TAG,\"do In Background is called\");\n return getJSONFromUrl(url);\n }", "@Override\n protected Object doInBackground() throws Exception {\n ArrayList<String> listQueries = new ArrayList<String>(0);\n //get process query\n String processId = UUID.randomUUID().toString();\n String billId = (String) AppProperties.getProperty(\"CurrentBillID\");\n String processStatus = ProcessProcess.ProcessStatus.Start.toString();\n String insQuery = ProcessQueries.INSERT_PROCESS(processId, billId, processStatus);\n listQueries.add(insQuery);\n loadFilesFromFolder();\n for (BungeniOdfDocumentHelper docHelper : changesInfo.getDocuments()) {\n //get process docs queries\n String documentPath = docHelper.getDocumentPath();\n String filename = documentPath.substring(documentPath.lastIndexOf(File.separator) + 1);\n String docAuthor = docHelper.getPropertiesHelper().getUserDefinedPropertyValue(\"BungeniDocAuthor\");\n Long lcheckSum = docHelper.getChecksum();\n String insQuery2 = ProcessQueries.INSERT_PROCESS_DOCS(processId, filename, documentPath, docAuthor, lcheckSum);\n listQueries.add(insQuery2);\n {\n //get process amend queries\n DocumentChange documentChange = getDocChange(docHelper, true, filename, docAuthor);\n listQueries.addAll(getDocChangeQueries(processId, documentChange));\n }\n }\n BungeniClientDB db = BungeniClientDB.defaultConnect();\n db.Connect();\n db.Update(listQueries, true);\n db.EndConnect();\n return Boolean.TRUE;\n }", "@Override\r\n\t\tpublic Void doInBackground() {\r\n\t\t\tDataInputStream dis = null; \r\n\r\n\t\t\ttry {\r\n\t\t\t\t//ProgressMonitorInputStream pmis = new ProgressMonitorInputStream(parent,\"Processing data...\",is);\r\n\t\t\t\t//dis = new DataInputStream(pmis);\r\n\r\n\t\t\t\tdis = new DataInputStream(is);\r\n\r\n\t\t\t\tmodel = new Model(dis, Preferences.cacheDataFile, Preferences.cacheIndexFile, isCached, recursivityLevel, minTs, maxTs, iniTs, endTs, licensesServer);\r\n\r\n\t\t\t\tminTs = model.getMinTs();\r\n\t\t\t\tmaxTs = model.getMaxTs();\r\n\r\n\t\t\t\t// Actualizo los entry points\r\n\t\t\t\t/*\r\n\t\t\t\tCollection<MethodNode> entryPoints = model.getEntryPoints();\r\n\t\t\t\tentryPointsTable = new TableData(2);\r\n\t\t\t\tArrayList<String> entryPointsRowKeys = new ArrayList<String>();\r\n\r\n\r\n\t\t\t\tfor (Iterator<MethodNode> it = entryPoints.iterator();it.hasNext();) {\r\n\t\t\t\t\tMethodNode entryNode = it.next();\r\n\t\t\t\t\tentryPointsTable.addRow(entryNode.getId(), Names.getDigestedName(entryNode.getName(),true),String.valueOf(entryNode.getInvCount()));\r\n\t\t\t\t}\r\n\t\t\t\t */\r\n\t\t\t\tok=true;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tCommonForms.showError(parent, e);\r\n\t\t\t\tdialog.dispose();\r\n\t\t\t\tparent.setEnabled(true);\r\n\t\t\t} \r\n\t\t\treturn null;\r\n\t\t}", "@Override\n\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\tMove lastMove = board.getLastMove();\n\t\t\tif (lastMove != null) //If client plays first, must not send him move\n\t\t\t{\n\t\t\t\tsocketHelper.sendMove(lastMove);\n\t\t\t}\n\t\t\t//check if game is over now\n\t\t\tif (board.getStatus() != BoardStatus.INPROGRESS)\n\t\t\t\treturn null;\n\t\t\t//Receive Client Move\n\t\t\tfinal Move nextMove = socketHelper.getMove();\n\t\t\tif (nextMove == null) {\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override public void run() {\n\t \tengine.onMoveReadyCalculated(null, true);\n\t }\n\t });\n\t\t\t\t//engine.onMoveReadyCalculated(null, true);\n\t\t\t} else {\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override public void run() {\n\t \tengine.onMoveReadyCalculated(nextMove, nextMove.isPassMove());\n\t }\n\t });\n\t\t\t\t//engine.onMoveReadyCalculated(nextMove, nextMove.isPassMove());\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n protected void onPostExecute(final Void unused) {\n super.onPostExecute(unused);\n Log.i(\"Dict\", \"Done processing\");\n delegate.processFinish(result);\n }", "@Override\n\t\t\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\texit = new ExitDialog();\n\t\t\t\t\t\t\t}});\n\t\t\t\t\t\tcenter.exit();\n\t\t\t\t\t\texit.closeSucess();\n\t\t\t\t\t\tcloseButton.setEnabled(false);\n\t\t\t\t\t\tstartButton.setEnabled(true);\n\t\t\t\t\t\t//infomation = new closeJPanel();\n\t\t\t\t\t\t//frmIpfs.getContentPane().add(infomation,BorderLayout.CENTER);\n\t\t\t\t\t\t//new Thread(infomation).start();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "public void updateInBackground(){\n synchronized (syncLock){\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n updateAllSync();\n }\n });\n t.start();\n }\n }", "@Override\n protected TCPReceiver doInBackground(String... message) {\n mTcpReceiver = new TCPReceiver(new TCPReceiver.OnMessageReceived() {\n @Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n Log.d(\"AlterEgo::NetworkingReceiveTask\", \"Publishing Progress!\");\n //this method calls the onProgressUpdate\n publishProgress(message);\n }\n }, mSocket, myIpAddr, mDbHelper);\n Log.d(\"AlterEgo::MapFragment\", \"Starting the receiving task\");\n mTcpReceiver.run();\n\n return null;\n }", "public Void doInBackground(){\n\t\t\t//Move all clients in the waiting list to the player list.\n\t\t\tplayers.addAll(waitingPlayers);\n\t\t\twaitingPlayers.clear();\n\t\t\tcleanToAll();\n\t\t\tview.changeInAndWait(players.size(),waitingPlayers.size());\n\t\t\tview.writeLog(\"Server has started the game.\");\n\t\t\tview.writeLog(\"-------------GAME START--------------\");\n\t\t\t//Send a START package to every player.\n\t\t\tmessageToAll(\"GAME START!\");\n\t\t\tview.writeLog(\"The START signal is sent to all clients.\");\n\t\t\tstatus = \"start\";\n\t\t\tstatusCheck();\n\t\t\tdeck.init();\n\t\t\ttry {Thread.sleep(1000);}catch(Exception exc) {exc.printStackTrace();}\n\t\t\tif(dealer == null) { \n\t\t\t\t/*\n\t\t\t\t * If there is no dealer, draw cards to choose one. \n\t\t\t\t * Send a package to signal that the choosing dealer process begins.\n\t\t\t\t */\n\t\t\t\tmessageToAll(\"Drawing cards to decide the dealer.\");\n\t\t\t\ttry {Thread.sleep(1000);}catch(Exception exc) {exc.printStackTrace();}\n\t\t\t\tview.writeLog(\"---Decide the dealer---\");\n\t\t\t\t//Each player draws cards to choose a dealer.\n\t\t\t\tboolean dealerChosen = false;\n\t\t\t\twhile(!dealerChosen) {\n\t\t\t\t\tfor(ClientThread player: players) {\n\t\t\t\t\t\tCard thisCard = deck.draw();\n\t\t\t\t\t\tplayer.send(new Package(\"CARD_DEALER\",thisCard));\n\t\t\t\t\t\tview.writeLog(player.name +\" draws: \" + thisCard.toString());\n\t\t\t\t\t\ttry {Thread.sleep(200);}catch(Exception exc) {exc.printStackTrace();}\n\t\t\t\t\t\t//If any one draw an \"A\", the process is finished.\n\t\t\t\t\t\tif(thisCard.getNum().equals(\"A\")) {\n\t\t\t\t\t\t\tdealerChosen = true;\n\t\t\t\t\t\t\tdealer = player;\n\t\t\t\t\t\t\tplayer.send(new Package(\"DEALER\",true)); //Send a dealer package to inform the dealer.\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\tview.writeLog(\"---The dealer is: \" + dealer.name + \"---\");\n\t\t\tfor(ClientThread player: players) {\n\t\t\t\tif(player == dealer) {\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"YOU are the dealer now!\"));\n\t\t\t\t}else {\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"The dealer is: \"+dealer.name+\". \"));\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {Thread.sleep(2000);}catch(Exception exc) {exc.printStackTrace();}\n\t\t\t/*\n\t\t\t * Now the dealer is decided, the game starts.\n\t\t\t * Send a clean signal to the clients so they can clean their card deck.\n\t\t\t * Deal 2 cards for each player.\n\t\t\t */\n\t\t\tcleanToAll();\n\t\t\tview.writeLog(\"Clients clean their decks.\");\n\t\t\tmessageToAll(\"Round start. Dealing cards.\");\n\t\t\ttry {Thread.sleep(1000);}catch(Exception exc) {exc.printStackTrace();}\n\t\t\tdeck.init();\n\t\t\t//Two cards to each player. \n\t\t\tcardToAll();\n\t\t\tcardToAll();\n\t\t\tmessageToAll(\"Cards dealed.\");\n\t\t\tview.writeLog(\"Cards dealed.\");\n\t\t\ttry {Thread.sleep(1000);}catch(Exception exc) {exc.printStackTrace();}\n\t\t\tcountAllPoints();\n\t\t\tif(checkNatural21()) {\n\t\t\t\tendGame();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\taskToAll();\n\t\t\treturn null;\n\t\t}", "@Override\n protected TCPClient doInBackground(String... message) {\n mTcpClient = new TCPClient(new TCPClient.OnMessageReceived() {\n @Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n //this method calls the onProgressUpdate\n publishProgress(message);\n }\n },SERVER_IP,SERVERPORT);\n mTcpClient.run();\n\n return null;\n }", "protected Boolean doInBackground(String... params) {\n Log.d(\"APP:\", \"AsyncTask: Executing POST...\");\n\n for (HttpPost httpPost : postmessages){\n try{\n HttpResponse response = httpClient.execute(httpPost);\n // Write reponse to log\n Log.d(\"HTTP POST response\", response.toString());\n }catch (ClientProtocolException e ){\n e.printStackTrace();\n }catch (IOException e){\n e.printStackTrace();\n }\n }\n\n return null;\n }", "protected void onPostExecute(String message) {\n // dismiss the dialog once done\n super.onPostExecute(message);\n\n progressDialog.dismiss();\n jumpToMainActivity();\n //message 为接收doInbackground的返回值\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n\n return true;\n\n\n\n }", "public OnMainThread() {\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected Void doInBackground(Void... params) {\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n run();\n }\n }.execute();\n }", "@Override\n protected Void doInBackground(Void... voids) {\n runTcpScan();\n return null;\n }", "@Override\n\t\t\tprotected Object doInBackground(Object... params) {\n\t\t\t\treturn null;\n\t\t\t}", "public Result doInBackground(Params... paramsArr) {\n try {\n Result excuteTask = excuteTask(paramsArr);\n doFinally();\n return excuteTask;\n } catch (Throwable th) {\n doFinally();\n throw th;\n }\n }", "@Override\n\t\t\tpublic void doAsyncTaskInBackground(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\tif(customAsyncTask.tag == DOWNLOAD_SLIDER_XML_TAG)\n\t\t\t\t{\n\t\t\t \ttry \n\t\t\t \t{\n\t\t\t \t\tBoolean isServerSourceData = false;\n\t\t\t \t\tXMLRequest req = null;\n\t\t\t \t\tif(Config.IS_DATA_FROM_SERVER)\n\t\t\t \t\t{\n\t\t\t \t\t\tif(Utilities.hasConnection(Tab3Fragment.this.getActivity()))\n\t \t\t\t\t{\n\t\t\t \t\t\t\treq = new XMLRequest(Config.URL_PATH + Config.SLIDER_URL);\n\t\t\t\t \t\t\tisServerSourceData = true;\n\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\treq = new XMLRequest(Config.ASSETS_FOLDER_PATH + Config.SLIDER_URL);\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\treq = new XMLRequest(Config.ASSETS_FOLDER_PATH + Config.SLIDER_URL);\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\t\n\t \t\t\tList<ListEntry> entryList = isServerSourceData ?\n\t\t\t\t\t\t\t\treq.obtainXMLList() : \n\t\t\t\t\t\t\t\t\treq.obtainXMLListFromLocal(customAsyncTask.activity);\n\t\t\t\t\t\t\t\t\n \t\t\t\tcustomAsyncTask.entryList = entryList;\n \t\t\t\tcustomAsyncTask.listTag = LIST_TAG;\n\t\t\t\t\t} \n\t\t\t \tcatch (ParserConfigurationException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t \tcatch (SAXException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t \tcatch (IOException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(customAsyncTask.activity,\n\t\t\t\t\t\t\t\t\"Network Connection Error.\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tprotected Map<String, int[]> doInBackground() throws Exception {\n\t\tcp.SetProgressBarVisabel(true);\r\n\t\tcp.SetProgressBarLabelVisabel(true);\r\n\t\tcp.SetConfirmInfomationVisabel(false);\r\n\t\tcp.setEnable(false);\r\n\t\t\r\n\t\tMap<String,int[]> m=new HashMap<String,int[]>();\r\n\t\tint size=file.size();\r\n\t\tfor(int i=0;i<size;i++){\r\n\t\t\tString s=file.get(i).replaceAll(\"<[^>]+>\",\"\");\t\t//删除html标签\r\n\t\t\tVector<String> obj=sp.t.GetDataID(s);\r\n\t\t\tint[] res=sp.CommitIndex(Path.urlpath,s,Path.indexpath,i,size-1);\r\n\t\t\tm.put(s,res);\r\n\t\t\tif(res[0]==res[1]&&res[0]!=-1&&res[1]!=-1){\r\n\t\t\t\tsp.RemoveData(obj);\r\n\t\t\t\tsp.t.RemoveDataID(s);\r\n\t\t\t}\r\n\t\t\tpublish(\"(\"+(i+1)+\"/\"+size+\")\"+\" \"+s);\r\n\t\t}\r\n\t\treturn m;\r\n\t}", "@Override\n protected String doInBackground(String... url) {\n\n // Increment progress up to half of total background processing\n while(progress_status < 50){\n\n progress_status += 2;\n\n // send progress to UI thread\n publishProgress(progress_status);\n\n // sleep to show progress bar\n SystemClock.sleep(SLEEP_DURATION);\n }\n\n String s = null;\n try {\n\n // Download directions with url\n s = downloadUrl(url[0]);\n }\n catch (IOException e) {\n Log.d(\"Background Task\",e.toString());\n }\n\n // Return a string with xml data\n return s;\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n // Simulate network access.\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n return false;\n }\n\n return post(user);\n\n }", "@Override\n\t\tprotected Integer doInBackground(String... urlString) {\n\t\t\ttry {\n\t\t\t\tEnviarEvento();\n\t\t\t} catch (Exception exception) {\n\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n\t\t\t\t\tprotected Void doInBackground() {\n\t\t\t\t\t\tinfomation.drawStart();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\twait = new waittingDialog();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}}).start();\n\t\t\t\t\t\t\tcenter.start();\n\t\t\t\t\t\t\twait.startSucess();\n\t\t\t\t\t\t\tstartButton.setEnabled(false);\n\t\t\t\t\t\t\tcloseButton.setEnabled(true);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew IODialog();\n\t\t\t\t\t\t} catch (CipherException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew BlockChainDialog();\n\t\t\t\t\t\t} catch (Exception 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\tnew ExceptionDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "@Override\n protected Void doInBackground(Void... params) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // Get workout image from database\n getWorkoutGalleryImagesFromDatabase();\n return null;\n }", "protected Void doInBackground() {\n\t\t\t\t\tString path=null;\n\t\t\t\t\tif(location.equals(\"EXPORT\")||location.equals(\"IMPORT\")||location.equals(\"ARCHIVE\")){\n\t\t\t\t\t\tpath = \"/u03/\"+location.toLowerCase()+\"/\"+connection.environment.toUpperCase()+\"/\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(location.equals(\"GURJOBS\")){\n\t\t\t\t\t\tpath = \"/u03/banjobs/bin/gurjobs/\"+connection.environment.toUpperCase()+\"/\";\n\t\t\t\t\t}\n\t\t\t\t\tString file=null;\n\t\t\t\t\tif(mode.equals(\"STARTSWITH\"))\n\t\t\t\t\t\tfile=textField.getText().trim()+\"*\";\n\t\t\t\t\telse if(mode.equals(\"ENDSWITH\"))\n\t\t\t\t\t\tfile=\"*\"+textField.getText().trim();\n\t\t\t\t\telse if(mode.equals(\"CONTAINS\"))\n\t\t\t\t\t\tfile=\"*\"+textField.getText().trim()+\"*\";\n\t\t\t\t\telse if(mode.equals(\"EQUALS\"))\n\t\t\t\t\t\tfile=textField.getText().trim();\n\n\t\t\t\t\tString command = \"ls \";\n\t\t\t\t\tif(box_showInfo.isSelected()||box_timeSort.isSelected()){\n\t\t\t\t\t\tcommand+=\"-\";\n\t\t\t\t\t\tif(box_showInfo.isSelected())\n\t\t\t\t\t\t\tcommand+=\"l\";\n\t\t\t\t\t\tif(box_timeSort.isSelected())\n\t\t\t\t\t\t\tcommand+=\"t\";\n\t\t\t\t\t\tcommand+=\" \";\n\t\t\t\t\t}\n\n\t\t\t\t\tcommand+=path+file;\n\t\t\t\t\tSystem.out.println(command);\n\t\t\t\t\tString message = ssh.run(command);\n\n\t\t\t\t\tJTextArea textArea = new JTextArea(message);\n\t\t\t\t\tJScrollPane scrollPane = new JScrollPane(textArea,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\t\t\t\ttextArea.setLineWrap(false);\n\t\t\t\t\ttextArea.setWrapStyleWord(true);\n\t\t\t\t\tif(box_showInfo.isSelected())\n\t\t\t\t\t\tscrollPane.setPreferredSize(new Dimension(1000, 700));\n\t\t\t\t\telse\n\t\t\t\t\t\tscrollPane.setPreferredSize(new Dimension(600, 700));\n\n\t\t\t\t\ttextArea.setFont(new Font(\"monospaced\", Font.BOLD, 14));\n\t\t\t\t\tJOptionPane.showMessageDialog(null, scrollPane, \"Directory Contents\", JOptionPane.PLAIN_MESSAGE);\n\n\t\t\t\t\treturn null;\n\t\t\t\t}", "@Override\n protected void onPreExecute()\n {\n taskCompleted = false;\n\n //display the progress dialog\n showProgressDialog();\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\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\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\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}" ]
[ "0.68156064", "0.679033", "0.67654246", "0.6584196", "0.6549309", "0.6508439", "0.6487233", "0.64317644", "0.64247805", "0.63206136", "0.62973905", "0.6293086", "0.6281616", "0.6240783", "0.6144983", "0.6137275", "0.61307454", "0.6100417", "0.6052531", "0.6050256", "0.6044844", "0.6036941", "0.603031", "0.6009289", "0.6009289", "0.6009289", "0.60044885", "0.59956664", "0.5995108", "0.5987109", "0.5983412", "0.5982023", "0.5968768", "0.5965779", "0.5949016", "0.59407634", "0.59407634", "0.5933705", "0.59228855", "0.5905718", "0.59053624", "0.58734924", "0.5869764", "0.5849606", "0.5847964", "0.5842128", "0.58329624", "0.5821822", "0.5820415", "0.5806458", "0.5805036", "0.5802353", "0.5798363", "0.5795929", "0.5790215", "0.5774097", "0.57692873", "0.5767744", "0.57654154", "0.57654154", "0.57654154", "0.57646525", "0.57643616", "0.57643616", "0.5754404", "0.57453525", "0.5736751", "0.5731629", "0.57221067", "0.5716705", "0.57149434", "0.57104844", "0.5706913", "0.5699722", "0.5696971", "0.56934035", "0.56894314", "0.56874555", "0.5685427", "0.5682458", "0.56807053", "0.5675923", "0.567521", "0.5672403", "0.56618804", "0.5657341", "0.5646745", "0.5641975", "0.5632408", "0.5627366", "0.5626085", "0.56202394", "0.5609787", "0.56096166", "0.5607572", "0.5604554", "0.5601874", "0.5588692", "0.55885935", "0.5587521", "0.5587521" ]
0.0
-1
Name: onPostExecute Description: Overridden out of necessity (unused)
@Override protected void onPostExecute (ArrayList<Event> result) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onPostExecute() {\r\n\t}", "@Override\n protected void onPostExecute(Void aVoid) {\n }", "protected void onPostExecute(Void v) {\n }", "protected void onPostExecute(Void v) {\n\n }", "protected void onPostExecute(Void v) {\n\n }", "protected void onPostExecute() {\n }", "protected void onPostExecute() {\n }", "protected void onPostExecute() {\n }", "protected void onPostExecute(Void v) {\n\n\n }", "@Override\r\n\t\tprotected void onPostExecute(Void result) \r\n\t\t{\n\t\t}", "@Override\r\n\t\tprotected void onPostExecute(Void result)\r\n\t\t{\n\t\t}", "@Override\n\t\t protected void onPostExecute(Void result) {\n\t\t \t\n\t\t super.onPostExecute(result); \n\t\t }", "@Override\n protected void onPostExecute(Void result) {\n\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t}", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t}", "@Override\n\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t}", "@Override\n\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t}", "@Override\n\t protected void onPostExecute(String result) {\n\t }", "@Override\n protected void onPostExecute(Void result) {\n super.onPostExecute(result);//Run the generic code that should be ran when the task is complete\n onCompleteListener.onAsyncTaskComplete(result);//Run the code that should occur when the task is complete\n }", "@Override\n\t\t\t\tprotected void onPostExecute(Void result)\n\t\t\t\t{\n\t\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\t}", "protected void onPostExecute(Void result) {\n }", "@Override\n\t\t protected void onPostExecute(Boolean result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\t\n\t\t }", "@Override\r\n protected void onPostExecute(Void result) {\n\r\n }", "@Override\n protected void onPostExecute(final Void unused) {\n super.onPostExecute(unused);\n Log.i(\"Dict\", \"Done processing\");\n delegate.processFinish(result);\n }", "@Override\n protected void onPostExecute(String result) {\n }", "protected void onPostExecute(Long result) {\n\t }", "protected void onPostExecute(Long result) {\n\t\t}", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\t\t\n\t}", "@Override\n protected void onPostExecute(Integer result) {\n super.onPostExecute(result);\n }", "@Override\n protected void onPostExecute(Boolean result) {\n }", "@Override\n protected void onPostExecute(Boolean result) {\n }", "@Override\r\n\tprotected void onPostExecute(Integer result) {\n\t\tsuper.onPostExecute(result);\r\n\t}", "@Override\r\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\r\n\t}", "@Override\n protected void onPostExecute(String result) {\n }", "@Override\n protected void onPostExecute(String result) {\n }", "@Override\n protected void onPostExecute(String result) {\n }", "@Override\r\n protected void onPostExecute(String result) {\n\r\n }", "@Override\n\t protected void onPostExecute(ContentValues result) {\n\t super.onPostExecute(result);\n\t }", "@Override\n protected void onPostExecute(String result) {\n\n }", "@Override\n protected void onPostExecute(String result) {\n\n }", "public void onPostExecute(Result result) {\n }", "public void onPostExecute(Result result) {\n }", "public void onPostExecute(Result result) {\n }", "protected void onPostExecute(Long result) {\n }", "protected void onPostExecute(Long result) {\n }", "@Override\r\n protected void onPostExecute(String result) {\n\r\n }", "protected void onPostExecute(String result) {\r\n\r\n\t\t}", "@Override protected void onPostExecute(String returnVal) {\r\n //Print the response code as toast popup \r\n //android.widget.Toast.makeText(\r\n // mContext, \"[myAsyncTask.onPostExecute] Response: \" + returnVal,\r\n // android.widget.Toast.LENGTH_LONG\r\n //).show();\r\n if (gHandlers != null) gHandlers.onPostExecute(returnVal);\r\n }", "@Override\n\t\t\tpublic void onAsyncTaskPreExecute(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAsyncTaskPreExecute(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}", "protected void onPostExecute(String result) {\n }", "protected void onPostExecute(Integer result){\n\t Utils.logThreadSignature(this.tag);\n\t r.reportBack(tag, \"onPostExecute result:\" + result);\n\t pd.cancel();\n\t r.allDone(0);\n }", "protected void onPostExecute(String result){\n }", "@Override\n protected void onPostExecute(Void result) {\n // This is where we would process the results if needed.\n this.progressDialog.dismiss();\n }", "@Override\n\t protected void onPostExecute(String result) \n\t {\n\t \tmHandler.post(updateList);\n\t \t\n\t //mProgress.setVisibility(View.GONE);\n\n\t }", "@Override\n protected void onPostExecute(Boolean result) {\n setValue();\n }", "@Override\n protected void onPostExecute(Boolean result) {\n setValue();\n }", "@Override\n protected void onPostExecute(Boolean result) {\n setValue();\n }", "@Override\n protected void onPostExecute(String result){\n finish();\n }", "protected void onPostExecute(String serverData){\n }", "@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\n protected void onPostExecute(JSONObject jsonObject) {\n super.onPostExecute(jsonObject);\n }", "@Override\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\t\t\n\t\t\tprogressDialog.dismiss();\n\t\t\tsetAllValues();\n\t\t}", "@Override\n\t\tprotected void onPostExecute(NetworkTaskResult result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tthis.handleResponse(result);\n\t\t}", "protected void onPostExecute(String result) {\n onTaskCompleted(result,jsoncode);\n }", "@Override\n protected void onPostExecute(String temp) {\n\n progressDialog.dismiss();\n }", "@Override\n\tpublic void onTaskPostExecute() {\n\t\tLog.i(TAG, \"post executing\");\n\t\tupdateAdapter();\n\t\tspinner.setVisibility(View.GONE);\n\t\tlistView.setVisibility(View.VISIBLE);\n\t\tlistView.onLoadMoreComplete();\n\t}", "@Override\n protected void onPreExecute()\n {\n }", "@Override\n protected void onPreExecute()\n {\n }", "@Override\n protected void onPreExecute()\n {\n }", "@Override\n protected void onPreExecute()\n {\n }", "@Override\n protected void onPreExecute()\n {\n }", "@Override\n protected void onPreExecute()\n {\n }", "@Override\n protected void onPreExecute()\n {\n }", "@Override\n protected void onPreExecute()\n {\n }", "@Override\npublic void postExecute(HttpResponse r) {\n\t\n}", "@Override\r\n\tprotected void onPostExecute(String result)\r\n\t{\r\n\t\tprogress.dismiss();\r\n\t\tsuper.onPostExecute(result);\r\n\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 }", "protected void onPreExecute() {\r\n\r\n }", "@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 protected void onPostExecute(JSONObject s) {\n super.onPostExecute(s);\n\n // Here you can't guarantee that Activity/Fragment is alive who started this AsyncTask\n\n delegate.processFinish(s);\n }", "protected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\t\t\n\t\treceiver.onLoad(result);\n\t}", "public void onPostExecute(ResultData resultdata) {\n this.f16350b.mo24178a(resultdata);\n }", "@Override\n protected void onPostExecute(Boolean success) {\n super.onPostExecute(success);\n resultListener.onTaskFinished(this, success);\n }", "public final /* synthetic */ void onPostExecute(Object obj) {\n t_$J_ t__j_ = (t_$J_) obj;\n Callback callback = this.G__G_;\n if (callback != null) {\n callback.run(t__j_);\n }\n }", "@Override\r\n protected void onPreExecute() {\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 }", "protected void onPostExecute(Void result) {\n mNotificationHelper.completed();\r\n// \tmsc.connect();\r\n }", "@Override\r\n\tprotected void onPostExecute(String result) {\r\n\t\tprogressDialog.setMessage(\"Finalizado!\");\r\n\t\t// fecha o dialog\r\n\t\tprogressDialog.dismiss();\r\n\t\tsuper.onPostExecute(result);\r\n\t}", "protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\t\tmDialog.dismiss();\n\t}", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected void onPostExecute(Boolean aBoolean) {\n mAdapter.notifyDataSetChanged();\n }", "@Override\n protected void onPostExecute(BackgroundTaskResult result)\n {\n taskCompleted = true;\n dismissProgressDialog();\n notifyTaskCompletion(result);\n }", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tLog.d(TAG, result);\n\t}", "@Override\n protected void onPostExecute(String result) {\n mListener.onTaskCompleted(result);\n }" ]
[ "0.84239125", "0.8375051", "0.8333698", "0.8310339", "0.8310339", "0.82608944", "0.82608944", "0.8222406", "0.8184637", "0.8146689", "0.8117941", "0.808737", "0.8048098", "0.79703355", "0.79703355", "0.7951631", "0.7951631", "0.7942813", "0.7937648", "0.7923869", "0.7900557", "0.7895153", "0.7888058", "0.7876308", "0.7874466", "0.7856024", "0.78552085", "0.7842655", "0.77879494", "0.7768986", "0.7768986", "0.7763342", "0.7763063", "0.77536213", "0.77536213", "0.77536213", "0.77413344", "0.77265656", "0.7724182", "0.7724182", "0.771661", "0.771661", "0.771661", "0.7705835", "0.7705835", "0.76939195", "0.7673529", "0.76713496", "0.7618605", "0.7618605", "0.76079375", "0.757209", "0.75356793", "0.7515892", "0.7417284", "0.7379673", "0.7379673", "0.7379673", "0.73596513", "0.7354823", "0.7352041", "0.7351509", "0.7334226", "0.73336565", "0.7316162", "0.7282601", "0.7280285", "0.7272214", "0.7272214", "0.7272214", "0.7272214", "0.7272214", "0.7272214", "0.7272214", "0.7272214", "0.7257281", "0.72548044", "0.7246057", "0.72422063", "0.7199132", "0.71967626", "0.7196475", "0.7182388", "0.718121", "0.71794635", "0.7168471", "0.7153864", "0.7153156", "0.71526843", "0.71520835", "0.7145665", "0.7145665", "0.7145665", "0.7145665", "0.7145665", "0.7140912", "0.71390086", "0.7135003", "0.7123052", "0.7118089", "0.71176326" ]
0.0
-1
Name: getCalendarIdFromSummary Description: Gets Calendar ID from summary
private String getCalendarIdFromSummary (String summary) { try { String pageToken = null; do { CalendarList calendarList = mService.calendarList().list().setPageToken(pageToken).execute(); List<CalendarListEntry> items = calendarList.getItems(); for (CalendarListEntry calendarListEntry : items) { if (calendarListEntry.getSummary().equals(summary)) { return calendarListEntry.getId(); } } pageToken = calendarList.getNextPageToken(); } while (pageToken != null); } catch (IOException e) { e.printStackTrace(); return ""; } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long getCalendarId();", "private long getExistingCalendarId() {\n\t\tlong calID = 0;\n\n\t\tCursor cur = null;\n\t\tContentResolver cr = getContentResolver();\n\t\tUri uri = Calendars.CONTENT_URI;\n\t\tString selection = \"((\" + Calendars.ACCOUNT_NAME + \" = ?) AND (\"\n\t\t\t\t+ Calendars.ACCOUNT_TYPE + \" = ?) AND (\"\n\t\t\t\t+ Calendars.OWNER_ACCOUNT + \" = ?))\";\n\t\tString[] selectionArgs = new String[] { EMAIL_ID,\n\t\t\t\t\"com.google\", EMAIL_ID };\n\t\t// Submit the query and get a Cursor object back.\n\t\tcur = cr.query(uri, EVENT_PROJECTION, selection, selectionArgs, null);\n\n\t\t// Use the cursor to step through the returned records\n\t\twhile (cur.moveToNext()) {\n\t\t\tcalID = 0;\n\n\t\t\tString displayName = null;\n\t\t\tString accountName = null;\n\t\t\tString ownerName = null;\n\n\t\t\t// Get the field values\n\t\t\tcalID = cur.getLong(PROJECTION_ID_INDEX);\n\t\t\tdisplayName = cur.getString(PROJECTION_DISPLAY_NAME_INDEX);\n\t\t\taccountName = cur.getString(PROJECTION_ACCOUNT_NAME_INDEX);\n\t\t\townerName = cur.getString(PROJECTION_OWNER_ACCOUNT_INDEX);\n\n\t\t}\n\t\treturn calID;\n\t}", "public int getC_Calendar_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Calendar_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "void setCalendarId(Long calendarId);", "private long getLocalCalendarId() {\n\n\t\tString[] projection = new String[] { Calendars._ID };\n\n\t\tString selection = \"((\" + Calendars.ACCOUNT_NAME + \" = ?) AND (\"\n\t\t\t\t+ Calendars.ACCOUNT_TYPE + \" = ?))\";\n\n\t\t// use the same values as above:\n\n\t\tString[] selArgs = new String[] { PATIENT_ACCOUNT_NAME,\n\t\t\t\tCalendarContract.ACCOUNT_TYPE_LOCAL };\n\n\t\tCursor cursor = getContentResolver().query(Calendars.CONTENT_URI,\n\t\t\t\tprojection, selection, selArgs, null);\n\n\t\tif (cursor.moveToFirst()) {\n\n\t\t\treturn cursor.getLong(0);\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Cursor did not return any values\");\n\t\t}\n\n\t\treturn -1;\n\n\t}", "public String getCalId() {\n return calId;\n }", "public static long getCalendarID(FragmentActivity fa){\n\t\t\n\t\tif(calId == -1){\n\t\t\t// Run query\n\t\t\tCursor cur = null;\n\t\t\tContentResolver cr = fa.getContentResolver();\n\t\t\tUri uri = Calendars.CONTENT_URI; \n\t\t\tString selection = \"((\" + Calendars.ACCOUNT_NAME + \" = ?) AND (\" \n\t\t\t + Calendars.ACCOUNT_TYPE + \" = ?) AND (\"\n\t\t\t + Calendars.OWNER_ACCOUNT + \" = ?))\";\n\n\t\t\t// Hard coded values before profile db table was entered. \n\t\t\t//\t\t\tString[] selectionArgs = new String[] { \"bhavanapbisht@gmail.com\", \"com.google\",\n\t\t\t//\t\t\t \"bhavanapbisht@gmail.com\"}; \n\t\t\t\n\t\t\tString email = MainActivity.mDBHelper.getEmail();\n\t\t\tLog.e(\"ReminderCalendarHelper.java\", \"Email: \" + email);\n\t\t\t\n\t\t\tif ( email == null || email == \"\")\n\t\t\t\temail = \"bhavanapbisht@gmail.com\";\n\t\t\t\n\t\t\tString[] selectionArgs = new String[] { email, \"com.google\",\n\t\t\t\temail}; \n\t\t\t\n\t\t\t// Submit the query and get a Cursor object back. \n\t\t\tcur = cr.query(uri, EVENT_PROJECTION, selection, selectionArgs, null);\n\t\t\t// Use the cursor to step through the returned records\n\t\t\twhile (cur.moveToNext()) {\n\t\t\t long cid = 0;\n\t\t\t String displayName = null;\n\t\t\t String accountName = null;\n\t\t\t String ownerName = null;\n\t\t\t \n\t\t\t // Get the field values\n\t\t\t cid = cur.getLong(PROJECTION_ID_INDEX);\n\t\t\t displayName = cur.getString(PROJECTION_DISPLAY_NAME_INDEX);\n\t\t\t accountName = cur.getString(PROJECTION_ACCOUNT_NAME_INDEX);\n\t\t\t ownerName = cur.getString(PROJECTION_OWNER_ACCOUNT_INDEX);\n\n\t\t\t Log.e(\"CalendarHelper\", \"Id = \" + cid + \" name - \" + displayName + \n\t\t\t \t\t\" accnt - \" + accountName + \" owner - \" + ownerName);\n\t\t\t calId = cid;\n\t\t\t}\n\t\t} \n\t\t\n\t\treturn calId;\n\t}", "public SelectId<String> retrieveCalendarId() {\n return calendarId;\n }", "private String getGoogleCalendarID(Site site) {\n\n\t\tString gcalid = null;\n\t\t\n\t\t// get the Google Calendar ID and use it if found\n\t\tgcalid = site.getProperties().getProperty(SakaiGCalendarServiceStaticVariables.GCALID);\n\t\t\n\t\tif ( gcalid != null && !gcalid.isEmpty() )\n\t\t\treturn gcalid;\n\t\t\n\t\treturn null;\n\t}", "public native final Calendar id(String val) /*-{\n\t\tthis[\"id\"] = val;\n\t\treturn this;\n\t}-*/;", "public void setCalendarId(final String val) {\n if (Util.checkNull(val) != null) {\n calendarId.setA(val);\n }\n }", "public native final Calendar summary(String val) /*-{\n\t\tthis[\"summary\"] = val;\n\t\treturn this;\n\t}-*/;", "public FCouncilSummaryDO findById(long summaryId) throws DataAccessException {\n Long param = new Long(summaryId);\n\n return (FCouncilSummaryDO) getSqlMapClientTemplate().queryForObject(\"MS-F-COUNCIL-SUMMARY-FIND-BY-ID\", param);\n\n }", "@GET\n @Path(\"{id}\")\n Calendar getCalendarById(@PathParam(\"id\") Long id);", "public String cal(Calendar calendar) {\r\n String calendari;\r\n calendari = calendar.get(Calendar.DAY_OF_MONTH) + \"-\" + calendar.get(Calendar.MONTH) + \"-\" + calendar.get(Calendar.YEAR);\r\n return calendari;\r\n }", "@Override\n\tpublic String calendarReference(String context, String id) {\n\t\tSite site = getSite();\n\t\t// Retrieve Google calendar id from site properties\n\t\tString gcalid = site.getProperties().getProperty(SakaiGCalendarServiceStaticVariables.GCALID);\t\n\t\treturn gcalid;\n\t}", "private YFCDocument getCalendarDetailsInDoc (String organizationCode,String calenderId) {\n\t\tYFCDocument getCalendarXml = YFCDocument.createDocument(XMLLiterals.CALENDAR);\n\t\tYFCElement calendarEle = getCalendarXml.getDocumentElement();\n\t\tcalendarEle.setAttribute(XMLLiterals.ORGANIZATION_CODE, organizationCode);\n\t\tcalendarEle.setAttribute(XMLLiterals.CALENDER_ID, calenderId);\n\t\treturn getCalendarXml;\n\t}", "public String getMeetingIdByEventId(String eventId) throws Exception;", "@PUT\n @Path(\"{id}\")\n @RolesAllowed({\"administrator\", \"user\", \"visitor\"})\n Response createOrUpdateCalendar(@PathParam(\"id\") Long id, Calendar calendar);", "@SuppressWarnings(\"deprecation\")\r\n\tprivate void createCalendarEntry(){\r\n\t\t\r\n\t\tUri calendars = Uri.parse(CALENDAR_URI);\r\n\t\t \r\n\t\tCursor managedCursor = managedQuery(calendars, projection, null, null, null);\r\n\t\tString calName = \"\"; \r\n\t\tString calId = \"\"; \r\n\t\tif (managedCursor.moveToFirst()) {\r\n\t\t\t \r\n\t\t\t int idColumn = managedCursor.getColumnIndex(projection[0]);\r\n\t\t\t int nameColumn = managedCursor.getColumnIndex(projection[1]); \r\n\t\t\t \r\n\t\t\t do {\r\n\t\t\t calName = managedCursor.getString(nameColumn);\r\n\t\t\t calId = managedCursor.getString(idColumn);\r\n\t\t\t if (calName.contains(\"gmail\"))\r\n\t\t\t \tbreak;\r\n\t\t\t } while (managedCursor.moveToNext());\r\n\t }\r\n\t\t\r\n\t\tlong start = System.currentTimeMillis() + 120000;\r\n\t\tlong duration = DURATION + start;\r\n\t\t\r\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(DATE_START, start);\r\n\t\tvalues.put(DATE_END, duration);\r\n\t\tvalues.put(EVENT_TITLE, ocrData.getMedicine().getMedicine());\r\n\t\tvalues.put(EVENT_DESCRIPTION, \"Take \" + ocrData.getPatient2Medicine().getFrequencyOfIntake() \r\n\t\t\t\t+ \" by \" + ocrData.getPatient2Medicine().getMode());\r\n\t\tvalues.put(CALENDAR_ID, calId);\r\n\t\tvalues.put(EVENT_RULE, \"FREQ=\" + ocrData.getPatient2Medicine().getFrequencyOfIntake() + \";\");\r\n\t\tvalues.put(HAS_ALARM, 1);\r\n\t\t\r\n\t\tContentResolver cr = getContentResolver();\r\n\t\tUri event = cr.insert(Uri.parse(EVENT_URI), values);\r\n\t\t\r\n\t\tvalues = new ContentValues();\r\n\t\tvalues.put(\"event_id\", Long.parseLong(event.getLastPathSegment()));\r\n\t\tvalues.put(\"method\", 1);\r\n\t\tvalues.put(\"minutes\", 10 );\r\n\t\tcr.insert(Uri.parse(REMINDER_URI), values);\r\n\t}", "public static String fromCalendar(final Calendar calendar) {\n\t\t\tDate date = calendar.getTime();\n\t\t\tString formatted = new SimpleDateFormat(dateFormat).format(date);\n\t\t\treturn formatted.substring(0, 22) + \":\" + formatted.substring(22);\n\t\t}", "public String getCalenderId() {\n\t\treturn calenderId;\n\t}", "public String creaEvento(String summary,\n \t\t\t\t\t\t String dateStartEvent,\n \t\t\t\t\t\t String dateEndEvent,\n \t\t\t\t\t\t String calendarId) throws IOException, GeneralSecurityException {\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n Calendar service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME)\n .build();\n\n Event event = new Event()\n \t .setSummary(summary);\n\n //Inizio Evento\n \tDateTime startDateTime = new DateTime(dateStartEvent);\n \tEventDateTime start = new EventDateTime()\n \t\t\t.setDateTime(startDateTime);\n \tevent.setStart(start);\n\n \t//Fine Evento\n \tDateTime endDateTime = new DateTime(dateEndEvent);\n \tEventDateTime end = new EventDateTime()\n \t\t\t.setDateTime(endDateTime);\n \tevent.setEnd(end);\n\n \t//Link di Meet\n \tConferenceSolutionKey key = new ConferenceSolutionKey()\n \t\t\t.setType(\"hangoutsMeet\");\n \tCreateConferenceRequest request = new CreateConferenceRequest()\n \t\t\t.setRequestId(String.valueOf(new Random().nextInt(999999)))\n \t\t\t.setConferenceSolutionKey(key);\n \tConferenceData conferenceData = new ConferenceData()\n \t\t\t.setCreateRequest(request);\n \tevent.setConferenceData(conferenceData);\n \t\n \t//Notifiche\n \tEventReminder[] reminderOverrides = new EventReminder[] {\n \t new EventReminder().setMethod(\"popup\").setMinutes(5),\n \t};\n \tEvent.Reminders reminders = new Event.Reminders()\n \t .setUseDefault(false)\n \t .setOverrides(Arrays.asList(reminderOverrides));\n \tevent.setReminders(reminders);\n\n \t//Creazione Evento\n \tevent = service.events().insert(calendarId, event).setConferenceDataVersion(1).execute();\n \t\n \treturn \"Event created: \" + event.getHtmlLink();\n }", "java.lang.String getBusinessId();", "@Override\n\tpublic org.sakaiproject.calendar.api.Calendar getCalendar(String ref)\n\t\t\tthrows IdUnusedException, PermissionException {\n\t\tSite site = null;\n\t\tif (ref == null){\n\t\t\tsite = getSite();\n\t\t}\n\t\telse{\n\t\t\tsite = getSite(ref);\n\t\t}\n\t\t// We use the e-mail id of the site creator since the Google calendar is created under this id.\n\t\tCalendar googleClient = getGoogleClient(site.getCreatedBy().getEmail());\n\t\treturn new SakaiGCalendarImpl(googleClient);\n\t}", "void addPreferedCalendar(String calendarId);", "java.lang.String getConceptId();", "public int getIdCalendario() {\n\t\treturn idCalendario;\n\t}", "public static String getDateId() {\n Date date = new Date();\n String dateFormatStyle = \"yy-MM-dd-HH-mm-ss\";\n SimpleDateFormat sdf = new SimpleDateFormat(dateFormatStyle);\n String dateFormat = sdf.format(date);\n String[] formatedDate = dateFormat.split(\"-\");\n int i = 0;\n String year = formatedDate[i];\n String month = formatedDate[++i];\n String cDate = formatedDate[++i];\n String hour = formatedDate[++i];\n String minute = formatedDate[++i];\n String second = formatedDate[++i];\n return alphanum[Integer.parseInt(year)]\n .concat(alphanum[Integer.parseInt(month)])\n .concat(alphanum[Integer.parseInt(cDate)])\n .concat(alphanum[Integer.parseInt(hour)])\n .concat(alphanum[Integer.parseInt(minute)])\n .concat(alphanum[Integer.parseInt(second)]);\n }", "public static String fromCalendar(final java.util.Calendar calendar) {\n // TODO: move this method to DateUtils\n Date date = calendar.getTime();\n String formatted = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\").format(date);\n return formatted.substring(0, 22) + \":\" + formatted.substring(22);\n }", "String organizationId();", "public void setCalId(String calId) {\n this.calId = calId == null ? null : calId.trim();\n }", "ExpressionExperimentDetailsValueObject generateSummary( Long id );", "void delPreferedCalendar(String calendarId);", "public String getDayOfTheWeek(){\r\n Calendar calendar = Calendar.getInstance();\r\n int day = calendar.get(Calendar.DAY_OF_WEEK);\r\n String calendar_Id = null;\r\n switch (day) {\r\n case Calendar.SUNDAY:\r\n calendar_Id =\"(90300)\";\r\n break;\r\n case Calendar.MONDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.TUESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.WEDNESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.THURSDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.FRIDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.SATURDAY:\r\n calendar_Id =\"(90200,90238)\";\r\n break;\r\n }\r\n\r\n return calendar_Id;\r\n }", "protected int parseDetailsOOBSourceId(ByteArrayInputStream stream) throws EOFException\n {\n int sourceId = EASMessage.parseUnsignedShort(stream);\n\n if (isOutOfBandAlert() && sourceId != 0)\n {\n try\n {\n this.m_detailsChannelLocator = new OcapLocator(sourceId);\n }\n catch (InvalidLocatorException e)\n {\n if (log.isWarnEnabled())\n {\n log.warn(formatLogMessage(\"Disregarding invalid OOB details channel - \" + e.getMessage()));\n }\n }\n }\n\n return sourceId;\n }", "CalendarDate selectByPrimaryKey(String calendardate);", "public interface CalendarIDs {\n\n String SANTA_ANA_ID = \"thoughtworks.com_526f6f6d2d494e2d42322d53616e7461416e61@resource.calendar.google.com\";\n String PARADE_CAFE_ID = \"thoughtworks.com_34363632303338312d333030@resource.calendar.google.com\";\n}", "@DELETE\n @Path(\"{id}\")\n Response removeCalendarById(@PathParam(\"id\") Long id);", "@Override\n\tpublic CalendarEdit addCalendar(String ref) throws IdUsedException,\n\t\t\tIdInvalidException, PermissionException {\n\t\treturn null;\n\t}", "public Long getIncidentId();", "java.lang.String getAoisId();", "private String getUniqueId(JCas jCas) {\n return ConsumerUtils.getExternalId(getDocumentAnnotation(jCas), contentHashAsId);\n }", "String labPlanId();", "public static int getLastSubjectId() {\n Calendar c = Calendar.getInstance();\n Date now = c.getTime();\n int day;\n int lesson = -1;\n boolean end = false;\n\n SimpleDateFormat s = new SimpleDateFormat(\"dd.MM.yyy HH:mm\", Locale.GERMAN);\n\n if((day = schedule.getTodaysNumber()) < 5) {\n for(int i = 0; i < 9 && !end; i++) {\n c.set(Calendar.HOUR_OF_DAY, Storage.schedule.getTime(i, 0, 0));\n c.set(Calendar.MINUTE, Storage.schedule.getTime(i, 0, 0));\n if(now.before(c.getTime())) {\n lesson = i-1;\n end = true;\n }\n }\n if(lesson == -1) {\n return -1;\n }\n if(Storage.schedule.getLesson(day, lesson) == null) {\n return -1;\n }\n return Storage.schedule.getLesson(day, lesson).getSubjectIndex();\n }\n else {\n return -1;\n }\n }", "String getSecId();", "long getBusinessCircleId();", "private String getAccessSetID(final String _accessset) {\n String ID = null;\n SearchQuery query = new SearchQuery();\n try {\n query.setQueryTypes(\"Admin_Access_AccessSet\");\n query.addWhereExprEqValue(\"Name\", _accessset);\n query.addSelect(\"ID\");\n query.executeWithoutAccessCheck();\n if (query.next()) {\n ID = query.get(\"ID\").toString();\n } else {\n LOG.error(\"Cant't find the ID of the AccessSet for: \" + _accessset);\n }\n } catch (EFapsException e) {\n LOG.error(\"getAccessSetID(String)\", e);\n }\n return ID;\n\n }", "public String convertCalendarMillisecondsAsLongToYearAsString(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"yyyy\"); // not \"yyyy-MM-dd HH:mm:ss\"\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}", "public String getCalendarString() {\n return calendarString;\n }", "OffsetAndEpoch snapshotId();", "@Override\n\tpublic CalendarEdit editCalendar(String ref) throws IdUnusedException,\n\t\t\tPermissionException, InUseException {\n\t\treturn null;\n\t}", "private CalendarEventEdit calendarEvent(Calendar calendar, SignupMeeting meeting, SignupSite site)\n\t\t\tthrows IdUnusedException, PermissionException {\n\t\tCalendarEventEdit addEvent = calendar.addEvent();\n\t\taddEvent.setType(\"Meeting\");\n\t\tif (!site.isSiteScope()) {\n\t\t\tList<Group> groups = groupIds(site);\n\t\t\taddEvent.setGroupAccess(groups, true);\n\t\t}\n\n\t\treturn addEvent;\n\t}", "public void setC_Calendar_ID(int C_Calendar_ID) {\n\t\tif (C_Calendar_ID <= 0)\n\t\t\tset_Value(\"C_Calendar_ID\", null);\n\t\telse\n\t\t\tset_Value(\"C_Calendar_ID\", new Integer(C_Calendar_ID));\n\t}", "long getEncounterId();", "private long insertRecurringEvent(long calID, long startMillis,\n\t\t\tlong endMillis) {\n\t\tlong eventID = 0;\n\n\t\tContentResolver cr = getContentResolver();\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(Events.DTSTART, startMillis);\n\t\tvalues.put(Events.DTEND, endMillis);\n\t\tvalues.put(Events.RRULE, \"FREQ=DAILY;COUNT=10\");\n\t\tvalues.put(Events.TITLE, \"Patient Status Check\");\n\t\tvalues.put(Events.DESCRIPTION,\n\t\t\t\t\"Check weather patient has taken medicines or not\");\n\t\tvalues.put(Events.CALENDAR_ID, calID);\n\t\tvalues.put(Events.EVENT_TIMEZONE, \"America/Los_Angeles\");\n\t\tUri uri = cr.insert(Events.CONTENT_URI, values);\n\n\t\teventID = Long.parseLong(uri.getLastPathSegment());\n\t\treturn eventID;\n\t}", "public static String getcurrentInstance(Calendar calendar, int type) {\n\n Calendar c = Calendar.getInstance();\n c.setTimeInMillis(calendar.getTimeInMillis());\n\n c.add(Calendar.DATE, -1);\n SimpleDateFormat df = CalendarUtils.getSimpleDateFormat(\"yyyy-MM-dd\");\n switch (type) {\n case 1:\n df = CalendarUtils.getSimpleDateFormat(\"dd\");\n break;\n case 2:\n df = CalendarUtils.getSimpleDateFormat(\"MM\");\n break;\n case 3:\n df = CalendarUtils.getSimpleDateFormat(\"yyyy\");\n break;\n\n }\n String formattedDate = df.format(c.getTime());\n return formattedDate;\n }", "String getSourceID();", "public int gethistoryCSId(HistoryItemCS historyCS) {\n String[] input_column = new String[]{KEY_ADDRESS, KEY_DISTRICT, KEY_DESCRIPTION, KEY_TYPE, KEY_SOCKET, KEY_QUANTITY};\n String[] input_data = new String[]{historyCS.getAddress(), historyCS.getDistrict(), historyCS.getDescription(), historyCS.getType(), historyCS.getSocket(), Integer.toString(historyCS.getQuantity())};\n int id = -1;\n\n if(checkHistoryItemCSExist(historyCS)) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < input_column.length; i++) {\n sb.append(input_column[i])\n .append(\"=\\\"\")\n .append(input_data[i])\n .append(\"\\\" \");\n if (i < input_column.length - 1) sb.append(\"AND \");\n }\n String query = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \" + sb.toString();\n Cursor cursor = db.rawQuery(query, null);\n\n if (cursor != null)\n cursor.moveToFirst();\n id = cursor.getInt(0);\n }\n return id;\n }", "public long insert(FCouncilSummaryDO FCouncilSummary) throws DataAccessException {\n \tif (FCouncilSummary == null) {\n \t\tthrow new IllegalArgumentException(\"Can't insert a null data object into db.\");\n \t}\n \t\n getSqlMapClientTemplate().insert(\"MS-F-COUNCIL-SUMMARY-INSERT\", FCouncilSummary);\n\n return FCouncilSummary.getSummaryId();\n }", "String getIdentityId();", "public int deleteById(long summaryId) throws DataAccessException {\n Long param = new Long(summaryId);\n\n return getSqlMapClientTemplate().delete(\"MS-F-COUNCIL-SUMMARY-DELETE-BY-ID\", param);\n }", "java.lang.String getDataInfoId();", "public int updateByFormId(FCouncilSummaryDO FCouncilSummary) throws DataAccessException {\n \tif (FCouncilSummary == null) {\n \t\tthrow new IllegalArgumentException(\"Can't update by a null data object.\");\n \t}\n\n\n return getSqlMapClientTemplate().update(\"MS-F-COUNCIL-SUMMARY-UPDATE-BY-FORM-ID\", FCouncilSummary);\n }", "public int convertCalendarMillisecondsAsLongToDayOfMonthInt(long fingerprint) {\n\t\t\tDateFormat format = new SimpleDateFormat(\"dd\");\n\t\t\tDate date = new Date(fingerprint);\n\t\t\treturn Integer.parseInt(format.format(date));\n\t\t\t}", "public static String nextCalendar(String day, String month, String year) {\n int day2 = Integer.parseInt(day);\n int d = day2 + 1;\n int month2 = Integer.parseInt(month);\n int m = month2 + 1;\n int year2 = Integer.parseInt(year);\n int y = year2 + 1;\n String strd = Integer.toString(d);\n String strm = Integer.toString(m);\n String stry = Integer.toString(y);\n System.out.println(\"day:\" + strd + \" month:\" + strm + \" year:\" + stry);\n return strd;\n }", "String getSlingId();", "public interface CalendarEventDO {\n long getCalendarId();\n\n String getEventTitle();\n\n boolean isAllDay();\n\n long getStartDT();\n\n long getEndDT();\n\n String getRrule();\n\n String getRdate();\n\n String getExrule();\n\n String getExdate();\n\n long getEventID();\n}", "@Override\n @Transactional\n public CalendarEntry getById(final Long id) {\n return getCalendarEntryRepository().getById(id);\n }", "long getSourceId();", "java.lang.String getID();", "java.lang.String getDocumentId();", "public static String createId(CalendarDB db) {\n char[] skipChars = {\n 34, 39, 64, 91, 92, 93, 123, 125\n };\n \n int len = 10;\n char[] cArray = new char[len];\n\n for (int i = 0; i < len; i++) {\n\n boolean isAllowed = false;\n\n Random rand = new Random();\n char r = '0';\n// char test = 53;\n// System.out.println(\"Test char(\"+test+\")\");\n\n //[0] 48-57 0-9\n //[1] 65-90 A-Z\n //[2] 97- 122 a-z\n char[] valids = new char[3];\n \n //checkif the char is valid\n while (!isAllowed) {\n /*\n only takes valid chars. The fourth random just chooses one of the\n three in valids[]. \n */\n valids[0] = (char) RandomHandler.createIntegerFromRange(48, 57, rand);\n valids[1] = (char) RandomHandler.createIntegerFromRange(65, 90, rand);\n valids[2] = (char) RandomHandler.createIntegerFromRange(97, 122, rand);\n int start = 0;\n \n //the first char must not be a number\n if(i == 0)\n start += 1;\n \n r = valids[RandomHandler.createIntegerFromRange(start, 2, rand)];\n\n for (char ch : skipChars) {\n if (r != ch) {\n isAllowed = true;\n } else {\n isAllowed = false;\n }\n }\n }\n\n cArray[i] = r;\n }\n String s = new String(cArray);\n \n //retry creating id when the same is already used in database\n if(db.isIdAvailable(s))\n createId(db);\n \n System.out.println(\"ID created: \" + s);\n return s;\n }", "private String calendarGuidExists(final BwEvent val,\n final boolean annotation,\n final boolean adding) throws CalFacadeException {\n long startTime = System.currentTimeMillis();\n HibSession sess = getSess();\n\n StringBuilder sb = new StringBuilder(\"select ev.name from \");\n\n if (!annotation) {\n sb.append(BwEventObj.class.getName());\n } else {\n sb.append(BwEventAnnotation.class.getName());\n }\n\n sb.append(\" ev where ev.tombstoned = false and \");\n\n BwEvent testEvent = null;\n\n if (!adding) {\n if (annotation) {\n if (val instanceof BwEventProxy) {\n BwEventProxy proxy = (BwEventProxy)val;\n BwEventAnnotation ann = proxy.getRef();\n\n testEvent = ann;\n }\n sb.append(\"ev.override=false and \");\n } else if (!(val instanceof BwEventProxy)) {\n testEvent = val;\n }\n }\n\n if (testEvent != null) {\n sb.append(\"ev<>:event and \");\n }\n\n sb.append(\"ev.colPath=:colPath and \");\n sb.append(\"ev.uid = :uid\");\n\n sess.createQuery(sb.toString());\n /* Change the above to\n * sess.createNoFlushQuery(sb.toString());\n * and we save about 50% of the cpu for some updates. However we can't do\n * just that. The savings come about in not doing the flush which is\n * expensive - however we need it to ensure we are not getting dup uids.\n *\n * To make this work we would need to accumulate uids for the current\n * transaction in a table and check that as well as the db.\n *\n * It's also the case that a concurrent transaction could add uids and\n * a no-flush call will miss those.\n *\n * We may have to live with it but see if we can't speed up the fush. A lot\n * of the COU ends up in hibernate calling java.lang.Class.getInterfaces\n * which is not meant to be called frequently.\n */\n\n\n if (testEvent != null) {\n sess.setEntity(\"event\", testEvent);\n }\n\n sess.setString(\"colPath\", val.getColPath());\n sess.setString(\"uid\", val.getUid());\n\n\n Collection refs = sess.getList();\n\n String res = null;\n\n if (refs.size() != 0) {\n res = (String)refs.iterator().next();\n }\n\n stat(StatsEvent.checkUidTime, startTime);\n\n return res;\n }", "String getGeneralID() throws ApplicationException;", "public YFCDocument getCalendarDetails(String organizationCode, String calenderId) {\n\t\tYFCDocument calenderList = invokeYantraApi(XMLLiterals.GET_CALENDAR_LIST, \n\t\t\t\tgetCalendarDetailsInDoc(organizationCode,calenderId),getCalendarListTempDoc());\n\t\tif(calenderList.getDocumentElement().hasChildNodes()) {\n\t\t\tYFCDocument calenderDetailDoc = invokeYantraApi(XMLLiterals.GET_CALENDAR_DETAILS, \n\t\t\t\t\tgetCalendarDetailsInDoc(organizationCode,calenderId),getCalendarDetailsTemplDoc());\n\t\t\tgetCalenderListForException(calenderDetailDoc);\n\t\t\t}\n\t\treturn calenderList;\n\t}", "public String getToolId(){\n\t\treturn \"sakai.gcalendar\";\t\t\n\t}", "com.google.protobuf.ByteString\n getConceptIdBytes();", "private static String getLabel(final GoogleCalXSettings settings) {\r\n\t\t\tif (settings.getShowCalendarId()) {\r\n\t\t\t\tString label = null;\r\n\t\t\t\tfinal CalendarTarget target = settings.getCalendarTarget();\r\n\t\t\t\tif (target != null) {\r\n\t\t\t\t\tlabel = target.getLabel();\r\n\t\t\t\t}\r\n\t\t\t\tif (label == null || label.isEmpty()) {\r\n\t\t\t\t\tlabel = settings.getCalendarId();\r\n\t\t\t\t}\r\n\t\t\t\treturn localizer.msg(MSG_EXPORT_TEXT, \"Export to {0}\", label);\r\n\t\t\t}\r\n\t\t\treturn localizer.msg(MSG_NO_CALENDAR, \"Export to Google Calendar...\");\r\n\t\t}", "@ApiModelProperty(required = true, value = \"System number for this event\")\n @NotNull\n\n\n public Integer getId() {\n return id;\n }", "public static java.lang.String getCanonicalID(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "String experimentId();", "public abstract CalendarEvent getEventById(User user, String id);", "String getReceiptId();", "String getAcctgTransEntrySeqId();", "String getCreatorId();", "java.lang.String getDataId();", "java.lang.String getDataId();", "public static long getContactInformationId(Uri uri) {\n return ContentUris.parseId(uri);\n }", "private String retrieveCustomCalendarEventId(int blockNum, String eventIds){\n\t\tStringTokenizer token = new StringTokenizer(eventIds,\"|\"); \n\t\tint index=0;\n\t\twhile (token.hasMoreTokens()) {\n\t\t\tif(blockNum == index++)\n\t\t\t\treturn token.nextToken().trim();\n\t\t\telse\n\t\t\t\ttoken.nextToken();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "String artifactSourceId();", "java.lang.String getFolderId();", "com.google.protobuf.ByteString\n getBusinessIdBytes();", "private String computeHeaderIdForText(String header) {\n\t\tString id = header.replaceAll(\"[^a-zA-Z0-9]+\", \"-\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tid = id.toLowerCase();\n\t\tid = id.replaceFirst(\"^[^a-zA-Z0-9]+\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tid = id.replaceFirst(\"[^a-zA-Z0-9]+$\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tif (Strings.isEmpty(id)) {\n\t\t\treturn \"section\"; //$NON-NLS-1$\n\t\t}\n\t\treturn id;\n\t}", "long getAdId();", "public static int convertCalendarToIntDate(Calendar calDate) {\r\n int result = 0;\r\n StringBuilder data = new StringBuilder(\"\");\r\n int year = calDate.get(Calendar.YEAR);\r\n int month = calDate.get(Calendar.MONTH);\r\n month++;\r\n int day = calDate.get(Calendar.DAY_OF_MONTH);\r\n data.append(Integer.toString(year));\r\n switch (month) {\r\n case 1:\r\n case 2:\r\n case 3:\r\n case 4:\r\n case 5:\r\n case 6:\r\n case 7:\r\n case 8:\r\n case 9:\r\n String strMonth = \"0\" + Integer.toString(month);\r\n data.append(strMonth);\r\n break;\r\n default:\r\n data.append(Integer.toString(month));\r\n }\r\n switch (day) {\r\n case 1:\r\n case 2:\r\n case 3:\r\n case 4:\r\n case 5:\r\n case 6:\r\n case 7:\r\n case 8:\r\n case 9:\r\n String strDay = \"0\" + Integer.toString(day);\r\n data.append(strDay);\r\n break;\r\n default:\r\n data.append(Integer.toString(day));\r\n }\r\n result = Integer.parseInt(data.toString());\r\n return result;\r\n }", "public String convertCalendarMillisecondsAsLongToDayOfMonthString(long fingerprint) {\n\t\t\tDateFormat format = new SimpleDateFormat(\"dd\");\n\t\t\tDate date = new Date(fingerprint);\n\t\t\treturn format.format(date);\n\t\t\t}", "protected abstract String getId(String description);", "private String idString(int occurrence) {\n if (occurrence == 0) {\n return null;\n }\n String stringRep = \"\";\n while (occurrence > 0) {\n // generate character from A-Z and add to stringRep\n char nextChar = (char) ((occurrence - 1) % 26 + 'A');\n stringRep = nextChar + stringRep;\n occurrence = (occurrence - 1) / 26;\n }\n return stringRep;\n }", "public String getCalDetails() {\n return calDetails;\n }" ]
[ "0.71750027", "0.6599453", "0.5966577", "0.5883903", "0.5856999", "0.567343", "0.5662097", "0.55935353", "0.55483454", "0.55339086", "0.5508572", "0.5508535", "0.53936315", "0.5387405", "0.5328452", "0.5178895", "0.5126897", "0.5123448", "0.5109509", "0.5062751", "0.5030648", "0.50138795", "0.5009584", "0.49404684", "0.49353513", "0.4900561", "0.48639712", "0.48498467", "0.48453343", "0.484514", "0.48045123", "0.47916725", "0.4753746", "0.4733718", "0.47185543", "0.46977323", "0.4690398", "0.46891817", "0.46850148", "0.46646893", "0.46372396", "0.4633235", "0.46102852", "0.46095115", "0.46036667", "0.46032137", "0.4600989", "0.45843145", "0.45562068", "0.4538625", "0.4527927", "0.45114535", "0.44865862", "0.44739676", "0.44674593", "0.44625747", "0.44578803", "0.44496647", "0.44464245", "0.4443683", "0.44371578", "0.4429385", "0.44288787", "0.44153798", "0.44151172", "0.44119275", "0.44101036", "0.44094914", "0.44023532", "0.43970937", "0.43902117", "0.43854827", "0.43800434", "0.43713686", "0.43638134", "0.4363615", "0.43605167", "0.43503273", "0.43464142", "0.43353367", "0.43331227", "0.43319765", "0.4331271", "0.43301228", "0.4329128", "0.4326547", "0.43260366", "0.43260366", "0.4320291", "0.4317802", "0.43149439", "0.43010512", "0.43009567", "0.43005657", "0.4295096", "0.4294437", "0.42944267", "0.42858526", "0.42774194", "0.42736068" ]
0.8718765
0
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { plusButton.setTooltip(new Tooltip("Agregar nuevo elemento")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "protected void initialize() {\n super.initialize(); // Enables \"drive straight\" controller\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "protected CityController() {\r\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public ClientController() {\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "public ListaSEController() {\n }", "boolean InitController();", "public MenuController() {\r\n\t \r\n\t }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public IfController()\n\t{\n\n\t}", "public TournamentController()\n\t{\n\t\tinitMap();\n\t}", "public GeneralListVueController() {\n\n\t}", "private ClientController() {\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public LogMessageController() {\n\t}", "public LoginPageController() {\n\t}", "public ControllerEnfermaria() {\n }", "public ProvisioningEngineerController() {\n super();\n }", "private StoreController(){}", "public GenericController() {\n }", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "public MapController() {\r\n\t}", "@Override\r\n\tpublic void initControllerBean() throws Exception {\n\t}", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public WfController()\n {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private ClientController(){\n\n }", "public LoginController() {\r\n }", "public PersonasController() {\r\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "public StoreController() {\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public LoginController() {\r\n\r\n }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public SMPFXController() {\n\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public GUIController() {\n\n }", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public void init(final Controller controller){\n Gdx.app.debug(\"View\", \"Initializing\");\n \n this.controller = controller;\n \n //clear old stuff\n cameras.clear();\n \n //set up renderer\n hudCamera = new OrthographicCamera();\n hudCamera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n \n batch = new SpriteBatch();\n igShRenderer = new ShapeRenderer();\n shapeRenderer = new ShapeRenderer();\n \n //set up stage\n stage = new Stage();\n \n //laod cursor\n cursor = new Pixmap(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/images/cursor.png\"));\n\n controller.getLoadMenu().viewInit(this);\n \n initalized = true;\n }", "@PostConstruct\n public void init() {\n WebsocketController.getInstance().setTemplate(this.template);\n try {\n\t\t\tthis.chatController = ChatController.getInstance();\n } catch (final Exception e){\n LOG.error(e.getMessage(), e);\n }\n }", "public ControllerTest()\r\n {\r\n }", "public SearchedRecipeController() {\n }", "public FilmOverviewController() {\n }", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RootLayoutController() {\n }", "public MehController() {\n updateView(null);\n }", "public Controller(int host) {\r\n\t\tsuper(host);\r\n\t}", "public WorkerController(){\r\n\t}", "public TipoInformazioniController() {\n\n\t}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public ProductOverviewController() {\n }", "public ProduktController() {\r\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public PersonLoginController() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public TaxiInformationController() {\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "public CreateDocumentController() {\n }", "public ControllerRol() {\n }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }", "public void init() {\n \n }", "public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}", "public OrderInfoViewuiController() {\n\t\tuserbl = new UserController();\n\t}", "public SessionController() {\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public MainFrameController() {\n }", "public LicenciaController() {\n }", "public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public HomeController() {\n }", "public HomeController() {\n }" ]
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.6912564", "0.688884", "0.6881247", "0.68776786", "0.68723065", "0.6868163", "0.68672407", "0.6851157", "0.6846883", "0.6840198", "0.68382674", "0.68338853", "0.6795918", "0.67823315", "0.6766882", "0.67650586", "0.6750353", "0.6749068", "0.6745654", "0.6743223", "0.67401046", "0.6727867", "0.6723379", "0.6695514", "0.6689967", "0.66892517", "0.66791916", "0.6677345", "0.66644365", "0.6664202", "0.66616154", "0.66532296", "0.66481894", "0.6644939", "0.6639398", "0.6633576", "0.66312426", "0.662608", "0.66258574", "0.66105217", "0.6606984", "0.66024727", "0.6597095", "0.6580141", "0.65786153", "0.65752715", "0.6574144", "0.6551536", "0.655142", "0.6547574", "0.6545647", "0.6541474", "0.6529243", "0.65284246", "0.6525593", "0.6523344", "0.6519832", "0.65134746", "0.65079254", "0.6497635", "0.64952356", "0.6493943", "0.6492926", "0.6483847", "0.6483173", "0.648183", "0.6479119", "0.64789915", "0.6476928", "0.64734083", "0.6465272", "0.64616114", "0.6444024", "0.64379543", "0.6431962", "0.64292705", "0.6425357", "0.6417148", "0.6416786", "0.64161026", "0.64161026" ]
0.0
-1
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { idart.setVisible(false); data = FXCollections.observableArrayList(); loadDataFromDatabase(); setsCllTable(); selected_prop(); btncommande.setOnAction(xx -> { ajoutercommande(); }); btnconsl.setOnAction(event->{try { Pagination p = new Pagination("/fxml/detailCommande.fxml"); } catch (IOException ex) { } ((Node)(event.getSource())).getScene().getWindow().hide();}); // TODO }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "protected void initialize() {\n super.initialize(); // Enables \"drive straight\" controller\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "protected CityController() {\r\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public ClientController() {\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "public ListaSEController() {\n }", "boolean InitController();", "public MenuController() {\r\n\t \r\n\t }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public IfController()\n\t{\n\n\t}", "public TournamentController()\n\t{\n\t\tinitMap();\n\t}", "public GeneralListVueController() {\n\n\t}", "private ClientController() {\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public LogMessageController() {\n\t}", "public LoginPageController() {\n\t}", "public ControllerEnfermaria() {\n }", "public ProvisioningEngineerController() {\n super();\n }", "private StoreController(){}", "public GenericController() {\n }", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "public MapController() {\r\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "@Override\r\n\tpublic void initControllerBean() throws Exception {\n\t}", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public WfController()\n {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private ClientController(){\n\n }", "public LoginController() {\r\n }", "public PersonasController() {\r\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "public StoreController() {\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public LoginController() {\r\n\r\n }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public SMPFXController() {\n\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public GUIController() {\n\n }", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public void init(final Controller controller){\n Gdx.app.debug(\"View\", \"Initializing\");\n \n this.controller = controller;\n \n //clear old stuff\n cameras.clear();\n \n //set up renderer\n hudCamera = new OrthographicCamera();\n hudCamera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n \n batch = new SpriteBatch();\n igShRenderer = new ShapeRenderer();\n shapeRenderer = new ShapeRenderer();\n \n //set up stage\n stage = new Stage();\n \n //laod cursor\n cursor = new Pixmap(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/images/cursor.png\"));\n\n controller.getLoadMenu().viewInit(this);\n \n initalized = true;\n }", "@PostConstruct\n public void init() {\n WebsocketController.getInstance().setTemplate(this.template);\n try {\n\t\t\tthis.chatController = ChatController.getInstance();\n } catch (final Exception e){\n LOG.error(e.getMessage(), e);\n }\n }", "public ControllerTest()\r\n {\r\n }", "public SearchedRecipeController() {\n }", "public FilmOverviewController() {\n }", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RootLayoutController() {\n }", "public MehController() {\n updateView(null);\n }", "public Controller(int host) {\r\n\t\tsuper(host);\r\n\t}", "public TipoInformazioniController() {\n\n\t}", "public WorkerController(){\r\n\t}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public ProductOverviewController() {\n }", "public ProduktController() {\r\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public PersonLoginController() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public TaxiInformationController() {\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "public CreateDocumentController() {\n }", "public ControllerRol() {\n }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }", "public void init() {\n \n }", "public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}", "public OrderInfoViewuiController() {\n\t\tuserbl = new UserController();\n\t}", "public SessionController() {\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public MainFrameController() {\n }", "public LicenciaController() {\n }", "public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public HomeController() {\n }", "public HomeController() {\n }" ]
[ "0.8126442", "0.78539085", "0.7832836", "0.77623755", "0.77623755", "0.76012474", "0.74504834", "0.7437387", "0.7431329", "0.74233705", "0.7406829", "0.7342683", "0.7329348", "0.72642463", "0.7223624", "0.7101346", "0.7058293", "0.6987611", "0.697182", "0.6943626", "0.69122165", "0.6888371", "0.68798083", "0.68793654", "0.68729013", "0.68672144", "0.68671244", "0.6850885", "0.6846919", "0.68397343", "0.6837595", "0.68333036", "0.67969817", "0.6782468", "0.67667216", "0.67645586", "0.6750096", "0.6748695", "0.6744897", "0.6743362", "0.67401564", "0.6728062", "0.67243963", "0.6697463", "0.668971", "0.66884416", "0.6681328", "0.6678264", "0.66650236", "0.66640395", "0.66612506", "0.66533035", "0.66489184", "0.6646337", "0.6639123", "0.6632608", "0.6631185", "0.6627817", "0.6624544", "0.6610567", "0.6605565", "0.66027856", "0.6598283", "0.65813047", "0.6579163", "0.6576047", "0.65744185", "0.6551466", "0.6551001", "0.6547289", "0.6546178", "0.6541605", "0.6528732", "0.6528491", "0.65277237", "0.6523244", "0.65194416", "0.6513512", "0.6509827", "0.6498208", "0.64948505", "0.64934474", "0.6492267", "0.648407", "0.64838904", "0.64821756", "0.64787185", "0.6478498", "0.6477243", "0.6471596", "0.64651674", "0.64609027", "0.64442694", "0.6436732", "0.64321035", "0.6428795", "0.6425759", "0.64167184", "0.6416357", "0.6415472", "0.6415472" ]
0.0
-1
/ renamed from: ayt / compiled from: PG
public interface ayt { /* renamed from: a */ int mo1635a(long j, List list); /* renamed from: a */ long mo1636a(long j, alb alb); /* renamed from: a */ void mo1637a(); /* renamed from: a */ void mo1638a(long j, long j2, List list, ayp ayp); /* renamed from: a */ void mo1639a(ayl ayl); /* renamed from: a */ boolean mo1640a(ayl ayl, boolean z, Exception exc, long j); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String description()\n {\n return \"Generate Postgres C++ Code ODBC\";\n }", "BSQL2Java2 createBSQL2Java2();", "public static void main(String[] args) throws SQLException {\n\t\t\r\n\t}", "protected abstract NativeSQLStatement createNativeTransformStatement(int epsg);", "private String getCodeFragmentGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT_GENEALOGY(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CODE_FRAGMENTS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINKS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CHANGES INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "void gen_table_names(Connection c, PreparedStatement pst ) throws ClassNotFoundException, SQLException\n\t{\n\t String lambda_term_query = \"select subgoal_names from view2subgoals where view = '\"+ name +\"'\";\n\n\t\t\n\t pst = c.prepareStatement(lambda_term_query);\n\t \n\t ResultSet rs = pst.executeQuery();\n\t \n\t if(!rs.wasNull())\n\t {\n\t \twhile(rs.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(rs.getString(1));\n\t\t }\n\t }\n\t \n\t else\n\t {\n\t \tlambda_term_query = \"select subgoal from web_view_table where renamed_view = '\"+ name +\"'\";\n\n\t\t\t\n\t\t pst = c.prepareStatement(lambda_term_query);\n\t\t \n\t\t ResultSet r = pst.executeQuery();\n\n\t\t while(r.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(r.getString(1));\n\t\t }\n\t }\n\t \n\t \n\t \n\n\t}", "public abstract String toSQL();", "public static void main(String args[]){\n String sql = \"select * from TBLS limit 2\";\n String sqlComplex = \"select testpartition.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from testpartition join format_ on (testpartition.filename=format_.s) \" +\n \"join title on (testpartition.filename=title.s) \" +\n \"join identifier on (testpartition.filename=identifier.s) \" +\n \"join id on (testpartition.filename=id.s) \" +\n \"join date_ on (testpartition.filename=date_.s) \" +\n \"where testpartition.gid0=1 and testpartition.sid=2 and testpartition.fid<100000 and testpartition.pfid=0\";\n String sqlOriginal = \"select idTable.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from idTable join format_ on (idTable.filename=format_.s) \" +\n \"join title on (idTable.filename=title.s) \" +\n \"join identifier on (idTable.filename=identifier.s) \" +\n \"join id on (idTable.filename=id.s) \" +\n \"join date_ on (idTable.filename=date_.s) \" +\n \"where idTable.gid0=1 and idTable.sid=2 and idTable.fid<100000\";\n\n QueryRewrite my = new QueryRewrite(sqlOriginal);\n String sqlRewrite = my.rewrite();\n System.out.println(sqlRewrite);\n\n\n }", "String getPostDeclareSql();", "static void jhsdb() {\n\n }", "@Ignore(\"Disabled due to missing functionality in Oracle XE.\")\n @Test\n public void javaSource() throws FlywayException, SQLException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/javasource\");\n flyway.migrate();\n flyway.clean();\n }", "public static void main(String[] args) {\n\n String select = \"select direccion from cliente where idCliente = 3;\", update;\n Connection conexion = BddConnection.newConexionPostgreSQL(\"Ventas\");\n PreparedStatement sentencia;\n Direccion dirCliente;\n ResultSet resul;\n\n try {\n sentencia = conexion.prepareStatement(select);\n resul = sentencia.executeQuery();\n if (resul.next()){\n dirCliente = Direccion.newInstance(resul.getString(1));\n dirCliente.getPoblacion().getProvincia().setProvincia(\"Granada update\");\n update = \"update cliente set direccion = \" + dirCliente.getStringTypeT_Direccion() + \" where idCliente = 3\";\n sentencia = conexion.prepareStatement(update);\n sentencia.executeUpdate();\n }\n resul.close();\n sentencia.close();\n conexion.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws SQLException {\n\t}", "private static StringBuilder generateSqlForVideo(MetaDataType type, IndexParams params) {\n \n StringBuilder sbSQL = new StringBuilder(\"SELECT vd.id\");\n sbSQL.append(SQL_COMMA_SPACE_QUOTE).append(type).append(SQL_AS_VIDEO_TYPE);\n sbSQL.append(\", vd.title, vd.title_original AS originalTitle, vd.title_sort AS sortTitle\");\n sbSQL.append(\", vd.publication_year AS videoYear, vd.release_date as releaseDate\");\n sbSQL.append(\", null AS seriesId, vd.season_id AS seasonId, null AS season, vd.episode AS episode \");\n\t\tif (!params.getLibrary_item()) { sbSQL.append(\", null AS library_base \");}\n sbSQL.append(\", vd.watched AS watched, vd.create_timestamp as createTimestamp \");\n \n sbSQL.append(DataItemTools.addSqlDataItems(params.getDataItems(), \"vd\"));\n\n if (params.checkNewest()) {\n String source = params.getNewestSource();\n if (LITERAL_CREATION.equalsIgnoreCase(source)) {\n sbSQL.append(\", vd.create_timestamp AS newest\");\n } else if (LITERAL_LASTSCAN.equalsIgnoreCase(source)) {\n sbSQL.append(\", vd.last_scanned AS newest\");\n } else {\n params.addParameter(LITERAL_EXTRA, Boolean.FALSE);\n\n sbSQL.append(\", (SELECT MAX(sf.file_date) FROM stage_file sf \");\n sbSQL.append(\"JOIN mediafile mf ON mf.id=sf.mediafile_id JOIN mediafile_videodata mv ON mv.mediafile_id=mf.id \");\n sbSQL.append(\"WHERE mv.videodata_id=vd.id AND sf.file_type\");\n sbSQL.append(SQL_SELECTABLE_VIDEOS);\n sbSQL.append(\"AND sf.status\");\n sbSQL.append(SQL_IGNORE_STATUS_SET);\n sbSQL.append(\"AND mf.extra=:extra) AS newest\");\n }\n }\n\t\tif (params.getLibrary_item()) {\n\t\t\tsbSQL.append(\" ,l.base_directory as library_base from videodata_libraries vl join library l on l.id = vl.library_id join videodata vd on vd.id = vl.data_id WHERE vd.episode\");\n }\n\t\telse {sbSQL.append(\" FROM videodata vd WHERE vd.episode\");}\n \n sbSQL.append(type == MOVIE ? \"<0\" : \">-1\");\n\n if (params.getId() > 0L) {\n sbSQL.append(\" AND vd.id=\").append(params.getId());\n }\n\n if (params.includeYear()) {\n sbSQL.append(\" AND vd.publication_year=\").append(params.getYear());\n } else if (params.excludeYear()) {\n sbSQL.append(\" AND vd.publication_year!=\").append(params.getYear());\n }\n if (params.getYearStart() > 0) {\n sbSQL.append(\" AND vd.publication_year>=\").append(params.getYearStart());\n }\n if (params.getYearEnd() > 0) {\n sbSQL.append(\" AND vd.publication_year<=\").append(params.getYearEnd());\n }\n\n if (params.getWatched() != null) {\n sbSQL.append(\" AND vd.watched=\");\n sbSQL.append(params.getWatched().booleanValue() ? \"1\" : \"0\");\n }\n\t\t\n // check genre inclusion/exclusion\n includeOrExcludeGenre(type, params, sbSQL);\n\n // check studio inclusion/exclusion\n includeOrExcludeStudio(type, params, sbSQL);\n\t\t\n\t\t// check library inclusion/exclusion\n includeOrExcludeLibrary(type, params, sbSQL);\n\n // check country inclusion/exclusion\n includeOrExcludeCountry(type, params, sbSQL);\n\n // check certification inclusion/exclusion\n includeOrExcludeCertification(type, params, sbSQL);\n\n // check award inclusion/exclusion\n includeOrExcludeAward(type, params, sbSQL);\n\n // check video source inclusion/exclusion\n includeOrExcludeVideoSource(type, params, sbSQL);\n\n // check resolution inclusion/exclusion\n includeOrExcludeResolution(type, params, sbSQL);\n\n // check rating inclusion/exclusion\n includeOrExcludeRating(type, params, sbSQL);\n\n // check boxed set inclusion/exclusion\n includeOrExcludeBoxedSet(type, params, sbSQL);\n\n // check newest\n final String newestSource = params.getNewestSource();\n if (newestSource != null) {\n Date newestDate = params.getNewestDate();\n params.addParameter(LITERAL_NEWEST_DATE, newestDate);\n\n if (LITERAL_CREATION.equalsIgnoreCase(newestSource)) {\n if (params.includeNewest()) {\n sbSQL.append(\" AND vd.create_timestamp >= :newestDate\");\n } else {\n sbSQL.append(\" AND vd.create_timestamp < :newestDate\");\n }\n } else if (LITERAL_LASTSCAN.equalsIgnoreCase(newestSource)) {\n if (params.includeNewest()) {\n sbSQL.append(\" AND (vd.last_scanned is null or vd.last_scanned >= :newestDate)\");\n } else {\n sbSQL.append(\" AND vd.last_scanned is not null AND vd.last_scanned < :newestDate\");\n }\n } else {\n params.addParameter(LITERAL_EXTRA, Boolean.FALSE);\n \n addExistsOrNot(params.includeNewest(), sbSQL);\n sbSQL.append(\"SELECT 1 FROM stage_file sf JOIN mediafile mf ON mf.id=sf.mediafile_id \");\n sbSQL.append(\"JOIN mediafile_videodata mv ON mv.mediafile_id=mf.id \");\n sbSQL.append(\"WHERE mv.videodata_id=vd.id AND sf.file_type\");\n sbSQL.append(SQL_SELECTABLE_VIDEOS);\n sbSQL.append(\"AND sf.status!='DUPLICATE' AND mf.extra=:extra AND sf.file_date >= :newestDate)\");\n }\n }\n\n // add the search string, this will be empty if there is no search required\n return sbSQL.append(params.getSearchString(false));\n }", "public static void main(String args[]) throws SQLException {\n }", "public static void main(String[] args) throws ClassNotFoundException {\n new SQLStatement(\"select from org.joy.io.persist.MP3 where t='a'\");\n }", "public static SqlUtil forPostgres() {\r\n return new SqlUtil(POSTGRES);\r\n }", "public PreparedSql generatePreparedSql(String prefix);", "public PreparedSql generatePreparedSql(BoundString prefix);", "public abstract String doTableConvert(String sql);", "public static void main(String args[]){\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassSQLContract classSQLContract=\n new ClassSQLContract(sqlTagsGeneratorTable);\n System.out.println(classSQLContract.getClassSQLContract());\n\t}", "public static void main(String[] args) {\n Map<String, TableInfo> map = TableContext.tables;\n for (TableInfo t : map.values()) {\n createJavaPOFile(t, new MySqlTypeConvertor());\n }\n }", "public abstract void toSQL(StringBuilder ret);", "String toSql();", "abstract protected String buildSQL(BatchSQLEnum sql);", "public static void main(String[] args) {\n\t\tAluno cesar = new Aluno(\"Cesar\",80,26);\n\t\tGenericDao dao = new GenericDao();\n\t\tdao.generateSQL(cesar);\t\t\n\t}", "public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }", "private static StringBuffer generateProvenanceProcedure(String query,\n\t int qIndex) {\n\n\t/*\n\t * First, we need the list of the FROM clause atoms/aliases that we will\n\t * use to augment the SELECT clause with ROWIDs. assume the query is an\n\t * SPJ Select .... From... Where .\n\t */\n\tString uQuery = query.toUpperCase();\n\n\tint fromIndex = uQuery.indexOf(\"FROM\");\n\tint whereIndex = uQuery.indexOf(\"WHERE\");\n\n\tif (whereIndex == -1) {\n\t whereIndex = uQuery.length();\n\t}\n\tString fromClause = query.substring(fromIndex + 4, whereIndex - 1)\n\t\t.trim();\n\t// System.out.println(\"From: \"+fromClause);\n\tStringTokenizer st = new StringTokenizer(fromClause, \",\");\n\n\t// Keep the list of FROM clause atoms\n\tList<String> fromAtoms = new ArrayList<String>();\n\twhile (st.hasMoreTokens()) {\n\t String thisFromAtom = st.nextToken().trim();\n\n\t // System.out.println(\"Atom:\"+thisFromAtom);\n\n\t // bug fixed\n\t // bug: didn't consider \"as\"\n\t if (thisFromAtom.contains(\"as\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"as\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else if (thisFromAtom.contains(\"AS\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"AS\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom, \" \");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t }\n\n\t // original code from Bogdan\n\t // StringTokenizer atomTok = new StringTokenizer(thisFromAtom,\" \");\n\t // String atomAlias = atomTok.nextToken();\n\t // if(atomTok.hasMoreTokens())\n\t // atomAlias=atomTok.nextToken();\n\t // fromAtoms.add(atomAlias);\n\n\t}\n\n\t// System.out.println(\"FROM atoms:\"+fromAtoms);\n\n\t/*\n\t * the extension to the SELECT clause which will be used to extract the\n\t * ROWIDs of the source tuples (why-provenance)\n\t */\n\tStringBuffer selectExtension = new StringBuffer();\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t String fromAtom = fromAtoms.get(i - 1);\n\t selectExtension.append(\", \" + fromAtom + \".\"\n\t\t + Parameters.ROWID_ATT_NAME);\n\t selectExtension.append(\" as src\" + i + \"_ID\");\n\t}\n\tselectExtension.append(\"\\n\\t\\t \");\n\n\t// System.out.println(\"Select extension: \"+selectExtension);\n\tStringBuffer buffer = new StringBuffer();\n\t// buffer.append(\"DELIMITER !\\n\");\n\tbuffer.append(\"CREATE PROCEDURE \" + Parameters.TRACK_PROV_PROCNAME\n\t\t+ \"()\\n\");\n\tbuffer.append(\"BEGIN\\n\\n\");\n\tbuffer.append(\"\\t declare deriv_no int default 0;\\n\");\n\tbuffer.append(\"\\t declare done int default 0;\\n\\n\");\n\n\t// declare res_id_var, src1_id_var, src2_id_var int;\n\tbuffer.append(\"\\t declare res_id_var\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\" int;\\n\");\n\t// declare prov_cursor cursor for\n\t// select __ROWID, src1_ID, src2_ID\n\t// from Q1_RES q_result\n\t// natural join\n\t// (\n\t// select r1.A as A, r1.__ROWID as src1_ID, r2.__ROWID as src2_ID\n\t// from R r1, R r2\n\t// where r1.B=r2.A\n\t// ) prov_query;\n\tbuffer.append(\"\\t declare prov_cursor cursor for\\n\");\n\tbuffer.append(\"\\t\\t select \" + Parameters.ROWID_ATT_NAME);\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_ID\");\n\t}\n\tbuffer.append(\"\\n\");\n\tbuffer.append(\"\\t\\t from \" + Parameters.QUERY_RESULT_PREFIX + qIndex\n\t\t+ Parameters.QUERY_RESULT_SUFFIX);\n\tbuffer.append(\" q_result\\n\");\n\tbuffer.append(\"\\t\\t natural join\\n\");\n\tbuffer.append(\"\\t\\t (\\n\");\n\t// the augmented query here:\n\tStringBuffer queryBuf = new StringBuffer(query);\n\tqueryBuf.insert(fromIndex, selectExtension); // right before the FROM\n\t\t\t\t\t\t // clause\n\tbuffer.append(\"\\t\\t \" + queryBuf + \"\\n\");\n\tbuffer.append(\"\\t\\t ) prov_query;\\n\\n\");\n\tbuffer.append(\"\\t declare continue handler for not found set done = 1;\\n\\n\");\n\tbuffer.append(\"\\t open prov_cursor;\\n\\n\");\n\tbuffer.append(\"\\t read_loop: loop\\n\\n\");\n\tbuffer.append(\"\\t\\t fetch prov_cursor into res_id_var\");\n\t// , src1_id_var, src2_id_var;\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\";\\n\\n\");\n\tbuffer.append(\"\\t\\t if done then leave read_loop;\\n\");\n\tbuffer.append(\"\\t\\t end if;\\n\\n\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\"\\t\\t insert ignore into PROV values (res_id_var,deriv_no,src\"\n\t\t + i + \"_id_var);\\n\");\n\t}\n\t// insert ignore into PROV values (res_id_var,deriv_no,src1_id_var);\n\t// insert ignore into PROV values (res_id_var,deriv_no,src2_id_var);\n\tbuffer.append(\"\\n\\t\\t set deriv_no = deriv_no + 1;\\n\\n\");\n\tbuffer.append(\"\\t end loop;\\n\\n\");\n\tbuffer.append(\"\\t close prov_cursor;\\n\\n\");\n\tbuffer.append(\"END\\n\");\n\treturn buffer;\n }", "public String generateSQL(String database) {\n//\t\tString sql = \"select requesttext from dbc.tables order by createtimestamp\";\n\t\tString sql = CommonConfig.sqlQueryDDL(database);;\n//\t\tif (database!=null && !database.equals(\"\")) {\n//\t\t\tsql = \"select requesttext from dbc.tables where databasename='\"+database+\"' order by createtimestamp\";\n//\t\t}\n \t\treturn sql;\n \t}", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog(\"LOB\");\n DBSchema dBSchema0 = new DBSchema(\"getFloat(String)\", dBCatalog0);\n StringBuilder stringBuilder0 = new StringBuilder((CharSequence) \"getFloat(String)\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"d_Nj^xUc,jo(V.cG^9\", dBSchema0);\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"rename(r@f\";\n stringArray0[2] = \" Y*-X>Nz.q@~K^o8Z]v\";\n stringArray0[3] = \"rename(r@f\";\n stringArray0[4] = \"LOB\";\n stringArray0[5] = \"org.apache.derby.iapi.sql.execute.ExecutionFactory\";\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"getFloat(String)\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n File file0 = MockFile.createTempFile(\"rename(r@f\", \"getFloat(String)\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(file0);\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertEquals(\"d_Nj^xUc,jo(V.cG^9\", defaultDBTable0.getName());\n }", "JavaStatement createJavaStatement();", "public String createCommandLine(IngresVectorwiseLoaderMeta meta) throws KettleException\n {\n StringBuffer sb = new StringBuffer(300);\n \n if ( !Const.isEmpty(meta.getSqlPath()) )\n {\n try\n {\n FileObject fileObject = KettleVFS.getFileObject(environmentSubstitute(meta.getSqlPath()), getTransMeta());\n String sqlexec = Const.optionallyQuoteStringByOS(KettleVFS.getFilename(fileObject));\n sb.append(sqlexec);\n //sql @tc-dwh-test.timocom.net,tcp_ip,VW[ingres,pwd]::dwh\n }\n catch ( KettleFileException ex )\n {\n throw new KettleException(\"Error retrieving 'sql' command string\", ex);\n } \n }\n else\n {\n if(isDetailed()) logDetailed( \"sql defaults to system path\");\n sb.append(\"sql\");\n }\n\n DatabaseMeta dm = meta.getDatabaseMeta();\n if ( dm != null )\n {\n if(meta.isUseDynamicVNode()){\n //logical portname in JDBC use a 7\n String port = environmentSubstitute(Const.NVL(dm.getDatabasePortNumberString(), \"\")).replace(\"7\", \"\");\n String userName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getUsername(), \"\"));\n String passWord = Encr.decryptPasswordOptionallyEncrypted(environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getPassword(), \"\")));\n String hostName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getHostname(), \"\"));\n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n \n sb.append(\" @\").append(hostName).append(\",\").append(port).append(\"[\").append(userName).append(\",\").append(passWord).append(\"]::\").append(dnName);\n }\n else{\n // Database Name\n // \n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n sb.append(\" \").append(dnName);\n }\n }\n else\n {\n throw new KettleException(\"No connection specified\");\n }\n\n return sb.toString(); \n }", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "@Test\n public void testAliasedTableColumns()\n {\n assertEquals(\n runner.execute(\"SELECT * FROM orders AS t (a, b, c, d, e, f, g, h, i)\"),\n runner.execute(\"SELECT * FROM orders\"));\n }", "public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }", "public String toSQL(String tableName, Vector pk, Map additionalColumn)\n {\n /*\n CREATE TABLE distributors (\n did integer,\n name varchar(40) );\n */\n StringBuffer buf = new StringBuffer();\n buf.append(\"CREATE TABLE \" + tableName + \"( \\n\");\n for (Iterator it = attDBTypeList.keySet().iterator(); it.hasNext(); )\n {\n String attribute = (String) it.next();\n String dbtype = (String) attDBTypeList.get(attribute);\n buf.append(\" \" + attribute + \" \" + dbtype + \",\\n\");\n }\n\n if (additionalColumn != null) // 2005-03-28\n {\n for (Iterator it = additionalColumn.keySet().iterator(); it.hasNext(); )\n {\n String attribute = (String) it.next();\n String dbtype = (String) additionalColumn.get(attribute);\n buf.append(\" \" + attribute + \" \" + dbtype + \",\\n\");\n }\n }\n\n /*\n CREATE TABLE distributors (\n did integer CHECK (did > 100),\n name varchar(40),\n CONSTRAINT distributors_pkey PRIMARY KEY (did,name)\n );\n */\n\n if (pk != null)\n {\n buf.append(\"CONSTRAINT \" + tableName + \"_pkey PRIMARY KEY (\");\n for (int i = 0; i < pk.size() - 1; i++)\n {\n buf.append(pk.elementAt(i) + \",\");\n }\n buf.append(pk.elementAt(pk.size() - 1));\n\n buf.append(\"),\\n\");\n }\n\n String sql = buf.toString();\n sql = sql.substring(0, sql.length() - 2); // filter out the last \",\\n\"\n sql = sql + \");\";\n return sql;\n }", "private void setupDb(){\n try {\n openConnection();\n s.executeUpdate(\"CREATE TABLE IF NOT EXISTS LIB (NAME text UNIQUE , TYPE text, LANGUAGE text, INTRUSIVE text, OPENSOURCE text)\");\n }catch (SQLException e) {\n System.err.println(e.getMessage());\n }finally {\n if (c != null){\n close(c);\n }\n }\n }", "private String getSQLScript() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer javaSb = new StringBuffer();\n\t\tsb.append(\"CREATE\").append(\" PROCEDURE \");\n\t\tString procedureName = procNameText.getText();\n\t\tif (procedureName == null) {\n\t\t\tprocedureName = \"\";\n\t\t}\n\t\tsb.append(QuerySyntax.escapeKeyword(procedureName)).append(\"(\");\n\t\tfor (Map<String, String> map : procParamsListData) {\n\t\t\t// \"PARAMS_INDEX\", \"PARAM_NAME\", \"PARAM_TYPE\", \"JAVA_PARAM_TYPE\"\n\t\t\tString name = map.get(\"0\");\n\t\t\tString type = map.get(\"1\");\n\t\t\tString javaType = map.get(\"2\");\n\t\t\tString paramModel = map.get(\"3\");\n\t\t\tString description = map.get(\"4\");\n\t\t\tsb.append(QuerySyntax.escapeKeyword(name)).append(\" \");\n\t\t\tif (!paramModel.equalsIgnoreCase(SPArgsType.IN.toString())) {\n\t\t\t\tsb.append(paramModel).append(\" \");\n\t\t\t}\n\t\t\tsb.append(type);\n\t\t\tif (isCommentSupport && StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t\tsb.append(\",\");\n\t\t\tjavaSb.append(javaType).append(\",\");\n\t\t}\n\t\tif (!procParamsListData.isEmpty()) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\tsb.deleteCharAt(sb.length() - 1);\n\t\t\t}\n\t\t\tif (javaSb.length() > 0) {\n\t\t\t\tjavaSb.deleteCharAt(javaSb.length() - 1);\n\t\t\t}\n\t\t}\n\t\tsb.append(\")\");\n\n\t\tsb.append(StringUtil.NEWLINE).append(\"AS LANGUAGE JAVA \").append(StringUtil.NEWLINE);\n\t\tString javaFuncName = javaNameText.getText();\n\t\tif (javaFuncName == null) {\n\t\t\tjavaFuncName = \"\";\n\t\t}\n\t\tsb.append(\"NAME '\").append(javaFuncName).append(\"(\").append(javaSb).append(\")\").append(\"'\");\n\t\tif (isCommentSupport) {\n\t\t\tString description = procDescriptionText.getText();\n\t\t\tif (StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t}\n\t\treturn formatSql(sb.toString());\n\t}", "public static void main(String[] args) throws SQLException {\n\t\tBasicDataSource dataSource = new BasicDataSource();\n\t\tdataSource.setUrl(\"jdbc:postgresql://localhost:5432/dvdstore\");\n\t\tdataSource.setUsername(\"postgres\");\n\t\tdataSource.setPassword(System.getenv(\"DB_PASSWORD\"));\n\t\n\t\t\n\t\tConnection conn = dataSource.getConnection();\n\t\t\n\t\t/* Create a Statement object so that we can execute a SQL Query */\n\t\tStatement stmt = conn.createStatement();\n\t\t\n\t\t//SQL command - Try this with VS Code to get it working first\n\t\tString filmsUnder90Minutes = \"SELECT film_id, title, description, length FROM film WHERE length < 90; \";\n\t\t\n\t\t//execute the sql command\n\t\tResultSet results = stmt.executeQuery(filmsUnder90Minutes);\n\t\t\n\t\twhile(results.next()) {\n\t\t\tString title = results.getString(\"title\");\n\t\t\tString description = results.getString(\"description\");\n\t\t\tint length = results.getInt(\"length\");\n\t\t\t\n\t\t\tSystem.out.format(\"%-25s %-10d\\n\", title,length);\n\t\t}\n\t\t\n\t\t//we want to know all films starring zero cage\n\t\t//SECURITY VULNERABILITY\n\t\t\n\t\t//String firstName = \"Zero'; DROP table film_category; --\"; SQL INJECTION ATTACK\n\t\tString firstName = \"Zero\";\n\t\tString lastName = \"Cage\";\n\t\t\n\t\tString filmsStarringActor = \"SELECT title \\r\\n\" + \n\t\t\t\t\"FROM film f\\r\\n\" + \n\t\t\t\t\"JOIN film_actor fa ON f.film_id = fa.film_id\\r\\n\" + \n\t\t\t\t\"JOIN actor a ON a.actor_id = fa.actor_id\\r\\n\" + \n\t\t\t\t\"WHERE a.first_name = '\"+firstName.toUpperCase()+\"' and a.last_name = '\"+lastName.toUpperCase()+\"';\";\n\t \n\t\tresults = stmt.executeQuery(filmsStarringActor);\n\t\t\n\t\tSystem.out.println(\"FILMS STARRING ZERO CAGE\");\n\t\t\n\t\twhile(results.next()) {\n\t\t\tString title = results.getString(\"title\");\n\t\t\n\t\t\tSystem.out.println(title);\n\t\t} \n\t\t\n\t\tdataSource.close();\n\t}", "private String getCodeFragmentLinkTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT_LINK(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINK_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"AFTER_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CHANGED INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "private String getCloneGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_GENEALOGY(\");\n \t\tbuilder.append(\"CLONE_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CLONES TEXT NOT NULL,\");\n \t\tbuilder.append(\"CLONE_LINKS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CHANGES INTEGER,\");\n \t\tbuilder.append(\"ADDITIONS INTEGER,\");\n \t\tbuilder.append(\"DELETIONS INTEGER,\");\n \t\tbuilder.append(\"DEAD INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "public static void main(String[] args) throws InterruptedException, FileNotFoundException, IOException {\n for (int i = 0; i < args.length; i++) {\n //System.out.println(args[i]);\n }\n RunSQL2 r = new RunSQL2();\n r.ReadCatalog(args[0]);\n String lines;\n String mainQuery = \"\";\n List<String> tokens = new ArrayList<String>();\n List<String> select = new ArrayList<String>();\n List<String> from = new ArrayList<String>();\n List<String> where = new ArrayList<String>();\n StringBuilder line = new StringBuilder();\n List<String> colName = new ArrayList<String>();\n List<String> ttable = new ArrayList<String>();\n String path = args[1];\n tt1 = new ArrayList<String>();\n tt2 = new ArrayList<String>();\n tt3 = new ArrayList<String>();\n tt4 = new ArrayList<String>();\n tt5 = new ArrayList<String>();\n String tname;\n int tCount = 0;\n int ttCount = 0;\n BufferedReader br = new BufferedReader(new FileReader(path));\n while ((lines = br.readLine()) != null) {\n line.append(lines + \" \");\n }\n if (line.lastIndexOf(\";\") > -1) {\n line.deleteCharAt(line.lastIndexOf(\";\"));\n }\n mainQuery = line.toString();\n StringTokenizer st = new StringTokenizer(line.toString(), \" \");\n while (st.hasMoreTokens()) {\n tokens.add(st.nextToken());\n }\n for (int i = 0; i < tokens.size(); i++) { // SELECTED ATTRIBUTES\n if (tokens.get(i).equalsIgnoreCase(\"select\")) {\n if (tokens.get(i + 1) != null) {\n int j = i;\n while (!tokens.get(j + 1).equalsIgnoreCase(\"from\")) {\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n select.add(sb.toString());\n } else {\n select.add(tokens.get(j + 1));\n }\n j++;\n }\n }\n }\n if (tokens.get(i).equalsIgnoreCase(\"from\")) {\n // TODO: SQL TABLE FROM CLAUSE FORMAT [TABLE S], OR [TABLE]\n if (tokens.get(i + 2) != null) {\n int j = i;\n while (!tokens.get(j + 2).equalsIgnoreCase(\"where\")) {\n //TODO QUERY ERROR IF NO WHERE CLAUSE\n //System.out.println(j);\n //System.out.println(tokens.get(j).toString());\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n from.add(sb.toString());\n } else {\n from.add(tokens.get(j + 1));\n }\n if (j > tokens.size() - 1) {\n break;\n }\n j++;\n }\n }\n }\n }\n\n try {\n String query = \"\";\n List<String> columnNames = new ArrayList<String>();\n Class.forName(driver).newInstance();\n Connection conn;\n Statement stmt = null;\n conn = DriverManager.getConnection(connUrl + \"?verifyServerCertificate=false&useSSL=true\", connUser, connPwd);\n br = new BufferedReader(new FileReader(path));\n query = \"SELECT * FROM DTABLES\";\n PreparedStatement statement = conn\n .prepareStatement(query);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n if (rs.getString(\"TNAME\") != null) {\n tname = rs.getString(\"TNAME\").replaceAll(\"\\\\s+\", \"\");\n if (tname.equalsIgnoreCase(from.get(0))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n t1.add(tname);\n t2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n t3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n t4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n t5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n tCount++;\n }\n if (tname.equalsIgnoreCase(from.get(2))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n tt1.add(tname);\n tt2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n tt3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n tt4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n tt5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n ttCount++;\n }\n }\n }\n conn.close();\n\n // GET ATTRIBUTES FROM THE FIRST TABLE IN ORDER TO CREATE TEMP TABLE\n Class.forName(t2.get(0)).newInstance();\n conn = DriverManager.getConnection(t3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(0), t5.get(0));\n query = \"SELECT * FROM \" + t1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb = new StringBuilder();\n StringBuilder sb1 = new StringBuilder();\n String name;\n String export;\n String tempQuery = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name = rsmd.getColumnName(i);\n sb1.append(name + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb.append(name + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb.append(name + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb.append(name + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb.append(name + \" DECIMAL (15, 2), \");\n }\n }\n sb1.setLength(sb1.length() - 2);\n sb.setLength(sb.length() - 2);\n tempQuery = sb.toString();\n export = sb1.toString();\n\n //System.out.println(sb.toString());\n conn.close();\n\n Class.forName(tt2.get(0)).newInstance();\n conn = DriverManager.getConnection(tt3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(0), tt5.get(0));\n query = \"SELECT * FROM \" + tt1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n columnCount = rsmd.getColumnCount();\n StringBuilder sb2 = new StringBuilder();\n StringBuilder sb3 = new StringBuilder();\n String name1;\n String export1;\n String tempQuery1 = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name1 = rsmd.getColumnName(i);\n sb3.append(name1 + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb2.append(name1 + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb2.append(name1 + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb2.append(name1 + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb2.append(name1 + \" DECIMAL (15, 2), \");\n }\n }\n sb3.setLength(sb3.length() - 2);\n sb2.setLength(sb2.length() - 2);\n tempQuery1 = sb2.toString();\n export1 = sb3.toString();\n //System.out.println(tempQuery1);\n\n //System.out.println(sb.toString());\n conn.close();\n\n // FOR TESTING\n for (int x = 0; x < tt1.size(); x++) {\n //System.out.println(tt1.get(x));\n }\n\n // MAIN\n // CREATE TEMP TABLE FIRST AND JOIN TABLES\n // NOTE: CLOSING CONNECTION WILL DELETE TEMP TABLE\n Class.forName(localdriver).newInstance();\n // NEW CONNECTION (DO NOT USE CONN OR ELSE TEMP TABLE MIGHT DROP)\n final Connection iconn = DriverManager.getConnection(localconnUrl + \"?verifyServerCertificate=false&useSSL=true\", localconnUser, localconnPwd);\n query = \"CREATE TEMPORARY TABLE \" + t1.get(0) + \" (\" + tempQuery + \")\"; // TEMP TABLE FOR TABLE 1\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n query = \"CREATE TEMPORARY TABLE \" + tt1.get(0) + \" (\" + tempQuery1 + \")\"; // TEMP TABLE FOR TABLE 2\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n Thread thread1[] = new Thread[tCount];\n Thread thread2[] = new Thread[ttCount];\n\n for (int z = 0; z < tCount; z++) {\n final int c = z;\n final String d = export;\n // EXPORT ALL DATA TO TEMP TABLE\n thread1[z] = new Thread(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"Working on \" + Thread.currentThread());\n try {\n // EXPORT CONNECTION \n //System.out.println(t3.get(c));\n Class.forName(t2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(t3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(c), t5.get(c));\n //System.out.println(t1.get(c));\n // GETTING DATA FROM TABLE 1\n String exportQuery = \"SELECT * FROM \" + t1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n int columnCount = rsmd.getColumnCount();\n for (int i = 1; i <= columnCount; i++) {\n columnNames.add(rsmd.getColumnName(i));\n }\n //System.out.println(sb.toString());\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + t1.get(0) + \" (\" + d + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getFloat(k + 1);\n //System.out.println(\"temp \" + temp);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n //System.out.println(sb.toString());\n String query2 = sb.toString();\n //System.out.println(query2);\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n\n }\n \n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n } finally {\n //System.out.println();\n }\n\n }\n });\n thread1[z].start();\n }\n\n // CREATE TEMP TABLE FOR SECOND TABLE\n for (int i = 0; i < ttCount; i++) {\n final int c = i;\n thread2[i] = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //System.out.println(\"Working on \" + Thread.currentThread());\n // THIS PART WILL INSERT TABLE 2 DATA TO A NODE\n //if (tt3.get(c).compareToIgnoreCase(localconnUrl) != 0) {\n //System.out.println(tt3.get(c));\n //System.out.println(localconnUrl);\n Class.forName(tt2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(tt3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(c), tt5.get(c));\n String exportQuery = \"SELECT * FROM \" + tt1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n String name = null;\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb1 = new StringBuilder();\n for (int i = 1; i <= columnCount; i++) {\n //System.out.println(rsmd.getColumnName(i));\n columnNames.add(rsmd.getColumnName(i));\n sb1.append(rsmd.getColumnName(i) + \", \");\n }\n sb1.setLength(sb1.length() - 2);\n name = sb1.toString();\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + tt1.get(0) + \" (\" + name + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getDouble(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n String query2 = sb.toString();\n //System.out.println(query2);\n\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n }\n //}\n\n } catch (Exception e) {\n System.err.println(e);\n } finally {\n //System.out.println(\"Done with \" + Thread.currentThread());\n }\n }\n });\n thread2[i].start();\n }\n\n //System.out.println(mainQuery);\n for (int z = 0; z < tCount; z++) {\n thread1[z].join();\n }\n\n for (int z = 0; z < ttCount; z++) {\n thread2[z].join();\n }\n\n // JOIN SQL PERFORMS HERE\n //System.out.println(mainQuery);\n statement = iconn\n .prepareStatement(mainQuery);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n Object temp;\n String output;\n columnCount = rsmd.getColumnCount();\n double temp1;\n while (rs.next()) {\n StringBuilder sbb = new StringBuilder();\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER || rsmd.getColumnType(k + 1) == Types.BIGINT) {\n temp = rs.getInt(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.FLOAT || rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp1 = rs.getDouble(k + 1);\n sbb.append(temp1 + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sbb.append(temp + \" | \");\n } else {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n }\n }\n sbb.setLength(sbb.length() - 1);\n output = sbb.toString();\n System.out.println(output);\n }\n\n conn.close();\n iconn.close();\n } catch (IOException | ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n }\n }", "public interface StatementRewriter\n{\n /**\n * Munge up the SQL as desired. Responsible for figuring out ow to bind any\n * arguments in to the resultant prepared statement.\n *\n * @param sql The SQL to rewrite\n * @param params contains the arguments which have been bound to this statement.\n * @return somethign which can provde the actual SQL to prepare a statement from\n * and which can bind the correct arguments to that prepared statement\n */\n RewrittenStatement rewrite(String sql, Binding params);\n}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Test\n public void qQuote() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/qquote\");\n flyway.migrate();\n }", "public static void main(String[] args) throws SQLException {\n StandAloneDataSource ds = new StandAloneDataSource(\"jdbc:postgresql://localhost:9999/NACID/\", \"postgres\", \"postgres\");\n ApplicationsDB db = new ApplicationsDB(ds, new NomenclaturesDB(ds));\n List<PersonRecord> persons = db.selectRecords(SQL, PersonRecord.class);\n List<CountryRecord> countries = db.selectRecords(CountryRecord.class,null);\n Map<Integer, CountryRecord> countriesMap = new HashMap<Integer, CountryRecord>();\n for (CountryRecord c:countries) {\n countriesMap.put(c.getId(), c);\n }\n Set<Integer> ids = new HashSet<Integer>();\n for (PersonRecord p:persons) {\n List<PersonRecord> personsByCivilIdType = db.selectRecords(PersonRecord.class, \"civil_id = ? and civil_id_type = ? order by id\", p.getCivilId(), p.getCivilIdType());\n for (int i = 0; i < personsByCivilIdType.size(); i++) {\n PersonRecord pr = personsByCivilIdType.get(i);\n ids.add(pr.getId());\n }\n }\n persons = db.selectRecords(PersonRecord.class, \"id in ( \" + StringUtils.join(ids, \",\") + \") order by civil_id, civil_id_type\");\n for (PersonRecord p:persons) {\n CountryRecord birthCountry = countriesMap.get(p.getBirthCountryId());\n CountryRecord citizenship = countriesMap.get(p.getCitizenshipId());\n System.out.println(p.getFName() + \"\\t\" + p.getSName() + \"\\t\" + p.getLName() + \"\\t\" + p.getCivilIdType() + \"\\t`\" + p.getCivilId() + \"\\t\" + (birthCountry == null ? \"\" : birthCountry.getName()) + \"\\t\" + (citizenship == null ? \"\" : citizenship.getName()) + \"\\t\" + p.getBirthDate() + \"\\t\" + p.getBirthCity());\n }\n System.out.println(StringUtils.join(persons, \"\\n\"));\n }", "public String convertStatement (String oraStatement);", "public String convertStatement (String oraStatement);", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n Class.forName(\"org.postgresql.Driver\");\n\n // Connect to the \"bank\" database.\n Connection conn = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:26257/?reWriteBatchedInserts=true&applicationanme=123&sslmode=disable\", \"root\", \"\");\n conn.setAutoCommit(false); // true and false do not make the difference\n // rewrite batch does not make the difference\n\n try {\n // Create the \"accounts\" table.\n conn.createStatement().execute(\"CREATE TABLE IF NOT EXISTS accounts (id serial PRIMARY KEY, balance INT)\");\n\n // Insert two rows into the \"accounts\" table.\n PreparedStatement st = conn.prepareStatement(\"INSERT INTO accounts (balance) VALUES (?), (?) returning id, balance\", \n ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n st.setInt(1, 100); \n st.setInt(2, 200); \n\n ResultSet rs = st.executeQuery();\n\n st = conn.prepareStatement(\"select id1, id2, link_type, visibility, data, time, version from linkbench.linktable where id1 = 9307741 and link_type = 123456790 and time >= 0 and time <= 9223372036854775807 and visibility = 1 order by time desc limit 0 offset 10000\",\n ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n rs = st.executeQuery();\n rs.last();\n int count = rs.getRow();\n rs.beforeFirst();\n System.out.printf(\"# of row in return set is %d\\n\", count);\n\n while (rs.next()) {\n System.out.printf(\"\\taccount %s: %s\\n\", rs.getLong(\"id\"), rs.getInt(\"balance\"));\n }\n } finally {\n // Close the database connection.\n conn.close();\n }\n }", "@Test public void gh1202() {\n execute(new CreateDB(NAME, \"<x/>\"));\n query(\"let $x := 'e' return element e {} / self::e[name() = $x]\", \"<e/>\");\n query(\"let $x := 'f' return element f {} ! self::f[name() = $x]\", \"<f/>\");\n }", "public static void main(String[] args) {\n\t\tString IP = \"jdbc:postgresql://localhost:5432/textdb\";\n\t\tString Username = \"postgres\";\n\t\tString Password = \"yyggdd1219\";\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not load class\" + \"org.postgresql.Driver\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}// try-catch exception\n\t\t//the driver is loaded...\n\t\tSystem.out.println(\"PostgreSQL JDBC Driver found!\");\n\t\t//proceed with a database connection\n\t\tConnection connection = null;\n\t\t//connect to the yacata.dcs.gla.ac.uk:5432\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(IP, Username, Password);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Connection Filed!\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}//try-catch exception\n\t\t//connection to the database is done!\n\t\tif (connection != null) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Controlling your database...\");\n\t\t\t\t//do not forget to close the connection to the database!\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}//try-catch exception\n\t\t}else {\n\t\t\tSystem.out.println(\"Failed to establish connection!\");\n\t\t}//if-else\n\t\t\n\t\t}", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n String string0 = SQLUtil.normalize(\"alter sessionv)y/b{p(k{:tw\", false);\n assertEquals(\"alter sessionv) y / b { p (k { : tw\", string0);\n }", "@Override\n\tprotected Map<String, List<ProcedureParamSrc>> loadProcedures(String databaseName) throws SQLException {\n\t\t Map<String, List<ProcedureParamSrc>> ret=new HashMap<>();\n\t\t Map<String, StringBuffer> textMap=new HashMap<>();\n\t\tString sql=\"SELECT NAME,TEXT FROM ALL_SOURCE WHERE TYPE='PROCEDURE' \"\n\t\t\t\t+ \"and OWNER='\"+databaseName.toUpperCase()+\"'\"\n\t\t\t\t;\n\t\tsql+=\" order by NAME,LINE asc\";\n try(PreparedStatement preparedStatement= connection.prepareStatement(sql);\n \t\tResultSet resultSet=preparedStatement.executeQuery();){\n\t\twhile(resultSet.next()) {\n\t\t String key=resultSet.getString(1)\n\t\t\t\t ,line=resultSet.getString(2)\n\t\t\t\t ;\n\t\t StringBuffer sbr=textMap.get(key);\n\t\t if(sbr==null) {\n\t\t\t sbr=new StringBuffer(\"\");\n\t\t\t textMap.put(key, sbr);\n\t\t\t \n\t\t }\n\t\t if(line.contains(\"--\")) {\n\t\t\t line=line.substring(0,line.indexOf(\"--\"));\n\t\t\t line.replace(\"\\n\", \"\");\n\t\t }\n\t\t sbr.append(line);\n\t\t}\n }\n \n for(Entry<String, StringBuffer> ent:textMap.entrySet()) {\n \t\n \tList<ProcedureParamSrc> paramSrcs=ret.get(ent.getKey());\n \t\n \tString procName=ent.getKey();\n \tif(paramSrcs==null) {\n \t\tparamSrcs=new ArrayList<>();\n \t\tret.put(procName, paramSrcs);\n \t}\n \t\n \tString text=ent.getValue().toString(),t=text.toLowerCase(),p=\"\";\n \tint s=0,e=0;\n \ts=t.indexOf(procName.toLowerCase())+procName.length();\n \tt=t.substring(s);\n \t\n \t\n \ts=t.indexOf(\"(\");\n \t\n \tif(s>=0&&s<5) {\n \t s++;\n \t \n \t \n \t e=t.indexOf(\")\");\n \t\n \t \n \t \n \t p=t.substring(s,e-1);\n \t}\n \t\n \t\n \t\n \tString[] params=p.split(\",\");\n \tfor(String param: params) {\n \t\t// (is_used OUT number, data_ratio OUT number, clob_rest OUT clob)\n if(param.trim().length()==0)continue;\n \t\tString[] subParams=param.trim().split(\" \");\n \t\t\n \t\tObject[] _params= Stream.of(subParams)\n \t\t\t\t.filter(str->!str.isEmpty()).toArray();\n \t\t\n \t\t//System.out.println(param);\n \t\tString name=_params[0].toString().trim()\n \t\t\t\t,io=\"in\"\n \t\t\t\t,type=\"varchar2\"\n \t\t\t\t;\n \t\tif(_params.length==3) {\n \t\t\tio=_params[1].toString().trim();\n \t\ttype=_params[2].toString().trim();\n \t\t}\n \t\tProcedureParamSrc src=new ProcedureParamSrc();\n \t\tsrc.isOutput=io.toUpperCase().equals(\"out\");\n \t\tsrc.paramName=name;\n \t\tif(\"number\".equals(type)) {\n \t\t\tsrc.sqlType=Types.DOUBLE;\n \t\tsrc.cls=Double.class;\n \t\t}\n \t\telse if(\"date\".equals(type)) {\n \t\t\tsrc.sqlType=Types.DATE;\n \t\tsrc.cls=Date.class;\n \t\t}else {\n \t\t\tsrc.sqlType=Types.VARCHAR;\n \t\tsrc.cls=String.class;\n \t\t}\n \t\t\n \t\tparamSrcs.add(src);\n \t}\n \t\n }\n\t\t\n\t\t\n\t\treturn ret;\n\t}", "public static void gExport() throws SQLException, ClassNotFoundException, IOException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tGephi g = new Gephi(conn);\n\t\tg.gpMake();\n\t\tconn.close();\n\t}", "public interface ISQLiteJoinTableCreator {\n\n}", "static void generateImplementation(Table table, Proc proc, PrintWriter outData)\n {\n placeHolder = new PlaceHolder(proc, PostgresCCodeOutputOptions, PlaceHolder.QUESTION, \"\");\n String fullName = table.useName() + proc.upperFirst();\n outData.println(\"void T\" + fullName + \"::Exec()\");\n outData.println(\"{\");\n generateCommand(proc, outData);\n\n Map<String, Integer> duplicateFields = new HashMap<String, Integer>();\n Map<String, Integer> usedFields = new HashMap<String, Integer>();\n Vector<Field> inputs = proc.inputs;\n for (int j = 0; j < inputs.size(); j++)\n {\n Field field = (Field)inputs.elementAt(j);\n duplicateFields.putIfAbsent(field.name, 0);\n usedFields.putIfAbsent(field.name, 0);\n }\n for (int j = 0; j < proc.placeHolders.size(); j++)\n {\n String fieldName = proc.placeHolders.elementAt(j);\n duplicateFields.putIfAbsent(fieldName, 0);\n usedFields.putIfAbsent(fieldName, 0);\n }\n for (int j = 0; j < proc.placeHolders.size(); j++)\n {\n String fieldName = proc.placeHolders.elementAt(j);\n int val = duplicateFields.get(fieldName);\n duplicateFields.put(fieldName, val + 1);\n }\n\n int inputProcSize = proc.inputs.size();\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n inputProcSize = inputProcSize + val - 1;\n }\n }\n\n if (proc.outputs.size() > 0)\n outData.println(\" q_.Open(q_.command, NOBINDS, NODEFINES, NOROWS, ROWSIZE);\");\n else if (proc.inputs.size() > 0)\n outData.println(\" q_.Open(q_.command, \" + inputProcSize + \");\");\n else\n outData.println(\" q_.Open(q_.command);\");\n\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n CommonCCode.generateCppBind(field, outData);\n if (duplicateFields.containsKey(field.name))\n {\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n for (int k = 0; k < val - 1; k++)\n {\n CommonCCode.generateCppBind(field.useName() + (k + 1), field.type, outData);\n }\n }\n }\n }\n \n int currentBindNo = 0;\n Vector<Field> blobs = new Vector<Field>();\n for (int j = 0; j < placeHolder.pairs.size(); j++)\n {\n PlaceHolderPairs pair = (PlaceHolderPairs)placeHolder.pairs.elementAt(j);\n Field field = pair.field;\n String tablename = table.tableNameWithSchema();\n String bind = \"Bind\";\n if (field.type == Field.BLOB) bind += \"Blob\";\n\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n int usedNo = usedFields.get(field.name);\n if (usedNo == 0)\n {\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n else\n {\n outData.println(\" \" + CommonCCode.cppCopy(field.useName() + (usedNo), field));\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field.useName() + (usedNo), field.type, field.length, field.scale, field.precision, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n usedFields.put(field.name, usedNo + 1);\n }\n else\n {\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n\n currentBindNo += 1;\n\n if (field.type == Field.BLOB)\n blobs.addElement(field);\n }\n for (int j = 0; j < proc.outputs.size(); j++)\n {\n Field field = (Field)proc.outputs.elementAt(j);\n String define = \"Define\";\n if (field.type == Field.BLOB) define += \"Blob\";\n //else if (field.type == Field.BIGXML) define += \"BigXML\";\n outData.println(\" q_.\" + define +\"(\" + CommonCCode.padder(\"\" + j + \",\", 4) + CommonCCode.cppDefine(field) + \");\");\n }\n outData.println(\" q_.Exec();\");\n for (int j = 0; j < blobs.size(); j++)\n {\n Field field = (Field)blobs.elementAt(j);\n outData.println(\" SwapBytes(\" + field.useName() + \".len); // fixup len in data on intel type boxes\");\n }\n outData.println(\"}\");\n outData.println();\n boolean skipExecWithParms = false;\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n if (field.type == Field.BLOB)// || field.type == Field.BIGXML)\n {\n skipExecWithParms = true;\n break;\n }\n }\n if (skipExecWithParms == false)\n if ((proc.inputs.size() > 0) || proc.dynamics.size() > 0)\n {\n outData.println(\"void T\" + fullName + \"::Exec(\");\n generateWithParms(proc, outData, \"\");\n outData.println(\")\");\n outData.println(\"{\");\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n if ((CommonCCode.isSequence(field) && proc.isInsert)\n || (CommonCCode.isIdentity(field) && proc.isInsert)\n || field.type == Field.TIMESTAMP\n || field.type == Field.AUTOTIMESTAMP\n || field.type == Field.USERSTAMP)\n continue;\n outData.println(\" \" + CommonCCode.cppCopy(field));\n }\n for (int j = 0; j < proc.dynamics.size(); j++)\n {\n String s = (String)proc.dynamics.elementAt(j);\n outData.println(\" strncpy(\" + s + \", a\" + s + \", sizeof(\" + s + \")-1);\");\n }\n outData.println(\" Exec();\");\n if (proc.outputs.size() > 0 && proc.isInsert)\n outData.println(\" Fetch();\");\n outData.println(\"}\");\n outData.println();\n }\n if (proc.outputs.size() > 0)\n {\n outData.println(\"bool T\" + fullName + \"::Fetch()\");\n outData.println(\"{\");\n outData.println(\" if (q_.Fetch() == false)\");\n outData.println(\" return false;\");\n for (int j = 0; j < proc.outputs.size(); j++)\n {\n Field field = (Field)proc.outputs.elementAt(j);\n outData.println(\" q_.Get(\" + CommonCCode.cppGet(field) + \");\");\n if (CommonCCode.isNull(field))\n outData.println(\" q_.GetNull(\" + field.useName() + \"IsNull, \" + j + \");\");\n }\n outData.println(\" return true;\");\n outData.println(\"}\");\n outData.println();\n }\n }", "public interface SQLConverter {\n String convert(Statement statement, Object params, String mapperId);\n}", "public static void main(String[] args) {\n System.out.println(\"-------- PostgreSQL \"\r\n + \"JDBC Connection Testing ------------\");\r\n\r\n try {\r\n\r\n Class.forName(\"org.postgresql.Driver\");\r\n\r\n } catch (ClassNotFoundException e) {\r\n\r\n System.out.println(\"Where is your PostgreSQL JDBC Driver? \"\r\n + \"Include in your library path!\");\r\n e.printStackTrace();\r\n return;\r\n\r\n }\r\n\r\n System.out.println(\"PostgreSQL JDBC Driver Registered!\");\r\n\r\n (new NewClass()).dbConnect();\r\n\r\n }", "B database(S database);", "public RelNode genScriptPlan(\n HiveParserASTNode trfm, HiveParserQB qb, List<RexNode> operands, RelNode input)\n throws SemanticException {\n boolean isAllRexRef = operands.stream().allMatch(node -> node instanceof RexInputRef);\n int[] transformFieldIndices;\n if (!isAllRexRef) {\n input =\n LogicalProject.create(\n input, Collections.emptyList(), operands, (List<String>) null);\n transformFieldIndices = IntStream.range(0, operands.size()).toArray();\n HiveParserRowResolver rowResolver = new HiveParserRowResolver();\n // record the column info for the project node\n for (int i = 0; i < operands.size(); i++) {\n ColumnInfo oColInfo =\n new ColumnInfo(\n getColumnInternalName(i),\n HiveParserTypeConverter.convert(operands.get(i).getType()),\n null,\n false);\n rowResolver.put(null, getColumnInternalName(i), oColInfo);\n }\n relToRowResolver.put(input, rowResolver);\n } else {\n transformFieldIndices =\n operands.stream()\n .flatMapToInt(node -> IntStream.of(((RexInputRef) node).getIndex()))\n .toArray();\n }\n\n ArrayList<ColumnInfo> inputSchema = relToRowResolver.get(input).getColumnInfos();\n\n // If there is no \"AS\" clause, the output schema will be \"key,value\"\n ArrayList<ColumnInfo> outputCols = new ArrayList<>();\n int inputSerDeNum = 1, inputRecordWriterNum = 2;\n int outputSerDeNum = 4, outputRecordReaderNum = 5;\n int outputColsNum = 6;\n boolean outputColNames = false, outputColSchemas = false;\n int execPos = 3;\n boolean defaultOutputCols = false;\n\n // Go over all the children\n if (trfm.getChildCount() > outputColsNum) {\n HiveParserASTNode outCols = (HiveParserASTNode) trfm.getChild(outputColsNum);\n if (outCols.getType() == HiveASTParser.TOK_ALIASLIST) {\n outputColNames = true;\n } else if (outCols.getType() == HiveASTParser.TOK_TABCOLLIST) {\n outputColSchemas = true;\n }\n }\n\n // If column type is not specified, use a string\n if (!outputColNames && !outputColSchemas) {\n // output schema will be \"key, value\"\n String[] outputAlias = new String[] {\"key\", \"value\"};\n for (int i = 0; i < outputAlias.length; i++) {\n String intName = getColumnInternalName(i);\n ColumnInfo colInfo =\n new ColumnInfo(intName, TypeInfoFactory.stringTypeInfo, null, false);\n colInfo.setAlias(outputAlias[i]);\n outputCols.add(colInfo);\n }\n defaultOutputCols = true;\n } else {\n // column name or type is specified\n HiveParserASTNode collist = (HiveParserASTNode) trfm.getChild(outputColsNum);\n int ccount = collist.getChildCount();\n Set<String> colAliasNamesDuplicateCheck = new HashSet<>();\n for (int i = 0; i < ccount; i++) {\n ColumnInfo colInfo =\n getColumnInfoInScriptTransform(\n (HiveParserASTNode) collist.getChild(i),\n outputColSchemas,\n i,\n colAliasNamesDuplicateCheck);\n outputCols.add(colInfo);\n }\n }\n\n // input schema info\n StringBuilder inpColumns = new StringBuilder();\n StringBuilder inpColumnTypes = new StringBuilder();\n for (int i = 0; i < transformFieldIndices.length; i++) {\n if (i != 0) {\n inpColumns.append(\",\");\n inpColumnTypes.append(\",\");\n }\n inpColumns.append(inputSchema.get(transformFieldIndices[i]).getInternalName());\n inpColumnTypes.append(\n inputSchema.get(transformFieldIndices[i]).getType().getTypeName());\n }\n\n // output schema info\n StringBuilder outColumns = new StringBuilder();\n StringBuilder outColumnTypes = new StringBuilder();\n List<RelDataType> outDataTypes = new ArrayList<>();\n List<String> outColNames = new ArrayList<>();\n HiveParserRowResolver scriptRR = new HiveParserRowResolver();\n RelDataTypeFactory dtFactory = cluster.getRexBuilder().getTypeFactory();\n for (int i = 0; i < outputCols.size(); i++) {\n if (i != 0) {\n outColumns.append(\",\");\n outColumnTypes.append(\",\");\n }\n\n outColumns.append(outputCols.get(i).getInternalName());\n outColumnTypes.append(outputCols.get(i).getType().getTypeName());\n\n scriptRR.put(\n qb.getParseInfo().getAlias(), outputCols.get(i).getAlias(), outputCols.get(i));\n\n outDataTypes.add(HiveParserUtils.toRelDataType(outputCols.get(i).getType(), dtFactory));\n outColNames.add(outputCols.get(i).getInternalName());\n }\n\n String serdeName = LazySimpleSerDe.class.getName();\n int fieldSeparator = Utilities.tabCode;\n if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVESCRIPTESCAPE)) {\n fieldSeparator = Utilities.ctrlaCode;\n }\n\n // Input and Output Serdes\n HiveParserBaseSemanticAnalyzer.SerDeClassProps inSerDeClassProps;\n if (trfm.getChild(inputSerDeNum).getChildCount() > 0) {\n // use user specified serialize class and properties\n HiveParserASTNode inputSerDeNode = (HiveParserASTNode) trfm.getChild(inputSerDeNum);\n inSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) inputSerDeNode.getChild(0),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false);\n } else {\n // use default serialize class and properties\n Map<String, String> inSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false,\n true);\n inSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, inSerdeProps);\n }\n HiveParserBaseSemanticAnalyzer.SerDeClassProps outSerDeClassProps;\n if (trfm.getChild(outputSerDeNum).getChildCount() > 0) {\n // use user specified deserialize class and properties\n HiveParserASTNode outSerDeNode = (HiveParserASTNode) trfm.getChild(outputSerDeNum);\n outSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) outSerDeNode.getChild(0),\n outColumns.toString(),\n outColumnTypes.toString(),\n false);\n } else {\n // use default deserialize class and properties\n Map<String, String> outSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n outColumns.toString(),\n outColumnTypes.toString(),\n defaultOutputCols,\n true);\n outSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, outSerdeProps);\n }\n\n // script input record writer\n Tree recordWriterASTNode = trfm.getChild(inputRecordWriterNum);\n String inRecordWriter =\n recordWriterASTNode.getChildCount() == 0\n ? TextRecordWriter.class.getName()\n : unescapeSQLString(recordWriterASTNode.getChild(0).getText());\n\n // script output record readers\n Tree recordReaderASTNode = trfm.getChild(outputRecordReaderNum);\n String outRecordReader =\n recordReaderASTNode.getChildCount() == 0\n ? TextRecordReader.class.getName()\n : unescapeSQLString(recordReaderASTNode.getChild(0).getText());\n\n RelDataType rowDataType = dtFactory.createStructType(outDataTypes, outColNames);\n\n String script = unescapeSQLString(trfm.getChild(execPos).getText());\n\n ScriptTransformIOInfo inputOutSchema =\n new ScriptTransformIOInfo(\n inSerDeClassProps.getSerdeClassName(),\n inSerDeClassProps.getProperties(),\n outSerDeClassProps.getSerdeClassName(),\n outSerDeClassProps.getProperties(),\n inRecordWriter,\n outRecordReader,\n new JobConfWrapper(new JobConf(hiveConf)));\n\n LogicalScriptTransform scriptTransform =\n LogicalScriptTransform.create(\n input, transformFieldIndices, script, inputOutSchema, rowDataType);\n\n relToHiveColNameCalcitePosMap.put(scriptTransform, buildHiveToCalciteColumnMap(scriptRR));\n relToRowResolver.put(scriptTransform, scriptRR);\n\n // todo\n // Add URI entity for transform script. script assumed t be local unless downloadable\n return scriptTransform;\n }", "public final /* synthetic */ void saveToDb() {\n DruidPooledConnection druidPooledConnection;\n DruidPooledConnection druidPooledConnection2;\n block18: {\n block17: {\n StringBuilder stringBuilder;\n PreparedStatement preparedStatement;\n MaplePet a2;\n if (!a2.a) {\n return;\n }\n try {\n druidPooledConnection2 = DBConPool.getInstance().getDataSource().getConnection();\n try {\n preparedStatement = druidPooledConnection2.prepareStatement(ConcurrentEnumMap.ALLATORIxDEMO(\";\\t*\\u0018:\\u001cN)\\u000b-\\u001dy=\\u001c:y\\u00008\\u0003<NdNfBy\\u0002<\\u0018<\\u0002ySyQuN:\\u00026\\u001d<\\u0000<\\u001d*NdNfBy\\b,\\u00025\\u0000<\\u001d*NdNfBy\\u001d<\\r6\\u0000=\\u001dySyQuN?\\u00028\\t*NdNfBy\\u000b!\\r5\\u001b=\\u000b=NdNfNuN*\\u001e<\\u000b=NdNfBy\\f,\\b?\\u001d2\\u00075\\u00020\\nySyQuN:\\u000f7>0\\r2;)NdNfBy\\u001d2\\u00075\\u00020\\nySyQy9\\u0011+\\u000b+y\\u001e<\\u001a0\\nySyQ\"));\n try {\n int n2;\n PreparedStatement preparedStatement2 = preparedStatement;\n PreparedStatement preparedStatement3 = preparedStatement;\n preparedStatement.setString(1, a2.h);\n preparedStatement3.setByte(2, a2.e);\n preparedStatement3.setShort(3, a2.B);\n preparedStatement2.setByte(4, a2.H);\n preparedStatement2.setInt(5, a2.J);\n preparedStatement.setShort(6, a2.k);\n stringBuilder = new StringBuilder();\n int n3 = n2 = 0;\n while (n3 < a2.d.length) {\n stringBuilder.append(a2.d[n2]);\n stringBuilder.append(KoreanDateUtil.ALLATORIxDEMO(\"V\"));\n n3 = ++n2;\n }\n }\n catch (Throwable throwable) {\n Throwable throwable2;\n if (preparedStatement != null) {\n try {\n preparedStatement.close();\n throwable2 = throwable;\n throw throwable2;\n }\n catch (Throwable throwable3) {\n throwable.addSuppressed(throwable3);\n }\n }\n throwable2 = throwable;\n throw throwable2;\n }\n }\n catch (Throwable throwable) {\n Throwable throwable4;\n if (druidPooledConnection2 != null) {\n try {\n druidPooledConnection2.close();\n throwable4 = throwable;\n throw throwable4;\n }\n catch (Throwable throwable5) {\n throwable.addSuppressed(throwable5);\n }\n }\n throwable4 = throwable;\n throw throwable4;\n }\n }\n catch (SQLException sQLException) {\n FilePrinter.printError(ConcurrentEnumMap.ALLATORIxDEMO(\"\\u0014\\u000f)\\u0002<><\\u001aw\\u001a!\\u001a\"), sQLException, KoreanDateUtil.ALLATORIxDEMO(\"e\\u001b`\\u001fB\\u0015R\\u0018\"));\n return;\n }\n {\n String string = stringBuilder.toString();\n PreparedStatement preparedStatement4 = preparedStatement;\n PreparedStatement preparedStatement5 = preparedStatement;\n PreparedStatement preparedStatement6 = preparedStatement;\n String string2 = string;\n preparedStatement6.setString(7, string2.substring(0, string2.length() - 1));\n preparedStatement6.setInt(8, a2.ALLATORIxDEMO);\n preparedStatement5.setInt(9, a2.I);\n preparedStatement5.setShort(10, a2.K);\n preparedStatement4.setInt(11, a2.M);\n preparedStatement4.setInt(12, a2.D);\n preparedStatement4.executeUpdate();\n a2.a = false;\n if (preparedStatement == null) break block17;\n druidPooledConnection = druidPooledConnection2;\n }\n preparedStatement.close();\n break block18;\n }\n druidPooledConnection = druidPooledConnection2;\n }\n if (druidPooledConnection == null) return;\n druidPooledConnection2.close();\n }", "public static void main(String[] args) throws SQLException, ClassNotFoundException {\n }", "public static void main(String[] args) throws SQLException {\n\t\tPruebaConnOracle conecta = new PruebaConnOracle();\r\n\t\tconecta.getConexion();\r\n\t\tconecta.banner(); \r\n\t}", "private String getCodeFragmentTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_FILE_ID LONG,\");\n \t\tbuilder.append(\"CRD_ID LONG,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"HASH LONG,\");\n \t\tbuilder.append(\"HASH_FOR_CLONE LONG,\");\n \t\tbuilder.append(\"START_LINE INTEGER,\");\n \t\tbuilder.append(\"END_LINE INTEGER,\");\n \t\tbuilder.append(\"SIZE INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"exec\");\n String string0 = SQLUtil.typeAndName(defaultDBTable0);\n assertEquals(\"table exec\", string0);\n }", "@Test\n public void testDAM31901002() {\n // in this case, the boolean type is not supported by oracle db.\n // there is separate sql created to be executed for oracle database\n // however, the sql id that for oracle and other db are same.\n testDAM30802001();\n }", "SELECT createSELECT();", "private String preprocessSql(String text) {\n\t\ttext = text.replace(\"(\\t\", \"(\\r\\n\\t\");\r\n\t\t// MsSql: combine primary key and foreign key clauses into a single line\r\n\t\tPattern pPrimaryKey = Pattern.compile(PRIMARY_KEY_BASE_PATTERN, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);\r\n\t\tMatcher mPrimaryKey = pPrimaryKey.matcher(text);\r\n\t\twhile (mPrimaryKey.find()) {\r\n\t\t\tString originalText = mPrimaryKey.group();\r\n\t\t\tString replacedText = removeNewlines(originalText);\r\n\t\t\ttext = text.replace(originalText, replacedText);\r\n\t\t}\r\n\t\tPattern pForeignKey = Pattern.compile(FOREIGN_KEY_BASE_PATTERN, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);\r\n\t\tMatcher mForeignKey = pForeignKey.matcher(text);\r\n\t\twhile (mForeignKey.find()) {\r\n\t\t\tString originalText = mForeignKey.group();\r\n\t\t\tString replacedText = removeNewlines(originalText);\r\n\t\t\ttext = text.replace(originalText, replacedText);\r\n\t\t}\r\n\t\treturn removeNewlines(text, REPLACE_NEWLINES);\r\n\t}", "String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.404 -0500\", hash_original_method = \"CD5C82C799E78C74801FDB521CEE7324\", hash_generated_method = \"CD5C82C799E78C74801FDB521CEE7324\")\n \nContext ()\n {\n copyTables();\n }", "public abstract String getDB2ProductTypeTestSql();", "SQLCall createSQLCall();", "Statement createStatement();", "Statement createStatement();", "Statement createStatement();", "protected static PreparedStatement prepareStatement(ReviewDb db, String sql)\n throws SQLException {\n return ((JdbcSchema) db).getConnection().prepareStatement(sql);\n }", "public String convertStatement (String oraStatement)\n\t{\n\t\tString retValue[] = m_convert.convert(oraStatement);\n\t\t\n //begin vpj-cd e-evolution 03/14/2005\n\t\tif (retValue.length == 0 )\n\t\t\treturn oraStatement;\n //end vpj-cd e-evolution 03/14/2005\n\t\t\n\t\tif (retValue == null)\n //begin vpj-cd 24/06/2005 e-evolution\t\n\t\t{\t\n\t\t\tlog.log(Level.SEVERE,(\"DB_PostgreSQL.convertStatement - Not Converted (\" + oraStatement + \") - \"\n\t\t\t\t\t+ m_convert.getConversionError()));\n\t\t\tthrow new IllegalArgumentException\n\t\t\t\t(\"DB_PostgreSQL.convertStatement - Not Converted (\" + oraStatement + \") - \"\n\t\t\t\t\t+ m_convert.getConversionError());\n\t\t}\n\t\t//\t\tend vpj-cd 24/06/2005 e-evolution\n\t\tif (retValue.length != 1)\n\t\t\t//begin vpj-cd 24/06/2005 e-evolution\n\t\t\t{\n\t\t\tlog.log(Level.SEVERE, (\"DB_PostgreSQL.convertStatement - Convert Command Number=\" + retValue.length\n\t\t\t\t+ \" (\" + oraStatement + \") - \" + m_convert.getConversionError()));\n\t\t\tthrow new IllegalArgumentException\n\t\t\t\t(\"DB_PostgreSQL.convertStatement - Convert Command Number=\" + retValue.length\n\t\t\t\t\t+ \" (\" + oraStatement + \") - \" + m_convert.getConversionError());\n\t\t\t}\n\t\t\t//end vpj-cd 24/06/2005 e-evolution\n\t\t// Diagnostics (show changed, but not if AD_Error\n\t\tif (!oraStatement.equals(retValue[0]) && retValue[0].indexOf(\"AD_Error\") == -1)\n\t\t\t//begin vpj-cd 24/06/2005 e-evolution\n\t\t\t//System.out.println(\"PostgreSQL =>\" + retValue[0] + \"<= <\" + oraStatement + \">\");\n\t\t\tlog.log(Level.INFO, \"PostgreSQL =>\" + retValue[0] + \"<= <\" + oraStatement + \">\");\n\t\t //end vpj-cd 24/06/2005 e-evolution\n\t\t//\n\t\treturn retValue[0];\n\t}", "public abstract String[] createTablesStatementStrings();", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}", "public interface PreparingTable extends RelOptTable, SqlValidatorTable {\n\n }", "public interface PreparedSqlProvider {\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(String prefix);\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(BoundString prefix);\r\n\r\n}", "public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}", "public static void main(String[] args)\r\n {\n TreeMap<String, String> v_mapDBConf = new TreeMap<>();\r\n //Variable which contains queries to execute.\r\n TreeMap<Integer, String> v_mapQueries = new TreeMap<>();\r\n\r\n Object v_database = null;\r\n\r\n //Affects target database informations and queries to execute into variables.\r\n v_mapDBConf = ConfReader.getConf();\r\n v_mapQueries = ConfReader.getQueries();\r\n\r\n try\r\n {\r\n //Dynamic instantiation corresponding to sgbd.\r\n String dbtype = \"src.database.\"+v_mapDBConf.get(\"DB_TYPE\");\r\n Class<?> clazz = Class.forName(dbtype);\r\n Class[] types = new Class[]{String.class, String.class, String.class, String.class, String.class};\r\n Constructor ct = clazz.getConstructor(types);\r\n v_database = ct.newInstance(new Object[]{v_mapDBConf.get(\"DB_IP_ADDR\"), v_mapDBConf.get(\"DB_PORT\"), v_mapDBConf.get(\"DB_SID\"), v_mapDBConf.get(\"DB_PASS\"), v_mapDBConf.get(\"DB_USER\")});\r\n Method methodConn = clazz.getDeclaredMethod(\"connectDb\");\r\n Method methodDisc = clazz.getSuperclass().getDeclaredMethod(\"disconnectDb\");\r\n Method methodChkConn = clazz.getSuperclass().getDeclaredMethod(\"connectionState\");\r\n\r\n //Connects to database.\r\n methodConn.invoke(v_database);\r\n boolean dbStatus = (boolean) methodChkConn.invoke(v_database);\r\n if (dbStatus)\r\n System.out.println(\"Connected to Database.\");\r\n else\r\n System.out.println(\"Error, not connected to Database.\");\r\n\r\n //Call to XmlBuilder.\r\n XmlBuilder.main((Database) v_database, v_mapQueries);\r\n\r\n //Call to HtmlBuilder.\r\n HtmlReplace.main(\"outputs/auditTemplate.html\", v_mapDBConf.get(\"DB_CLIENT\"), v_mapDBConf.get(\"AUDIT_AUTHOR\"));\r\n HtmlReplace.prepareSummary(\"outputs/htmlFinal.html\");\r\n\r\n //Disconnects from database.\r\n methodDisc.invoke(v_database);\r\n dbStatus = (boolean) methodChkConn.invoke(v_database);\r\n if (!dbStatus)\r\n System.out.println(\"Disconnected from Database.\");\r\n else\r\n System.out.println(\"Error, still connected to Database.\");\r\n } catch (SecurityException e)\r\n {\r\n e.printStackTrace();\r\n } catch (IllegalArgumentException e)\r\n {\r\n e.printStackTrace();\r\n } catch (ClassNotFoundException e)\r\n {\r\n e.printStackTrace();\r\n } catch (InstantiationException e)\r\n {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e)\r\n {\r\n e.printStackTrace();\r\n } catch (NoSuchMethodException e)\r\n {\r\n e.printStackTrace();\r\n } catch (InvocationTargetException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "public static Object PQgen(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"mv0qxfr5hxyhgu3l3m6o47cy\"); // PQgen(int sz)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"do3zjq97xzdk5dhii167i60qh\"); // if (!pq) {\nUNSUPPORTED(\"74u3ayhkzemd24zmbuv7wpym8\"); // pq = (snode**)zmalloc((sz+1)*sizeof(snode*));\nUNSUPPORTED(\"dezukzubu9nms24lhvphuawxq\"); // pq[0] = &guard;\nUNSUPPORTED(\"593hemyh9nreh89upeivll5qx\"); // PQsize = sz;\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"akljrpu8bej9lq4rmsktz8u2e\"); // PQcnt = 0;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}", "public static void main(String[] args) {\n\t\tCreateTable createTable = new CreateTable();\n\n\t\tCity city = new City();\n\t\tcity.setId(1);\n\t\tcreateTable.execute(city);\n\n\t\tProvince province = new Province();\n\t\tprovince.setId(1);\n\t\tcreateTable.execute(province);\n\n\t\tTown town = new Town();\n\t\ttown.setId(1);\n\t\tcreateTable.execute(town);\n\n\t\tDetail detail = new Detail();\n\t\tdetail.setId(1);\n\t\tcreateTable.execute(detail);\n\n\t\tOrder order = new Order();\n\t\torder.setId(1);\n\t\tcreateTable.execute(order);\n\n\t\tBrand2 brand2 = new Brand2();\n\t\tbrand2.setId(1);\n\t\tcreateTable.execute(brand2);\n\n\t\tColor color = new Color();\n\t\tcolor.setId(1);\n\t\tcreateTable.execute(color);\n\n\t\tFeature feature = new Feature();\n\t\tfeature.setId(1);\n\t\tcreateTable.execute(feature);\n\n\t\tImg img = new Img();\n\t\timg.setId(1);\n\t\tcreateTable.execute(img);\n\n\t\tSku sku = new Sku();\n\t\tsku.setId(1);\n\t\tcreateTable.execute(sku);\n\n\t\tType type = new Type();\n\t\ttype.setId(1);\n\t\tcreateTable.execute(type);\n\n\t\tAddr addr = new Addr();\n\t\taddr.setId(1);\n\t\tcreateTable.execute(addr);\n\t\tcreateTable.execute(new Buyer());\n\n\t\t// 商品编号 商品名称 图片 新品 热卖 推荐 上下架 操作选项\n\t\tProduct product = new Product();\n\t\tproduct.setId(001);\n\t\tproduct.setNo(UUID.randomUUID().toString());\n\t\tproduct.setName(\"依琦莲2014瑜伽服套装新款 瑜珈健身服三件套 广场舞蹈服装 女瑜伽服送胸垫 长袖紫色\");\n\t\tproduct.setWeight(56.00);\n\t\tproduct.setIsNew(1); // 1是 0否\n\t\tproduct.setIsHot(1);\n\t\tproduct.setCreateTime(new Date());\n\t\tproduct.setCheckUserId(\"\");\n\t\tproduct.setCheckTime(new Date());\n\t\tproduct.setCreateUserId(\"\");\n\t\tproduct.setIsShow(1);\n\t\tproduct.setIsDel(1);\n\t\tproduct.setTypeId(1);\n\t\tproduct.setBrandId(1);\n\t\tproduct.setKeywords(\"\");\n\t\tproduct.setSales(36);\n\t\tproduct.setDescription(\"不是东西\");\n\t\tproduct.setPackageList(\"\");\n\t\tproduct.setFeature(\"头角狰狞\");\n\t\tproduct.setColor(\"blue\");\n\t\tproduct.setSize(\"L\"); // S,L,XXL\n\t\tcreateTable.execute(product);\n\n\t\t// insert into\n\t\t// Product(id,no,name,weight,isNew,isHot,sales,description,feature,size)value(1,\"11xzc3568\",\"依琦莲2014瑜伽服套装新款女瑜伽服送胸垫\n\t\t// 长袖紫色\",36.12,1,1,110,\"不是东西\",\"头角狰狞\",\"blue\",\"L\");\n\n\t\tEmployee employee = new Employee();\n\t\temployee.setId(1);\n\t\tcreateTable.execute(employee);\n\n\t}", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n File file0 = FileUtil.canonicalFile(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n MockFileOutputStream mockFileOutputStream0 = new MockFileOutputStream(file0, true);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(mockFileOutputStream0, false);\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "public static void main(String[] args) throws SQLException {\n\t\t(new ConvertProcess<PostPartial>(\n\t\t\t\tnew PostPartialProducer(),\n\t\t\t\tnew PostPartialToTagConverter())).run();\n\t\tStoredProcedures.flushTagsToPost();\n\t}", "public static void main(String[] args) {\n\tTestBasicDB testDB = new TestBasicDB();\r\n\ttry {\r\n\t\ttestDB.selectGisaTable();\r\n\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n\t}", "@Test\n public void testRewriteCreate() throws Exception{\n try {\n ParseNode tree = TestQuery.prepareCreateStmtAnalysed();\n ParseNode ansTreeRewritten = TestQuery.prepareCreateStmtRewritten();\n testObj.rewrite(tree);\n System.out.println(tree.toSql());\n assertEquals(ansTreeRewritten.toSql(), tree.toSql());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private String getRevisionTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table REVISION(\");\n \t\tbuilder.append(\"REVISION_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"REVISION_IDENTIFIER TEXT UNIQUE\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "public c b(a aVar) {\n return aVar.a.a(c.b.a(aVar.b).a(aVar.c).a(new f(aVar, new f.a(5) {\n public void b(android.arch.persistence.a.b bVar) {\n bVar.c(\"CREATE TABLE IF NOT EXISTS `Dependency` (`work_spec_id` TEXT NOT NULL, `prerequisite_id` TEXT NOT NULL, PRIMARY KEY(`work_spec_id`, `prerequisite_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`prerequisite_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )\");\n bVar.c(\"CREATE INDEX `index_Dependency_work_spec_id` ON `Dependency` (`work_spec_id`)\");\n bVar.c(\"CREATE INDEX `index_Dependency_prerequisite_id` ON `Dependency` (`prerequisite_id`)\");\n bVar.c(\"CREATE TABLE IF NOT EXISTS `WorkSpec` (`id` TEXT NOT NULL, `state` INTEGER NOT NULL, `worker_class_name` TEXT NOT NULL, `input_merger_class_name` TEXT, `input` BLOB NOT NULL, `output` BLOB NOT NULL, `initial_delay` INTEGER NOT NULL, `interval_duration` INTEGER NOT NULL, `flex_duration` INTEGER NOT NULL, `run_attempt_count` INTEGER NOT NULL, `backoff_policy` INTEGER NOT NULL, `backoff_delay_duration` INTEGER NOT NULL, `period_start_time` INTEGER NOT NULL, `minimum_retention_duration` INTEGER NOT NULL, `schedule_requested_at` INTEGER NOT NULL, `required_network_type` INTEGER, `requires_charging` INTEGER NOT NULL, `requires_device_idle` INTEGER NOT NULL, `requires_battery_not_low` INTEGER NOT NULL, `requires_storage_not_low` INTEGER NOT NULL, `trigger_content_update_delay` INTEGER NOT NULL, `trigger_max_content_delay` INTEGER NOT NULL, `content_uri_triggers` BLOB, PRIMARY KEY(`id`))\");\n bVar.c(\"CREATE INDEX `index_WorkSpec_schedule_requested_at` ON `WorkSpec` (`schedule_requested_at`)\");\n bVar.c(\"CREATE TABLE IF NOT EXISTS `WorkTag` (`tag` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`tag`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )\");\n bVar.c(\"CREATE INDEX `index_WorkTag_work_spec_id` ON `WorkTag` (`work_spec_id`)\");\n bVar.c(\"CREATE TABLE IF NOT EXISTS `SystemIdInfo` (`work_spec_id` TEXT NOT NULL, `system_id` INTEGER NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )\");\n bVar.c(\"CREATE TABLE IF NOT EXISTS `WorkName` (`name` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`name`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )\");\n bVar.c(\"CREATE INDEX `index_WorkName_work_spec_id` ON `WorkName` (`work_spec_id`)\");\n bVar.c(\"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)\");\n bVar.c(\"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \\\"c84d23ade98552f1cec71088c1f0794c\\\")\");\n }\n\n public void a(android.arch.persistence.a.b bVar) {\n bVar.c(\"DROP TABLE IF EXISTS `Dependency`\");\n bVar.c(\"DROP TABLE IF EXISTS `WorkSpec`\");\n bVar.c(\"DROP TABLE IF EXISTS `WorkTag`\");\n bVar.c(\"DROP TABLE IF EXISTS `SystemIdInfo`\");\n bVar.c(\"DROP TABLE IF EXISTS `WorkName`\");\n }\n\n /* Access modifiers changed, original: protected */\n public void d(android.arch.persistence.a.b bVar) {\n if (WorkDatabase_Impl.this.c != null) {\n int size = WorkDatabase_Impl.this.c.size();\n for (int i = 0; i < size; i++) {\n ((RoomDatabase.b) WorkDatabase_Impl.this.c.get(i)).a(bVar);\n }\n }\n }\n\n public void c(android.arch.persistence.a.b bVar) {\n WorkDatabase_Impl.this.a = bVar;\n bVar.c(\"PRAGMA foreign_keys = ON\");\n WorkDatabase_Impl.this.a(bVar);\n if (WorkDatabase_Impl.this.c != null) {\n int size = WorkDatabase_Impl.this.c.size();\n for (int i = 0; i < size; i++) {\n ((RoomDatabase.b) WorkDatabase_Impl.this.c.get(i)).b(bVar);\n }\n }\n }\n\n /* Access modifiers changed, original: protected */\n public void e(android.arch.persistence.a.b bVar) {\n android.arch.persistence.a.b bVar2 = bVar;\n HashMap hashMap = new HashMap(2);\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 1));\n hashMap.put(\"prerequisite_id\", new android.arch.persistence.room.b.b.a(\"prerequisite_id\", \"TEXT\", true, 2));\n HashSet hashSet = new HashSet(2);\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"prerequisite_id\"}), Arrays.asList(new String[]{\"id\"})));\n HashSet hashSet2 = new HashSet(2);\n hashSet2.add(new d(\"index_Dependency_work_spec_id\", false, Arrays.asList(new String[]{\"work_spec_id\"})));\n hashSet2.add(new d(\"index_Dependency_prerequisite_id\", false, Arrays.asList(new String[]{\"prerequisite_id\"})));\n android.arch.persistence.room.b.b bVar3 = new android.arch.persistence.room.b.b(\"Dependency\", hashMap, hashSet, hashSet2);\n android.arch.persistence.room.b.b a = android.arch.persistence.room.b.b.a(bVar2, \"Dependency\");\n StringBuilder stringBuilder;\n if (bVar3.equals(a)) {\n hashMap = new HashMap(23);\n hashMap.put(\"id\", new android.arch.persistence.room.b.b.a(\"id\", \"TEXT\", true, 1));\n hashMap.put(\"state\", new android.arch.persistence.room.b.b.a(\"state\", \"INTEGER\", true, 0));\n hashMap.put(\"worker_class_name\", new android.arch.persistence.room.b.b.a(\"worker_class_name\", \"TEXT\", true, 0));\n hashMap.put(\"input_merger_class_name\", new android.arch.persistence.room.b.b.a(\"input_merger_class_name\", \"TEXT\", false, 0));\n hashMap.put(\"input\", new android.arch.persistence.room.b.b.a(\"input\", \"BLOB\", true, 0));\n hashMap.put(\"output\", new android.arch.persistence.room.b.b.a(\"output\", \"BLOB\", true, 0));\n hashMap.put(\"initial_delay\", new android.arch.persistence.room.b.b.a(\"initial_delay\", \"INTEGER\", true, 0));\n hashMap.put(\"interval_duration\", new android.arch.persistence.room.b.b.a(\"interval_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"flex_duration\", new android.arch.persistence.room.b.b.a(\"flex_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"run_attempt_count\", new android.arch.persistence.room.b.b.a(\"run_attempt_count\", \"INTEGER\", true, 0));\n hashMap.put(\"backoff_policy\", new android.arch.persistence.room.b.b.a(\"backoff_policy\", \"INTEGER\", true, 0));\n hashMap.put(\"backoff_delay_duration\", new android.arch.persistence.room.b.b.a(\"backoff_delay_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"period_start_time\", new android.arch.persistence.room.b.b.a(\"period_start_time\", \"INTEGER\", true, 0));\n hashMap.put(\"minimum_retention_duration\", new android.arch.persistence.room.b.b.a(\"minimum_retention_duration\", \"INTEGER\", true, 0));\n hashMap.put(\"schedule_requested_at\", new android.arch.persistence.room.b.b.a(\"schedule_requested_at\", \"INTEGER\", true, 0));\n hashMap.put(\"required_network_type\", new android.arch.persistence.room.b.b.a(\"required_network_type\", \"INTEGER\", false, 0));\n hashMap.put(\"requires_charging\", new android.arch.persistence.room.b.b.a(\"requires_charging\", \"INTEGER\", true, 0));\n hashMap.put(\"requires_device_idle\", new android.arch.persistence.room.b.b.a(\"requires_device_idle\", \"INTEGER\", true, 0));\n hashMap.put(\"requires_battery_not_low\", new android.arch.persistence.room.b.b.a(\"requires_battery_not_low\", \"INTEGER\", true, 0));\n hashMap.put(\"requires_storage_not_low\", new android.arch.persistence.room.b.b.a(\"requires_storage_not_low\", \"INTEGER\", true, 0));\n hashMap.put(\"trigger_content_update_delay\", new android.arch.persistence.room.b.b.a(\"trigger_content_update_delay\", \"INTEGER\", true, 0));\n hashMap.put(\"trigger_max_content_delay\", new android.arch.persistence.room.b.b.a(\"trigger_max_content_delay\", \"INTEGER\", true, 0));\n hashMap.put(\"content_uri_triggers\", new android.arch.persistence.room.b.b.a(\"content_uri_triggers\", \"BLOB\", false, 0));\n hashSet = new HashSet(0);\n hashSet2 = new HashSet(1);\n hashSet2.add(new d(\"index_WorkSpec_schedule_requested_at\", false, Arrays.asList(new String[]{\"schedule_requested_at\"})));\n bVar3 = new android.arch.persistence.room.b.b(\"WorkSpec\", hashMap, hashSet, hashSet2);\n a = android.arch.persistence.room.b.b.a(bVar2, \"WorkSpec\");\n if (bVar3.equals(a)) {\n hashMap = new HashMap(2);\n hashMap.put(\"tag\", new android.arch.persistence.room.b.b.a(\"tag\", \"TEXT\", true, 1));\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 2));\n hashSet = new HashSet(1);\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n hashSet2 = new HashSet(1);\n hashSet2.add(new d(\"index_WorkTag_work_spec_id\", false, Arrays.asList(new String[]{\"work_spec_id\"})));\n bVar3 = new android.arch.persistence.room.b.b(\"WorkTag\", hashMap, hashSet, hashSet2);\n a = android.arch.persistence.room.b.b.a(bVar2, \"WorkTag\");\n if (bVar3.equals(a)) {\n hashMap = new HashMap(2);\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 1));\n hashMap.put(\"system_id\", new android.arch.persistence.room.b.b.a(\"system_id\", \"INTEGER\", true, 0));\n hashSet = new HashSet(1);\n hashSet.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n bVar3 = new android.arch.persistence.room.b.b(\"SystemIdInfo\", hashMap, hashSet, new HashSet(0));\n a = android.arch.persistence.room.b.b.a(bVar2, \"SystemIdInfo\");\n if (bVar3.equals(a)) {\n hashMap = new HashMap(2);\n hashMap.put(\"name\", new android.arch.persistence.room.b.b.a(\"name\", \"TEXT\", true, 1));\n hashMap.put(\"work_spec_id\", new android.arch.persistence.room.b.b.a(\"work_spec_id\", \"TEXT\", true, 2));\n HashSet hashSet3 = new HashSet(1);\n hashSet3.add(new android.arch.persistence.room.b.b.b(\"WorkSpec\", \"CASCADE\", \"CASCADE\", Arrays.asList(new String[]{\"work_spec_id\"}), Arrays.asList(new String[]{\"id\"})));\n hashSet = new HashSet(1);\n hashSet.add(new d(\"index_WorkName_work_spec_id\", false, Arrays.asList(new String[]{\"work_spec_id\"})));\n android.arch.persistence.room.b.b bVar4 = new android.arch.persistence.room.b.b(\"WorkName\", hashMap, hashSet3, hashSet);\n android.arch.persistence.room.b.b a2 = android.arch.persistence.room.b.b.a(bVar2, \"WorkName\");\n if (!bVar4.equals(a2)) {\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle WorkName(androidx.work.impl.model.WorkName).\\n Expected:\\n\");\n stringBuilder.append(bVar4);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a2);\n throw new IllegalStateException(stringBuilder.toString());\n }\n return;\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle SystemIdInfo(androidx.work.impl.model.SystemIdInfo).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle WorkTag(androidx.work.impl.model.WorkTag).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle WorkSpec(androidx.work.impl.model.WorkSpec).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Migration didn't properly handle Dependency(androidx.work.impl.model.Dependency).\\n Expected:\\n\");\n stringBuilder.append(bVar3);\n stringBuilder.append(\"\\n Found:\\n\");\n stringBuilder.append(a);\n throw new IllegalStateException(stringBuilder.toString());\n }\n }, \"c84d23ade98552f1cec71088c1f0794c\", \"1db8206f0da6aa81bbdd2d99a82d9e14\")).a());\n }", "public static void main(String args[]){\n //---------------------------------------------------------------------------\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassVariables classVariables=new ClassVariables(sqlTagsGeneratorTable);\n System.out.println(classVariables.getClassVariablesMethods());\n\t}", "void genAst();", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\" WHERE \");\n String string0 = SQLUtil.typeAndName(defaultDBTable0);\n assertEquals(\"table WHERE \", string0);\n }", "public static void main(String[] args) throws Exception {\n\t\tConvertDB2ToOracle_v2 convert = getInstance();\n\t\tconvert.provide(\"D:\\\\others\\\\temp\\\\db2-extra-tables.txt\");\n\t\tconvert.extractSQL(\"D:\\\\others\\\\temp\\\\ddlfile.sql\");\n\t}", "private CompareDB () {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public abstract void mo42331g();", "private String createTableSQL()\n\t{\n\t\tStringBuffer str = new StringBuffer();\n\n\t\t// Keep track of the list of fields\n\t\tList<String> listFields = new ArrayList<String>();\n\n\t\t// Table command\n\t\tstr.append(\"CREATE TABLE \" + getFullPath() + \"( \");\n\t\tstr.append(createStandardGZFields());\n\n\t\t// Loop through all InputFields\n\t\tfor (InputFieldSet fieldSet : function.getInputFieldSets())\n\t\t{\n\t\t\tfor (InputField inputField : fieldSet.getInputFields())\n\t\t\t{\n\t\t\t\t// Phase 2 does not support repeating fields being journalled\n\t\t\t\tif (!Field.isRepeating(inputField))\n\t\t\t\t{\n\t\t\t\t\t// Field\n\t\t\t\t\tString fieldName = SQLToolbox.cvtToSQLFieldName(inputField.getId());\n\n\t\t\t\t\t// add if not yet existing\n\t\t\t\t\tif (listFields.indexOf(fieldName) == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr.append(\", \");\n\t\t\t\t\t\tString fieldDataType = inputField.getDataType();\n\t\t\t\t\t\tString fieldType = SQLToolbox.cvtToSQLFieldType(fieldDataType, inputField.getSize(), inputField\n\t\t\t\t\t\t\t\t\t\t.getDecimals());\n\t\t\t\t\t\tString fieldDefault = SQLToolbox.cvtToSQLDefault(fieldDataType);\n\t\t\t\t\t\tstr.append(fieldName + \" \" + fieldType + \" \" + \" not null default \" + fieldDefault);\n\t\t\t\t\t\tlistFields.add(fieldName);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End\n\t\tstr.append(\" ) \");\n\t\t// RCDFMT \" + getJournalRcdName());\n\n\t\treturn str.toString();\n\t}", "public static void main(String[] args) {\n\t\tDao dao = new PostgresDao();\n\t\tnew Client().getData(dao);\n\t}", "public static void main(String[] args) throws SQLException {\r\n\t\t\r\n\t\tString uno = UUID.randomUUID().toString();\r\n\t\tString dos = UUID.randomUUID().toString();\r\n\t\t\r\n\t\tString tres = uno + dos;\r\n\t\t\r\n\t\tSystem.out.println(\"Uno : \" + uno);\r\n\t\tSystem.out.println(\"Dos : \" + dos);\r\n\t\tSystem.out.println(\"Tres: \" + tres);\r\n\t\t\r\n\t}", "protected static Statement newStatement(ReviewDb db) throws SQLException {\n return ((JdbcSchema) db).getConnection().createStatement();\n }" ]
[ "0.590005", "0.5693346", "0.55743724", "0.5508022", "0.5505597", "0.5475484", "0.53981584", "0.5390148", "0.5355006", "0.5328841", "0.5321719", "0.5319684", "0.53162545", "0.5274464", "0.5268581", "0.52671975", "0.52667934", "0.5248175", "0.5235341", "0.5193771", "0.5180127", "0.5173486", "0.51665026", "0.51453424", "0.51393193", "0.5129772", "0.51282483", "0.5125609", "0.5123984", "0.5117844", "0.511189", "0.5109599", "0.50972563", "0.5089791", "0.50821584", "0.505311", "0.50498104", "0.5048518", "0.50482357", "0.5047813", "0.5039011", "0.5037795", "0.5037185", "0.50225306", "0.5017839", "0.49922392", "0.4984401", "0.4984401", "0.49842295", "0.4984104", "0.49703458", "0.4958933", "0.49559295", "0.4947466", "0.49469772", "0.49440476", "0.4940962", "0.4940328", "0.49354008", "0.49255803", "0.49195024", "0.4914009", "0.4910187", "0.4903622", "0.489614", "0.48924148", "0.48923457", "0.48915395", "0.4888007", "0.48855373", "0.48705825", "0.48661497", "0.48657846", "0.48657846", "0.48657846", "0.48547578", "0.4854739", "0.4851223", "0.48507792", "0.48461926", "0.48454216", "0.48417228", "0.48411873", "0.48394284", "0.48391166", "0.48359329", "0.48353457", "0.48339063", "0.48322606", "0.4831858", "0.4829923", "0.48288086", "0.4828783", "0.48240876", "0.48202372", "0.48147422", "0.4811604", "0.48109916", "0.48062536", "0.48060274", "0.48023942" ]
0.0
-1
/ renamed from: a
int mo1635a(long j, List list);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
long mo1636a(long j, alb alb);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
void mo1637a();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.6249595", "0.6242955", "0.61393225", "0.6117684", "0.61140615", "0.60893875", "0.6046927", "0.60248226", "0.60201806", "0.59753186", "0.5947817", "0.5912414", "0.5883872", "0.5878469", "0.587005", "0.58678955", "0.58651674", "0.5857262", "0.58311176", "0.58279663", "0.58274275", "0.5794977", "0.57889086", "0.57837564", "0.5775938", "0.57696944", "0.57688814", "0.5752557", "0.5690739", "0.5678386", "0.567034", "0.56661606", "0.56595623", "0.56588095", "0.56576085", "0.5654566", "0.56445956", "0.56401736", "0.5638699", "0.56305", "0.56179273", "0.56157446", "0.5607045", "0.5605239", "0.5600648", "0.5595156", "0.55912733", "0.5590759", "0.5573802", "0.5556659", "0.55545336", "0.5550466", "0.5549409", "0.5544484", "0.55377364", "0.55291194", "0.55285007", "0.55267704", "0.5525843", "0.5522067", "0.5520236", "0.55098593", "0.5507351", "0.5488173", "0.54860324", "0.54823226", "0.5481975", "0.5481588", "0.5480086", "0.5478032", "0.54676044", "0.5463578", "0.54506475", "0.54438734", "0.5440832", "0.5440053", "0.5432095", "0.5422814", "0.5421934", "0.54180306", "0.5403851", "0.5400144", "0.5400042", "0.5394655", "0.53891194", "0.5388751", "0.53749055", "0.53691155", "0.53590924", "0.5356525", "0.5355397", "0.535498", "0.5354871", "0.535003", "0.5341249", "0.5326222", "0.53232485", "0.53197914", "0.5316941", "0.5311645", "0.5298656" ]
0.0
-1
/ renamed from: a
void mo1638a(long j, long j2, List list, ayp ayp);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
void mo1639a(ayl ayl);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
Enlever la title bar de l'application
@Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); setContentView(R.layout.config_fullscreen); sharedPreferences = getSharedPreferences("My_pref", Activity.MODE_PRIVATE); login = (EditText)findViewById(R.id.editTextLogin); login.setText(sharedPreferences.getString("loginSaved", "Login")); password = (EditText)findViewById(R.id.editTextPassword); password.setText("Password"); nameSurname = (EditText)findViewById(R.id.editTextNameSurname); street = (EditText)findViewById(R.id.editTextStreet); city = (EditText)findViewById(R.id.editTextCity); postalCode = (EditText)findViewById(R.id.editTextPostalCode); phoneNumber = (EditText)findViewById(R.id.editTextPhoneNumber); email = (EditText)findViewById(R.id.editTextEmail); spin1 = (Spinner)findViewById(R.id.spinner1); spin2 = (Spinner)findViewById(R.id.spinner2); spin3 = (Spinner)findViewById(R.id.spinner3); if (connected) { nameSurname.setText(sharedPreferences.getString("nameSurnameSaved", "Name & Surname")); street.setText(sharedPreferences.getString("streetSaved", "Street ...")); city.setText(sharedPreferences.getString("citySaved", "City ...")); postalCode.setText(sharedPreferences.getString("postalCodeSaved", "Postal code ...")); phoneNumber.setText(sharedPreferences.getString("phoneNumberSaved", "Email")); email.setText(sharedPreferences.getString("emailSaved", "Phone number")); spin1.setSelection(((ArrayAdapter<String>)spin1.getAdapter()).getPosition(sharedPreferences.getString("spin1Saved", "Favorite pizza 1st : Reine"))); spin2.setSelection(((ArrayAdapter<String>)spin1.getAdapter()).getPosition(sharedPreferences.getString("spin2Saved", "Favorite pizza 1st : Reine"))); spin3.setSelection(((ArrayAdapter<String>)spin1.getAdapter()).getPosition(sharedPreferences.getString("spin3Saved", "Favorite pizza 1st : Reine"))); } else { nameSurname.setClickable(false); nameSurname.setEnabled(false); street.setClickable(false); street.setEnabled(false); city.setClickable(false); city.setEnabled(false); postalCode.setClickable(false); postalCode.setEnabled(false); phoneNumber.setClickable(false); phoneNumber.setEnabled(false); email.setClickable(false); email.setEnabled(false); spin1.setClickable(false); spin1.setEnabled(false); spin2.setClickable(false); spin2.setEnabled(false); spin3.setClickable(false); spin3.setEnabled(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showTitleScreen() {\n frame.showMenu();\n }", "@Override\n protected void updateTitle()\n {\n String frameName =\n SWTStringUtil.insertEllipsis(frame.getName(),\n StringUtil.NO_FRONT,\n SWTStringUtil.DEFAULT_FONT);\n\n view.setWindowTitle(modificationFlag\n + FRAME_PREFIX\n + \": \"\n + project.getName()\n + \" > \"\n + design.getName()\n + \" > \"\n + frameName\n + ((OSUtils.MACOSX) ? \"\" : UI.WINDOW_TITLE));\n }", "private void setWindowTitle(String title) {\n this.title = title;\n }", "private void setActionBar() {\n headView.setText(\"消息中心\");\n headView.setGobackVisible();\n headView.setRightGone();\n // headView.setRightResource();\n }", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "private void setActivityTitle(){\n binding.actionbar.title.setText(R.string.application_guide);\n }", "@Override\n\tprotected void onConfigrationTitleBar() {\n\t\tsetTitleBarTitleText(R.string.shujuxiazai);\n setTitleBarLeftImageButtonImageResource(R.drawable.title_back);\n\t}", "public abstract String getBarTitle();", "private void frameSettings(String title) {\r\n\t\tsetTitle(title);\r\n\r\n\t\tsetSize(400, 720);\r\n\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetUndecorated(true); // Do not display the buttons of the frame\r\n\t\tsetAlwaysOnTop(true);\r\n\t\tsetResizable(false);\r\n\t\tsetBackground(new Color(0, 0, 0, 0));\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t}", "private void hideTheWindowTitle() {\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t}", "@Override\n public void setTitleBar(TitleBar titleBar) {\n super.setTitleBar(titleBar);\n titleBar.hideButtons();\n titleBar.showBackButton();\n titleBar.setSubHeading(getString(R.string.signup));\n }", "private void setToolbar() {\r\n String appName = AppConstants.APP_NAME;\r\n Toolbar toolbar = findViewById(R.id.toolbar);\r\n setSupportActionBar(toolbar);\r\n getSupportActionBar().setTitle(appName);\r\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n }", "public void displayTitle() {\n\t\tthis.theScreen.setFont(Preferences.TITLE_FONT);\n\t\tthis.theScreen.setColor(Preferences.TITLE_COLOR);\n\t\tthis.theScreen.drawString(Preferences.TITLE,\n\t\t\t\tPreferences.TITLE_X, Preferences.TITLE_Y);\n\t}", "private void create_toolbar() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setTitle(\"Event Planner\");//this will set the title of our application\n\n }", "@Override\n\tprotected void initTitle() {\n\t\tsetTitleContent(R.string.tocash);\n\t\tsetBtnBack();\n\t}", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_scienceApp.setTitle(title);\n\t}", "@Override\n public String getTitle() {\n return string(\"sd-l-toolbar\");\n }", "void setTitle(java.lang.String title);", "public void setTitlePanel() {\n\t\ttitleview = new TitlePanelView();\n\t\ttitleview.createView();\n\t\tnorthpanel.add(titleview.getView());\n\t\n\t}", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, true, true));\n\t\t\n\t\tJLabel title = GUIComponents.createLabel(YAETMMainView.PROGRAM, new Point(45, 12));\n\t\ttitle.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\n\t\t\n\t\tJLabel titleExtend = GUIComponents.createLabel(YAETMMainView.PROGRAMEXT, new Point(10, 33));\n\t\ttitleExtend.setSize(200, 20);\n\t\ttitleExtend.setFont(new Font(\"Arial\", Font.PLAIN, 11));\n\t\t\n\t\ttitlePanel.add(titleExtend);\n\t\ttitlePanel.add(title);\n\t\tpanel.add(titlePanel);\n\t}", "public void setTitle(int title){\n if (getSupportActionBar() != null) {\n getSupportActionBar().setTitle(title);\n }\n }", "public void setTitle(String title) {\n// toolbar.setTitle(title);\n// setSupportActionBar(toolbar);\n// resetNavigationOnClickListener();\n titleTextView.setText(title);\n }", "public void setPrefTitle(int resId) {\n if (getActivity() == null)\n return;\n\n ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();\n if (actionBar != null) {\n actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME\n | ActionBar.DISPLAY_USE_LOGO\n | ActionBar.DISPLAY_SHOW_TITLE);\n\n actionBar.setLogo(R.drawable.ic_icon);\n actionBar.setTitle(resId);\n }\n }", "public void setTitle(java.lang.String title);", "public void setTitle (String title) {\n _frame.setTitle(title);\n }", "@Override\r\npublic void setTitle(String title) {\n\tsuper.setTitle(title);\r\n}", "public void setTitle(String title)\r\n {\r\n frame.setTitle(title);\r\n }", "private void init_titlebar() {\n\t\tbackBtn = (Button) findViewById(R.id.titlebar_back);\n\t\ttitleTv = (TextView) findViewById(R.id.titlebar_title);\n\t\totherBtn = (Button) findViewById(R.id.titlebar_other);\n\n\t\tbackBtn.setOnClickListener(this);\n\t\ttitleTv.setText(R.string.WXYT);\n\t\totherBtn.setVisibility(View.GONE);\n\t\tprogressBar = (ProgressBar) findViewById(R.id.progressbar);\n\t\tprogressBar\n\t\t\t\t.setScrollBarStyle(android.R.attr.progressBarStyleHorizontal);\n\t}", "public void noTitle() {\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, \n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\n\t}", "private void layoutActionBar() {\n ActionBar ab = getSupportActionBar();\n if(ab != null) {\n if (mode == 2) {\n ab.setTitle(\"Route Record\");\n } else {\n ab.setTitle(\"Recommend Route\");\n }\n ab.setDisplayHomeAsUpEnabled(true);\n }\n }", "public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }", "void setConsoleTitle(String title);", "private static void createAndShowGUI()\r\n {\r\n JFrame frame = new JFrame(\"ChangingTitleFrame Application\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(new FramePanel(frame).getPanel());\r\n frame.pack();\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n }", "protected boolean titlePageNeeded(){\n return true;\n }", "protected abstract void setTitle();", "private void setupActionBar() {\n\n setTitle(getString(R.string.new_pub_activity_title));\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n final ActionBar actionBar = getSupportActionBar();\n if (actionBar != null)\n actionBar.setDisplayHomeAsUpEnabled(true);\n }", "public void setToolbarTitle(String title)\n {\n if(_act.getSupportActionBar() !=null)\n (_act).getSupportActionBar().setTitle(title);\n\n\n }", "public String getTitle() {\n\t\t\n\t\tStringBuilder titleBuilder = new StringBuilder();\n\t\ttitleBuilder.append(CorrelatorConfig.AppName);\n\t\ttitleBuilder.append(\" \");\n\n\t\tif (m_activeMap != null) {\n\t\t\ttitleBuilder.append(\"(\" + m_activeMap.getName() + \")\");\t\t\n\t\t}\n\t\t\n\t\t// Stage is where visual parts of JavaFX application are displayed.\n return titleBuilder.toString();\n\t}", "public void setToolBarTitle(String title) {\n mToolBar.setTitle(title);\n }", "public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_liqueurs);\n ActionBar supportActionBar = getSupportActionBar();\n this.toolbar = supportActionBar;\n supportActionBar.setTitle((CharSequence) \"PooL Liqueurs\");\n }", "private void initToolbarTitle() {\n Toolbar toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar);\n toolbar.setTitle(R.string.string_settings);\n }", "@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}", "@Override\n public void onReceivedTitle(WebView view, String title) {\n getSupportActionBar().setTitle(title);\n }", "@Override\n\tpublic void setTopView() {\n\t\ttitle.setText(getResources().getString(R.string.mode));\n\t}", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "@Override\n\tpublic void InitTitle(Activity activity, TitleBarListener titleBarListener) {\n\t\tImageButton sendBtn = (ImageButton) zActivity.findViewById(R.id.thirdbtn);\n\t\tsendBtn.setVisibility(android.view.View.INVISIBLE);\n\t\t\n\t\tButton closeBtn = (Button) zActivity.findViewById(R.id.CancelBtn);\n\t\tcloseBtn.setOnClickListener(new OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(android.view.View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tzActivity.finish();\n\t\t\t}});\n\t}", "private void updateTitle(){\n\n // Calculate temperature\n currentTemp = calculateTemp();\n\n // Prepare bar title from config layout, substituting placeholders\n String barTitle = layout;\n barTitle = barTitle.replaceAll(\"%celsius%\", String.valueOf(currentTemp));\n barTitle = barTitle.replaceAll(\"%fahrenheit%\", String.valueOf(Math.round(celsiusToFahrenheit(currentTemp))));\n\n bar.setTitle(ChatColor.translateAlternateColorCodes('&', barTitle));\n\n }", "@TargetApi(14)\r\n private void initActionBar()\r\n {\r\n try\r\n {\r\n ActionBar bar = getActionBar();\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME);\r\n\r\n if (DisplayUtils.hasCentralPane(this))\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_USE_LOGO, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n else\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n\r\n if (AndroidVersion.isICSOrAbove())\r\n {\r\n bar.setHomeButtonEnabled(true);\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n Log.e(TAG, Log.getStackTraceString(e));\r\n }\r\n }", "void showTitle(String title);", "private void updateTileBar(String title) {\r\n toolbar.setTitle(title);\r\n }", "@Override\n public void setTitle(CharSequence title) {\n mTitle = title;\n getSupportActionBar().setTitle(mTitle);\n }", "private void initHorPageTitle() {\n\t\tLabel pageTitle = new Label(\"Reports\");\n\t\tpageTitle.setSizeFull();\n\t\tpageTitle.setWidth(\"800px\");\n\t\tpageTitle.setHeight(\"45px\");\n\t\tpageTitle.addStyleName(\"posPageTitle\");\n\t\thorPageTitle.addComponent(pageTitle);\n\t\troot.addComponent(horPageTitle);\n\t\troot.setComponentAlignment(horPageTitle, Alignment.TOP_CENTER);\n\t}", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void setDefaultActivityTitle() {\n getActivity().setTitle(R.string.app_name);\n }", "@Override\n\tprotected void initNavBar() {\n\t\tsetTitle(R.string.live_detail);\n\t}", "public MainFrame(String title){\n\t\ttry {\n\t\t\t//Make the look and feel Windows.\n\t UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n\t \n\t //Hope there's not an exception. If there ever an exception is it's an undocumented feature :)\n\t } catch (Exception evt) {}\n\t\t\t \n\t //Create a new JFrame with user-defined title. Make it referenceable so that other classes can refer to it.\n\t\tsetCurrentFrame(new JFrame(title));\n\t\tthis.getCurrentFrame().setResizable(false);\n\t\t\n\t\t//Exit not dispose. When this JFrame is closed, the entire program is closed.\n\t\tgetCurrentFrame().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private void initToolbar() {\n setSupportActionBar(toolbar);\n if(getSupportActionBar() != null) {\n getSupportActionBar().setTitle(\"Timetable App\");\n }\n }", "public void setupActionBar(CharSequence title) {\r\n\t\tfinal ViewGroup actionBarCompat = getActionBarCompat();\r\n\t\tif (actionBarCompat == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tLinearLayout.LayoutParams springLayoutParams = new LinearLayout.LayoutParams(\r\n\t\t\t\t0, ViewGroup.LayoutParams.FILL_PARENT);\r\n\t\tspringLayoutParams.weight = 1;\r\n\r\n\t\tView.OnClickListener homeClickListener = new View.OnClickListener() {\r\n\t\t\tpublic void onClick(View view) {\r\n\t\t\t\tgoHome();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (title != null) {\r\n\t\t\t// Add Home button\r\n\t\t\taddActionButtonCompat(R.drawable.ic_action_home,\r\n\t\t\t\t\tR.string.description_home_icon, homeClickListener, true);\r\n\r\n\t\t\t// Add title text\r\n\t\t\tTextView titleText = new TextView(mActivity, null,\r\n\t\t\t\t\tR.attr.actionbarCompatTextStyle);\r\n\t\t\ttitleText.setLayoutParams(springLayoutParams);\r\n\t\t\ttitleText.setText(title);\r\n\t\t\tactionBarCompat.addView(titleText);\r\n\r\n\t\t} else {\r\n\t\t\tImageButton logo = new ImageButton(mActivity, null,\r\n\t\t\t\t\tR.attr.actionbarCompatLogoStyle);\r\n\t\t\tlogo.setOnClickListener(homeClickListener);\r\n\t\t\tactionBarCompat.addView(logo);\r\n\r\n\t\t\tView spring = new View(mActivity);\r\n\t\t\tspring.setLayoutParams(springLayoutParams);\r\n\t\t\tactionBarCompat.addView(spring);\r\n\t\t}\r\n\r\n\t}", "private void applyCustomTitle() {\r\n\t\tgetWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,\r\n\t\t\t\tR.layout.title_layout);\r\n\t\tmTitle = (TextView) findViewById(R.id.title);\r\n\t\ticon = (ImageView) findViewById(R.id.icon);\r\n\t}", "protected void setupActionBar()\r\n\t{\r\n\t\tfinal ActionBar actionBar = getActionBar();\r\n\t\tif (actionBar == null)\r\n\t\t\treturn;\r\n\t\tactionBar.setDisplayShowTitleEnabled(true);\r\n\t\tactionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);\r\n\t\tactionBar.setDisplayUseLogoEnabled(true);\r\n\t\tactionBar.setLogo(R.drawable.itiffin);\r\n\t\tactionBar.setBackgroundDrawable(getResources().getDrawable(\r\n\t\t\t\tR.drawable.black_semi_trans_strip));\r\n\t\tactionBar.setDisplayHomeAsUpEnabled(true);\r\n\t\tactionBar.setHomeButtonEnabled(true);\r\n\t\tactionBar.setTitle(R.string.app_name);\r\n\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_about);\n setSupportActionBar(findViewById(R.id.toolbar));\n if (getSupportActionBar() != null) {\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }\n setTitle(getString(R.string.activity_main_title));\n }", "private void setToolbar() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setTitle(\"E-Place\");//untuk get title\n getSupportActionBar().setIcon(R.drawable.ic_launcher);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n }", "public void setTitle(String title) { this.title = title; }", "protected void setActionBarTitle(String title) {\n\t\tif (mContext == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (mContext instanceof ContentActivity) {\n\t\t\tContentActivity activity = (ContentActivity) mContext;\n\t\t\tactivity.setActionBarTitle(title);\n\t\t}\n\t}", "public void setTitle(String aNewTitle) \r\n\t{\r\n\t\tthis.title = aNewTitle;\r\n\t\tthis.panelEnvironment.panelTitleChanged();\r\n\t}", "private void setupActionBar(String title) {\n Button openDrawer = findViewById(R.id.open_drawer);\n TextView activityTitle = findViewById(R.id.activity_title);\n\n Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n\n openDrawer.setBackgroundDrawable(new IconicsDrawable(this).icon(GoogleMaterial.Icon.gmd_menu).sizeDp(30).color(getResources().getColor(R.color.colorPrimary)));\n openDrawer.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mainDrawer.openDrawer();\n }\n });\n\n activityTitle.setText(title); //sets the TextViews text\n }", "public void addLogo(){\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n getSupportActionBar().setLogo(R.drawable.monkey_notify);\n getSupportActionBar().setDisplayUseLogoEnabled(true);\n }", "CartogramWizardTitlePanel (JFrame contentFrame)\n\t{\n\t\t\n\t\t// Setting panel parameters.\n\t\tthis.setSize(350, 45);\n\t\tthis.setLayout(null);\n\t\t\n\t\t\n\t\t// Create the title text.\n\t\tJLabel title = new JLabel(\"Cartogram creation wizard\");\n\t\ttitle.setFont(new Font(null, Font.BOLD, 13));\n\t\ttitle.setLocation(0, 0);\n\t\ttitle.setSize(400, 20);\n\t\tthis.add(title);\n\t\t\n\t\t\n\t\t// Create the sub-title text.\n\t\t/*JLabel subtitle = new JLabel(\n\t\t\t\"A leap into a different space.\"\n\t\t\t);\n\t\t\n\t\tsubtitle.setFont(new Font(null, Font.PLAIN, 11));\n\t\tsubtitle.setLocation(0, 22);\n\t\tsubtitle.setSize(400, 20);\n\t\tthis.add(subtitle);*/\n\t\t\n\t}", "public void titleChanged() {\n try {\n String title = this.mWebViewH5Page.getWebView().getTitle();\n H5Log.d(TAG, \"titleChanged...title=\" + title);\n ((H5Page) this.mH5Page.get()).getH5TitleBar().setTitle(title);\n } catch (Throwable e) {\n H5Log.e(TAG, \"titleChanged...e=\" + e);\n }\n }", "private RGridBagLayoutPane getTitlePane() {\n if (titlePane == null) {\n titlePane = new RGridBagLayoutPane();\n titlePane.setName(\"titlePane\");\n titlePane.setStyleProperties(\"{/fill \\\"HORIZONTAL\\\"/weightY \\\"0\\\"}\");\n titlePane.add(getHeaderPane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }\n return titlePane;\n }", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "public void displayWelcomePane() {\n mainWindow.setContent(new WelcomePane());\n console = null;\n }", "public void setActionBarTitle(CharSequence title) {\r\n\t\tViewGroup actionBar = getActionBarCompat();\r\n\t\tif (actionBar == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tTextView titleText = (TextView) actionBar\r\n\t\t\t\t.findViewById(R.id.actionbar_compat_text);\r\n\t\tif (titleText != null) {\r\n\t\t\ttitleText.setText(title);\r\n\t\t}\r\n\t}", "public AppMain(String title) {\n setTitle(title);\n leftPanel = new LeftPanel();\n jTabbedPane = new JTabbedPane();\n menuBar = new JMenuBar();\n addMenuItems();\n horizontalPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, jTabbedPane);\n verticalPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, menuBar, horizontalPane);\n horizontalPane.setResizeWeight(0.2);\n verticalPane.setResizeWeight(0.03);\n add(verticalPane);\n setSize(1280, 720);\n setVisible(true);\n setResizable(false);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n verticalPane.resetToPreferredSizes();\n horizontalPane.resetToPreferredSizes();\n horizontalPane.setEnabled(false);\n verticalPane.setEnabled(false);\n addPanelActionListeners();\n createWorkSpace();\n }", "protected void initActionBar() {\n\t\tActionBar actionBar = this.getActionBar();\r\n\t\tactionBar.setDisplayHomeAsUpEnabled(IsCanBack());\r\n\t\tactionBar.setTitle(getActionBarTitle());\r\n\t}", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}", "public void resetToTitle() {\r\n\t\tmainFrame.getContentPane().removeAll();\r\n\t\tmainFrame.getContentPane().add(titlePanel);\r\n\t\tmainFrame.repaint();\r\n\t}", "public void setFrameTitel(JFrame frame) throws Throwable {\n\t\tString mode = \"Business Application \";\r\n\t\tString Edition = \"Stand Alone Branch Edition- \";\r\n\t\t// frame.setIconImage(Toolkit.getDefaultToolkit().getImage(Loginwindow.class.getResource(\"/RetailProduct/meretoologo.png\")));\r\n\t\tString vpara = \"809\";\r\n\r\n\t\tString vpara805 = \"805\"; // No of Lines per Bill\r\n\t\tint para805 = Integer.parseInt(new getConfigurationSetting().getSpecificConfiguration(vpara805));\r\n\r\n\t\t//frame.setTitle(new getConfigurationSetting().getSpecificConfiguration(vpara));\r\n\t\tframe.setFont(new Font(\"Cambria\", Font.BOLD, 16));\r\n\t\t//frame.setIconImage(\r\n\t\t//\t\tToolkit.getDefaultToolkit().getImage(Loginwindow.class.getResource(\"/RetailProduct/mymain.png\")));\r\n\t\t// frame.setIconImage(Toolkit.getDefaultToolkit().getImage(Loginwindow.class.getResource(\"/RetailProduct/mymainIcon7.ICO\")));\r\n\t\tframe.setFocusableWindowState(true);\r\n\r\n\t}", "public void start(String title) {\r\n JFrame frame = createFrame(title);\r\n configure(frame.getRootPane());\r\n\r\n initialize();\r\n\r\n frame.setVisible(true);\r\n onVisible();\r\n }", "void setupToolBar(String title) {\n setupToolBar(title, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n onBackPressed();\n }\n });\n }", "public void setActionBarTitle(String title,boolean isBackEnable) {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null)\n {\n actionBar.setTitle(title);\n actionBar.setDisplayHomeAsUpEnabled(isBackEnable);\n }\n }", "@Override\n\tpublic void setTitle(java.lang.String title, java.util.Locale locale) {\n\t\t_scienceApp.setTitle(title, locale);\n\t}", "private void setUpActionBar() {\n\t\tUtil.setFragmentActionBarTitle((BaseActivity)getActivity(), getResources().getString(R.string.navigation_menu_faq_question));\n\t}", "@Override\n\tprotected void setTitleViews() {\n\t\ttitleIvRight.setVisibility(View.INVISIBLE);\n\t\ttitleText.setText(\"历史记录\");\n\t}", "public final void setTitle(final String title)\n\t{\n\t\tio.getFrame().setTitle(title);\n\t}", "@Override\n protected void onCreate(Bundle arg0) {\n super.onCreate(arg0);\n // 去掉标题栏\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n }", "private void setTitle(String userTitle){\n title = userTitle;\n }", "protected void setupActionBar() {\n setTitle();\n setSutTitle();\n setIcon();\n setHomeAsUp(mCallback.getHomeButtonStyle() == HomeButtonStyle.SHOW_HOME_AS_UP);\n }", "public void setTitle(String title){\n \tthis.title = title;\n }", "private void setUpActionBar() {\n //Uses superclass method to instantiate ActionBar\n mActionBarToolbar = getActionBarToolbar();\n mActionBarToolbar.setTitle(getResources().getString(R.string.title_activity_settings_languajes));\n setSupportActionBar(mActionBarToolbar);\n }", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public void setTitle(String title){\n this.title = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }" ]
[ "0.7652155", "0.72141725", "0.718534", "0.7040766", "0.6957053", "0.6957053", "0.6957053", "0.6957053", "0.6957053", "0.6933433", "0.69067395", "0.6863941", "0.68499035", "0.6843133", "0.68396825", "0.68379015", "0.6828339", "0.682504", "0.6817833", "0.681598", "0.6813584", "0.68007827", "0.6792789", "0.67563975", "0.67563975", "0.67563975", "0.6750226", "0.67299104", "0.66755265", "0.6669582", "0.66666937", "0.66579926", "0.6637952", "0.66379", "0.6636846", "0.66251254", "0.6615299", "0.6604139", "0.65815675", "0.65707076", "0.65665084", "0.65646297", "0.6554211", "0.65531754", "0.6539102", "0.6514017", "0.6509218", "0.6476596", "0.6465848", "0.64640206", "0.6457027", "0.6443597", "0.64433646", "0.6431424", "0.64114445", "0.6404763", "0.64031386", "0.63978165", "0.63683707", "0.63520116", "0.63437", "0.6335615", "0.6334168", "0.63291967", "0.63283294", "0.6323121", "0.63137156", "0.6313367", "0.63083786", "0.6298258", "0.6294498", "0.629419", "0.6286902", "0.62824017", "0.62782526", "0.62687695", "0.6261821", "0.6260864", "0.62595385", "0.6255833", "0.625354", "0.6251475", "0.6247631", "0.6245182", "0.6242137", "0.6239605", "0.62362826", "0.6230574", "0.62173986", "0.6200343", "0.6199993", "0.6199742", "0.6198568", "0.61949104", "0.61911917", "0.6190619", "0.61903495", "0.61834276", "0.61834043", "0.6166835", "0.614074" ]
0.0
-1
TODO Autogenerated method stub
@Override public double getRate() { return 7; }
{ "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
Launch the application. Create the frame.
public SteamGui(ArrayList<Game>games) { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.games = games; setBounds(100, 100, 1411, 1030); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); tabbedPane.setBounds(27, 127, 1368, 784); contentPane.add(tabbedPane); tabbedPane.addTab("Steam Table", null, panel, null); panel.setLayout(null); scrollPane.setBounds(0, 0, 1332, 745); panel.add(scrollPane); scrollPane.setViewportView(table); table.setModel(tm); sortingOn.setModel(new DefaultComboBoxModel(new String[] {"Name", "Date", "Positive Reviews", "Negative Reviews", "Average Playtime", "Median Playtime", "Minimum Owners", "Maximum Owners", "Price"})); sortingOn.setBounds(133, 932, 137, 22); contentPane.add(sortingOn); lblSortOn.setBounds(61, 936, 62, 14); contentPane.add(lblSortOn); sort.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { String result = (String) sortingOn.getSelectedItem(); if (result.equals("Name")) { GameCompare ac = new GameCompare(); Collections.sort(games, ac); drawTable(); } if (result.contentEquals("Price")) { PriceCompare pc = new PriceCompare(); Collections.sort(games, pc); drawTable(); } if (result.contentEquals("Negative Reviews")) { NegativCompare nc = new NegativCompare(); Collections.sort(games, nc); drawTable(); } if (result.contentEquals("Positive Reviews")) { Collections.sort(games); drawTable(); } if (result.contentEquals("Average Playtime")) { AverageCompare ac = new AverageCompare(); Collections.sort(games, ac); drawTable(); } if (result.contentEquals("Median Playtime")) { MedianCompare mc = new MedianCompare(); Collections.sort(games, mc); drawTable(); } if (result.contentEquals("Minimum Owners")) { MinCompare ac = new MinCompare(); Collections.sort(games, ac); drawTable(); } if (result.contentEquals("Maximum Owners")) { MaxCompare ac = new MaxCompare(); Collections.sort(games, ac); drawTable(); } if (result.contentEquals("Date")) { DateCompare ac = new DateCompare(); Collections.sort(games, ac); drawTable(); } } }); sort.setBounds(290, 932, 89, 23); contentPane.add(sort); lblTopOf.setFont(new Font("Tahoma", Font.PLAIN, 27)); lblTopOf.setBounds(61, 49, 565, 45); contentPane.add(lblTopOf); createPieGraphTab(); drawTable(); createALineChartTab(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void launch() {\n m_frame.pack();\n m_frame.setVisible(true);\n }", "public launchFrame() {\n \n initComponents();\n \n }", "public void launchFrame() {\n\t\tf.getContentPane().add(sbrText);\n\t\tf.getContentPane().add(btnQuit);\n\n\t\t// Close when the close button is clicked\n\t\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// Display Frame\n\t\tf.pack(); // Adjusts frame to size of components\n\t\tf.setVisible(true);\n\t}", "private void prepareFrame() {\n logger.debug(\"prepareFrame : enter\");\n\n // initialize the actions :\n registerActions();\n final Container container;\n\n if (Bootstrapper.isHeadless()) {\n container = null;\n } else {\n final JFrame frame = new JFrame(ApplicationDescription.getInstance().getProgramName());\n\n // handle frame icon\n final Image jmmcFavImage = ResourceImage.JMMC_FAVICON.icon().getImage();\n frame.setIconImage(jmmcFavImage);\n\n // get screen size to adjust minimum window size :\n final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n logger.info(\"screen size = {} x {}\", screenSize.getWidth(), screenSize.getHeight());\n // hack for screens smaller than 1024x768 screens:\n final int appWidth = 950;\n final int appHeightMin = (screenSize.getHeight() >= 850) ? 800 : 700;\n\n final Dimension dim = new Dimension(appWidth, appHeightMin);\n frame.setMinimumSize(dim);\n frame.addComponentListener(new ComponentResizeAdapter(dim));\n frame.setPreferredSize(INITIAL_DIMENSION);\n\n App.setFrame(frame);\n\n container = frame.getContentPane();\n }\n // init the main panel:\n createContent(container);\n\n StatusBar.show(\"application started.\");\n\n logger.debug(\"prepareFrame : exit\");\n }", "public void run() {\n\t\t\t\tLayoutFrame frame = new LayoutFrame();\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}", "void launchApp();", "private static void createAndShowGUI()\r\n {\r\n JFrame frame = new JFrame(\"ChangingTitleFrame Application\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(new FramePanel(frame).getPanel());\r\n frame.pack();\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n }", "public void start() {\n\t\tSystem.out.println(\"Starting new application\");\n\t\texec.init(this);\n\t\tthread = new Thread(this);\n\t\trunning = true;\n\t\tgd.setFullScreenWindow(screen.getFrame());\n\t\tscreen.getFrame().setVisible(true);\n\t\tthread.start();\n\t}", "@Override\n public void run() {\n JFrame frame = new JFrame(\"Survey\");\n frame.setPreferredSize(new Dimension(300, 400));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n createComponents(frame.getContentPane());\n frame.pack();\n frame.setVisible(true);\n }", "private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }", "public void start(){\n JmeFormatter formatter = new JmeFormatter();\n\n Handler consoleHandler = new ConsoleHandler();\n consoleHandler.setFormatter(formatter);\n\n Logger.getLogger(\"\").removeHandler(Logger.getLogger(\"\").getHandlers()[0]);\n Logger.getLogger(\"\").addHandler(consoleHandler);\n \n createCanvas(appClass);\n \n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n \n SwingUtilities.invokeLater(new Runnable(){\n public void run(){\n JPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\n createFrame();\n \n //currentPanel.add(canvas, BorderLayout.CENTER);\n mMainFrame.pack();\n startApp();\n mMainFrame.setLocationRelativeTo(null);\n mMainFrame.setVisible(true);\n }\n });\n \n \n }", "private static void createAndShowGUI() {\r\n\t\t// Create and set up the window.\r\n\t\tframe = new JFrame(\"Captura 977R\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Set up the content pane.\r\n\t\taddComponentsToPane(frame.getContentPane());\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tDimension windowSize = frame.getSize();\r\n\r\n\t\tint windowX = Math.max(0, (screenSize.width - windowSize.width) / 2);\r\n\t\tint windowY = Math.max(0, (screenSize.height - windowSize.height) / 2);\r\n\r\n\t\tframe.setLocation(windowX, windowY); // Don't use \"f.\" inside\r\n\t\t// constructor.\r\n\t\tframe.setVisible(true);\r\n\t}", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"FEEx v. \"+VERSION);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Main p = new Main();\n p.addComponentToPane(frame.getContentPane());\n\n frame.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n \tstopPolling();\n \tstopMPP();\n p.port.close();\n Utils.storeSizeAndPosition(frame);\n }\n });\n \n //Display the window.\n frame.pack();\n Utils.restoreSizeAndPosition(frame);\n frame.setVisible(true);\n }", "public static void run(){\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n PlanHomeCoach frame = new PlanHomeCoach();\n frame.init();\n Dimension screenSize =Toolkit.getDefaultToolkit().getScreenSize();\n frame.setLocation(screenSize.width/2-400/2,screenSize.height/2-700/2);\n frame.setResizable(false);\n frame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "public static void start()\n\t{\n teamFrame = new JFrame(\"Team Setup\");\n teamFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n JComponent newContentPane = new BasicTeamConfiguration();\n newContentPane.setOpaque(true); //content panes must be opaque\n teamFrame.setContentPane(newContentPane);\n teamFrame.setLocationRelativeTo(null);\n \n //Display the window.\n teamFrame.pack();\n teamFrame.setVisible(true);\n\t}", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "public static void launchingBrowser() throws Exception {\n\n\t\tString applicationURL = merchEnv.getProtocol() + \"://\"\n\t\t\t\t+ merchEnv.getHost() + \":\" + merchEnv.getPort() + \"/\";\n\t\tselectedBrowser = merchEnv.getBrowser();\n\t\ttry {\n\t\t\tbaseScreen = new BaseScreen(selectedBrowser, applicationURL,\n\t\t\t\t\tmerchEnv.getContext(), merchEnv, merchUserInfo, merchUI);\n\t\t} catch (ScreenException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "public static void main(String[] args) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tFrame app = new Frame(\"Santa on Christmas Eve\"); \n\t\t\t}\n\t\t}\n\t\t);\n\t}", "public void launch() {\r\n\t\tthis.setLocation(200, 200);\r\n\t\tthis.setSize(COLS * BLOCK_SIZE, ROWS * BLOCK_SIZE);\r\n\t\tthis.addKeyListener(new KeyMonitor());\r\n\t\tthis.addWindowListener(new WindowAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.setVisible(true);\r\n\t\t\r\n\t\tnew Thread(PaintThread).start();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tAppFrame mf = new AppFrame();\n\t}", "public void run() \n {\n final JFrame frame = new JFrame(); \n frame.setMinimumSize(new Dimension(640, 480)); \n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n \n // Add the Swing JPanel and make visible\n frame.getContentPane().add(new SwingFX2()); \n frame.setVisible(true); \n }", "public StartProgramFrame() {\n initComponents();\n }", "public WhereIsAppCreator(JFrame frame) {\n this.frame = frame;\n initComponents();\n }", "public static void main(String[] args) {\n\t\tFrame window= new Frame(); \n\t}", "@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}", "public void startApplication() {\n\t\tgameView = new GameGUI(this);\n\t\t\n\t\t/*\n\t\t * Create bonus GUI now.\n\t\t * TODO: Use swing worker thread to create bonus GUI\n\t\t * \t\t that way if GUI had more bells and whistles to it\n\t\t * \t\t the bonus GUI creation wouldn't take up processing time\n\t\t * \t\t on the main thread.\n\t\t */\n\t\tcreateBonusGUI();\n\t\t\n\t\t//GUI created and ready to show to the user\n\t\tgameView.allowVisibility();\n\t\tGameSounds.startBackgroundMusic();\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tEx02 frame=new Ex02();\r\n\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t}catch(Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "Frame createFrame();", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\t//Initialize shell frame\r\n\t\t\tShellFrame = new ShellFrame(360,200,\"Menu principal\",null);\t\t\r\n\t\t\t//Content charge\r\n\t\t\tcontentCharge ();\r\n\t\t\t//ShellFrame standby\r\n\t\t\tShellFrame.StandBy();\r\n\t\t} catch (Exception e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Error. GUI initialization failure\", \"Java Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t}", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Firma digital\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLocationRelativeTo(null);\r\n\r\n //Create and set up the content pane.\r\n final FirmaDigital newContentPane = new FirmaDigital(frame);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Make sure the focus goes to the right component\r\n //whenever the frame is initially given the focus.\r\n frame.addWindowListener(new WindowAdapter() {\r\n public void windowActivated(WindowEvent e) {\r\n newContentPane.resetFocus();\r\n }\r\n });\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }", "public MainApp() {\r\n\t\tsuper();\r\n\t\tthis.setSize(642, 455);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public MainFrame() {\n initComponents();\n\n mAlmondUI.addWindowWatcher(this);\n mAlmondUI.initoptions();\n\n initActions();\n init();\n\n if (IS_MAC) {\n initMac();\n }\n\n initMenus();\n mActionManager.setEnabledDocumentActions(false);\n }", "public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}", "public void run() {\n\t\t\t\t\tHelloWorldGUI frame = new HelloWorldGUI();\n\t\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\tframe.setVisible(true);\n\t\t\t\t}", "public void run() {\r\n frame = new MainFrame(this);\r\n newAccountFrame = new NewAccountPage(this);\r\n \r\n frame.setVisible(true);\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t try {\n\t\t\t\t\tUIManager.setLookAndFeel(\"com.seaglasslookandfeel.SeaGlassLookAndFeel\");\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (InstantiationException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IllegalAccessException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (UnsupportedLookAndFeelException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tsetupLibVLC();\n\t\t\t\t} catch (LibraryNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tNative.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);\n\t\t\t\t\n\t\t\t\tExtendedFrame frame = new ExtendedFrame();\n\t\t\t\tframe.setResizable(true);\n\t\t\t\tframe.setSize(800, 600);\n\t\t\t\tframe.setMinimumSize(new Dimension(500, 400));\n\t\t\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Welcome to Vamix!\\n\\nHope you enjoy using vamix!\\nFor help, please click in the Help menu.\\nRefer to user manual for detailed help.\\n\");\n\t\t\t}", "private static void createAndShowGUI() {\n Font f = new Font(\"微软雅黑\", 0, 12);\n String names[] = {\"Label\", \"CheckBox\", \"PopupMenu\", \"MenuItem\", \"CheckBoxMenuItem\",\n \"JRadioButtonMenuItem\", \"ComboBox\", \"Button\", \"Tree\", \"ScrollPane\",\n \"TabbedPane\", \"EditorPane\", \"TitledBorder\", \"Menu\", \"TextArea\",\n \"OptionPane\", \"MenuBar\", \"ToolBar\", \"ToggleButton\", \"ToolTip\",\n \"ProgressBar\", \"TableHeader\", \"Panel\", \"List\", \"ColorChooser\",\n \"PasswordField\", \"TextField\", \"Table\", \"Label\", \"Viewport\",\n \"RadioButtonMenuItem\", \"RadioButton\", \"DesktopPane\", \"InternalFrame\"\n };\n for (String item : names) {\n UIManager.put(item + \".font\", f);\n }\n //Create and set up the window.\n JFrame frame = new JFrame(\"AutoCapturePackagesTool\");\n\n String src = \"/optimizationprogram/GUICode/u5.png\";\n Image image = null;\n try {\n image = ImageIO.read(new CaptureGUI().getClass().getResource(src));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n frame.setIconImage(image);\n //frame.setIconImage(Toolkit.getDefaultToolkit().getImage(src));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 520 / 2,\n Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 420 / 2);\n frame.getContentPane().add(new CaptureGUI());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "public static void main(String[] args) {\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n new LaunchGame().setVisible(true);\n } catch (IOException ex) {\n Logger.getLogger(LaunchGame.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n }", "public static void main(String args[]){\r\n JFrame frame = new JFrame();\r\n frame.getContentPane().add(new S2SSubmissionDetailForm());\r\n// frame.setSize(690,420);\r\n frame.pack();\r\n frame.show();\r\n// frame.setVisible(true);\r\n }", "public static void main( String args[] )\n\t{\n\t\tmainFrame = getInstance();\n\t\tmainFrame.setVisible( true );\n\t\t\n\t}", "private void startGUI() {\r\n myFrame.setTitle(\"Media Library\");\r\n myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n myFrame.setLocationByPlatform(true);\r\n myFrame.pack();\r\n\r\n myFrame.setVisible(true);\r\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResourceTestFrame frame=new ResourceTestFrame();\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}", "public void runCoursesApp() {\n frame = new JFrame(\"Courses\");\n frame.setFont(new Font(\"Proxima Nova\", Font.PLAIN, 13));\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frame.setForeground(myColor);\n frame.setBackground(myColor);\n frame.setLayout(new BorderLayout());\n\n frame.add(makeUpperPanel(), BorderLayout.NORTH);\n frame.add(makeLowerPanel(), BorderLayout.CENTER);\n\n frame.pack();\n frame.getContentPane().requestFocusInWindow();\n frame.setSize(800, 770);\n frame.setVisible(true);\n }", "private static void createAndShowGUI() {\n\n frame = new JFrame(messages.getString(\"towers.of.hanoi\"));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n addComponentsToPane(frame.getContentPane());\n frame.pack();\n frame.setSize(800, 600);\n frame.setVisible(true);\n }", "private void buildAndDisplayFrame() {\n\n\t\tframe.add(panelForIncomingCall, BorderLayout.NORTH);\n\t\tpanelForIncomingCall.add(welcomeThenDisplayCallInfo);\n\n\t\tframe.add(backgroundPanel, BorderLayout.CENTER);\n\t\tbackgroundPanel.add(userInstructions);\n\t\tbackgroundPanel.add(startButton);\n\t\tbackgroundPanel.add(declineDisplay);\n\n\t\tframe.add(acceptDeclineBlockBottomPanel, BorderLayout.SOUTH);\n\t\tacceptDeclineBlockBottomPanel.add(acceptButton);\n\t\tacceptDeclineBlockBottomPanel.add(declineButton);\n\t\tacceptDeclineBlockBottomPanel.add(blockButton);\n\n\t\tframe.setSize(650, 700); // sizes frame to whatever we want\n\t\tframe.setLocationRelativeTo(null); // puts at center of screen\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "static public void make() {\n\t\tif (window != null)\n\t\t\treturn;\n\n\t\twindow = new JFrame();\n\t\twindow.setTitle(\"Finecraft\");\n\t\twindow.setMinimumSize(new Dimension(500, 300));\n\t\twindow.setSize(asInteger(WINDOW_WIDTH), asInteger(WINDOW_HEIGHT));\n\t\twindow.setResizable(asBoolean(WINDOW_RESIZE));\n\t\twindow.setLocationRelativeTo(null);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "public void start() {\r\n\t\tfinal Element frame = this.createFrame();\r\n\t\tthis.setFrame(frame);\r\n\r\n\t\tthis.getSupport().start(this, frame);\r\n\r\n\t\t// the reason for the query string is to avoid caching problems...the\r\n\t\t// src attribute is set before the frame is attached this also\r\n\t\t// avoids the nasty clicking noises in ie.\r\n\t\tDOM.setElementProperty(frame, \"src\", this.getServiceEntryPoint() + \"?serializationEngine=Gwt&\" + System.currentTimeMillis());\r\n\r\n\t\tfinal Element body = RootPanel.getBodyElement();\r\n\t\tDOM.appendChild(body, frame);\r\n\t}", "public void main(String[] args) {\n // TODO code application logic here\n MF= new MainFrame();\n }", "public static void main(String[] args) {\n \n MyFrame myFrame = new MyFrame();\n \n }", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "public void createAndShowGUI() {\n\n setTitle(title);\n // Sets what to do when frame closes\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setIconImage(new ImageIcon(ClassLoader.getSystemResource(ICON_PATH)).getImage());\n\n //shows the frame\n pack();\n setLocationRelativeTo(null); //centers frame\n setVisible(true);\n }", "private static void createAndShowGUI() {\n\t\t/*\n //Create and set up the window.\n JFrame frame = new JFrame(\"HelloWorldSwing\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Add the ubiquitous \"Hello World\" label.\n JLabel label = new JLabel(\"Hello World\");\n frame.getContentPane().add(label);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n */\n\t\tfinal AC_GUI currentGUI = new AC_GUI();\n\t\t//currentGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcurrentGUI.setSize(900, 800);\n\t\t// make the frame full screen\n\t\t// currentGUI.setExtendedState(JFrame.MAXIMIZED_BOTH);\n }", "public void buildFrame();", "public void createAndShowGUI() {\n\t\tcontroller = new ControllerClass(); \r\n\r\n\t\t// Create and set up the window\r\n\t\twindowLookAndFeel();\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetTitle(\"Media Works - Add Screen\");\r\n\t\tsetResizable(false);\r\n\t\tadd(componentSetup());\r\n\t\tpack();\r\n\t\tsetSize(720,540);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t}", "public Main(){\n \tsetSize(new Dimension(1024, 768));\n \t\n \t//setUndecorated(true); // borderless (fullscreen) window\n \tsetExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); // maximize window\n \t\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setTitle(\"Game\");\n setLocationRelativeTo(null); // center on screen\n\n \tContentLoader.LoadContent();\n init();\n start();\n }", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tBasicComponentJFrame frame = new BasicComponentJFrame();\n\t\tframe.setSize(800, 600);\n\t\t\n\t\tframe.setComponents();\n\t\tGuiUtil.setLookNFeel(frame, GuiUtil.THEME_SWING);\n\t\tframe.setMenus();\n\t\tframe.eventReigst();\n\t\t\n\t\tframe.setVisible(true);\n\n\t}", "private static void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n frame = new JFrame(\"ATC simulator\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n atcscreen = new AtcScreen();\r\n atcscreen.setOpaque(true);\r\n frame.setContentPane(atcscreen);\r\n \r\n //Display the window.\r\n frame.setSize(1000,1000);\r\n //atcscreen.setSize(300,300);\r\n //frame.pack();\r\n frame.setVisible(true);\r\n }", "private static void createAndShowGUI() {\n //\n // Use the normal window decorations as defined by the look-and-feel\n // schema\n //\n JFrame.setDefaultLookAndFeelDecorated(true);\n //\n // Create the main application window\n //\n mainWindow = new MainWindow();\n //\n // Show the application window\n //\n mainWindow.pack();\n mainWindow.setVisible(true);\n }", "private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"WAR OF MINE\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new Gameframe();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.setSize(800,1000);\n frame.setVisible(true);\n }", "public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }", "public Badminton()\n { \n frame.add(new Board()); \n frame.setSize(900, 900);\n frame.setResizable(false);\n frame.setTitle(\"PE Class\");\n //frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "public void run() {\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t\t\tframe.setJMenuBar((new MyJMenuBar(frame)).menuBar);\n\t\t\t\t\n\t\t\t\t//Display the window.\n\t\t\t\t//frame.pack();\n\n\t\t\t\t//Set up the content pane.\n\t\t\t\tframe.addLoadingMessage(frame.getContentPane());\n\t\t\t\tframe.pack();\n\t\t\t\tframe.setSize(new Dimension((int)(frame.getSize().getWidth()), 300));\n\t\t\t\tframe.setResizable(false);\n\t\t\t\tframe.setVisible(true);\n\t\t\t\tframe.update(frame.getGraphics());\n }", "public void start() {\n\t\tthis.setSize(500, 500);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}", "public static void main(String[] args) {\n\t Bodlogo2 frame= new Bodlogo2();\n\t frame.setSize(500,400);\n\t frame.setTitle(\"Cars \");\n\t frame.setVisible(true);\n\t frame.setLocationRelativeTo(null);\n\t frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);\n\t}", "private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}", "public JFrameApp() {\n initComponents();\n }", "public void launchProcWindow() {\n\t\t\n\t\ttry {\n\t\t\tdbProcRoot = new ProcController(this);\n\t\t\tScene scene = new Scene(dbProcRoot.getRootView(), 640, 480);\n\t\t\tmainStage.setScene(scene);\n\t\t} catch(IOException e ) {\n\t\t\tsendConnectionError(e.toString(), true);\n\t\t}\n\t}", "public static void main(String[] arguments){\r\n TicTac frame = new TicTac(); //runs the screen layout class.\r\n }", "private void initFrame() {\r\n\tframe = new JFrame( \"Dammen\" );\r\n\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\tframe.setSize(ScreenSize.WIDTH + 25, ScreenSize.HEIGHT + 50);\r\n\r\n\tframe.setVisible(true);\r\n\t\r\n\tframe.setLocationRelativeTo(null);\r\n }", "public static void main(String[] args)\n\t{\n\t\tgo = new GUI();\n\t\tgo.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tgo.setExtendedState(JFrame.MAXIMIZED_BOTH); // Method to make auto-full screen\n\n\t\tgo.setVisible(true); // Basic frame stuff\n\t\tgo.init();\n\t\tr = new Runner();\n\t}", "public static void main(String[] args) {\n frame.setVisible(true);\n\n // Setting Dimensions\n frame.setSize(screen_width, screen_height);\n\n // Title of the Main Frame\n frame.setTitle(\"Clouds Binary\");\n\n // The close method\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // Adding game Panel into the frame\n frame.add(clouds);\n\n // Setting image Icon\n ImageIcon img_icon = new ImageIcon(\"src\\\\Cloud_Binary\\\\clouds.png\");\n\n // Getting the image preview from the ImageIcon and setting it up\n frame.setIconImage(img_icon.getImage());\n\n // Setting Window resizable to false\n\n }", "public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tABOXBuilder window = new ABOXBuilder();\n\t\t\t\t\twindow.frame.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public static void main (String[] args){\n\n\t JFrame frame = new JFrame (\"LAWN ZOMBIES\");\n\t frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\n\t Screen screen = new Screen();\n\t screen.setLayout(new FlowLayout()); //sets a split layout\n\t frame.setLocation(500, 0);\n\t // screen.setLayout(new BorderLayout()); //sets non-split layout\n\t frame.setSize(w,h);\n\t screen.setSize(w,h);\n\t frame.add(screen);\n\t //frame.pack();\n\t frame.setVisible(true);\n\t }", "private void createWindow() throws Exception {\r\n Display.setFullscreen(false);\r\n Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));\r\n Display.setTitle(\"Program 2\");\r\n Display.create();\r\n }", "public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\txemBDFrame frame = new xemBDFrame();\n\t\t\t\t\tframe.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}\n\t\t});\n\t}", "public static void main(String[] args) {\n\t\tjf= new JFrame(\"四川大学人脸识别自助借书系统\");\n jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jf.setLayout(null);\n jf.setSize(Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height);\n jf.setVisible(true);\n jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n Image icon = Toolkit.getDefaultToolkit().getImage(\"img/title.png\"); // 图片的具体位置\n\t\tjf.setIconImage(icon); //设置窗口的logo\n\n label_initial_title = new JLabel(\" 图书馆人脸借阅系统\"); \n label_initial_title.setFont(new Font(\"黑体\", Font.BOLD, 50));\n label_initial_title.setForeground(Color.white);\n label_initial_title.setBounds(0, 0, (int) (Toolkit.getDefaultToolkit().getScreenSize().width), (int) (Toolkit.getDefaultToolkit().getScreenSize().height * 0.2));\n label_initial_title.setOpaque(true);\n \n\t\tInitialView i1=new InitialView(jf,label_initial_title);\n\t}", "public static void main(String[] args) {\n star frame = new star();\n frame.setSize(1000, 1000);\n frame.createGUI();\n frame.setVisible(true);\n frame.setResizable(false);\n }", "public static void main(String[] args)\n {\n EventQueue.invokeLater(() ->\n {\n try\n {\n App app = new App();\n app.frame.setVisible(true);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n });\n }", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "public void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tWindo frame = new Windo();\r\n\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "public static void main(String[] args) {\n Frame testFrame = new MyGUIProgram();\n testFrame.setVisible(true);\n \n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 640, 480);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJDesktopPane desktopPane = new JDesktopPane();\t\t//Creates desktop pane\n\t\tdesktopPane.setBounds(-7, -30, 640, 480);\t\t\t// Sets location to be outside of window\n\t\tframe.getContentPane().add(desktopPane);\t\t\t// adds desktop pane to frame\n\t\t\n//\t\tMainMenu MainMenu = new MainMenu();\t\t// Creates new MainMenu\n//\t\tMainMenu.setVisible(true);\t\t\t\t// Sets MainMenu Visible\n//\t\tdesktopPane.add(MainMenu);\t\t\t\t// Adds MainMenu to DesktopPane\n\t\t\n\t\t\n\t\t MainMenu nw = MainMenu.getInstance();\n\t\t nw.pack();\n//\t\t if (nw.isVisible()) {\n//\t\t } else {\n\t\t\tnw.setBounds(100, 100, 400, 200);\n\t\t desktopPane.add(nw);\n\t\t nw.setVisible(true);\n\t\t \n//\t\t }\n\t\t try {\n\t\t nw.setMaximum(true);\n\t\t } catch (Exception e1) {\n\t\t \tSystem.out.println(e1);\n\t\t }\n\t}", "public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tStartingFrame window = new StartingFrame();\n\t\t\t\t\twindow.frame.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 621, 453);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblBlackjackVersion = new JLabel(\"BlackJack Version .01\");\r\n\t\tlblBlackjackVersion.setFont(new Font(\"Tahoma\", Font.PLAIN, 29));\r\n\t\tlblBlackjackVersion.setBounds(155, 55, 305, 59);\r\n\t\tframe.getContentPane().add(lblBlackjackVersion);\r\n\t\t\r\n\t\tJButton btnStart = new JButton(\"Start\");\r\n\t\tbtnStart.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tkontroll1.start();\r\n\t\t\t\t\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnStart.setBackground(Color.WHITE);\r\n\t\tbtnStart.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\r\n\t\tbtnStart.setToolTipText(\"Start Blackjack\");\r\n\t\tbtnStart.setBounds(201, 185, 163, 47);\r\n\t\tframe.getContentPane().add(btnStart);\r\n\t}", "public static void main(String[] args) {\n // Create the system.\n Application.launch( args );\n }", "public void run()\r\n\t{\r\n\t\tthis.mainFrame.setVisible(true);\r\n\t}", "public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }", "public void run ()\r\n {\r\n JFrame f = new JFrame(\"RuneScape Tower Defense\");\r\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n f.setContentPane(this);\r\n f.pack();\r\n f.setLocationRelativeTo(null); // Centers window\r\n f.setVisible(true);\r\n f.setResizable(true);\r\n }", "private static void createAndShowGUI() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\n\t\t//Create and set up the window.\n\t\tJFrame frame = new JFrame();\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(500, 500);\n\t\tframe.setLocationRelativeTo(null);\n\n\t\tResultLeftView view = new ResultLeftView();\n\t\tframe.setContentPane(view);\n\t\t//Display the window.\n\t\tframe.setVisible(true);\n\t}", "public void run() {\n\t\tframe.setVisible(true);\n\t}", "public static void main( String[] args )\n {\n\n new Frame();\n new ThreeDiceApp();\n }", "public static void main(String[] args) {\n new GameJFrame();\n // new DigitalWatch();\n }", "public static void main(String[] args) {\n new MainFrameClass();\n\n }" ]
[ "0.7721962", "0.7671579", "0.7566445", "0.7010299", "0.67865115", "0.6757913", "0.673126", "0.67256194", "0.667399", "0.66529185", "0.6631305", "0.6585976", "0.6559681", "0.64935666", "0.6491999", "0.6486304", "0.64726967", "0.64501196", "0.6412144", "0.6390983", "0.6369808", "0.6365521", "0.63521904", "0.6345482", "0.6338102", "0.6337582", "0.63372624", "0.633493", "0.63291967", "0.63242716", "0.6323305", "0.63227725", "0.6309729", "0.6303538", "0.629815", "0.6296177", "0.62959945", "0.6295437", "0.62853885", "0.62830955", "0.6281334", "0.6278955", "0.62768996", "0.627018", "0.6262478", "0.6261389", "0.6260752", "0.6257054", "0.62452984", "0.62444544", "0.62409127", "0.6223477", "0.62154204", "0.6209546", "0.62076163", "0.62053", "0.62051165", "0.61999243", "0.6195135", "0.61949635", "0.6187771", "0.6181657", "0.6175029", "0.6173424", "0.61732996", "0.6172515", "0.6167035", "0.61636996", "0.615506", "0.61531", "0.6152158", "0.61423266", "0.61421984", "0.614091", "0.6138562", "0.61356837", "0.61348337", "0.61244893", "0.6124313", "0.6112356", "0.6102758", "0.60940194", "0.6088289", "0.60880435", "0.6084063", "0.6083979", "0.6072298", "0.60703826", "0.60700107", "0.6067157", "0.60596573", "0.60589594", "0.6050944", "0.60501564", "0.60424876", "0.60398704", "0.6027375", "0.60256463", "0.6024319", "0.6021405", "0.6017486" ]
0.0
-1
escapes tikiwiki brackets that have no syntactical meaning
protected String escapeBrackets(String input) { String replacement = "\\\\[{group1}\\\\]"; return RegexUtil.loopRegex(input, doubleBrackets, replacement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void shouldRenderValidTags() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[ aA0._ ]] \",\n new MapOf<>(\"aA0._\", \"XX\")\n ),\n Matchers.is(\"XX \")\n );\n }", "@Test\n public void testEscapeCurlyBraces() {\n assertEquals(\"\\\\{\", HtmlUnitRegExpProxy.escapeJSCurly(\"{\"));\n assertEquals(\"\\\\{\", HtmlUnitRegExpProxy.escapeJSCurly(\"\\\\{\"));\n assertEquals(\"\\\\}\", HtmlUnitRegExpProxy.escapeJSCurly(\"}\"));\n assertEquals(\"\\\\}\", HtmlUnitRegExpProxy.escapeJSCurly(\"\\\\}\"));\n assertEquals(\"(^|\\\\{)#([^\\\\}]+)(\\\\}|$)\", HtmlUnitRegExpProxy.escapeJSCurly(\"(^|{)#([^}]+)(}|$)\"));\n\n assertEquals(\"a{5}\", HtmlUnitRegExpProxy.escapeJSCurly(\"a{5}\"));\n assertEquals(\"a{5,}\", HtmlUnitRegExpProxy.escapeJSCurly(\"a{5,}\"));\n assertEquals(\"a{5,10}\", HtmlUnitRegExpProxy.escapeJSCurly(\"a{5,10}\"));\n }", "public void setBracket(String val)\r\n\t{\r\n\t\t_bracket = val;\r\n\t}", "@Override\n\tprotected void handleOpenBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "private String escape(String token) {\n return token.replace(\",\" , \"\");\n }", "public interface EscapeMarker {}", "private static void removeBrackets(Element currentElement) {\r\n\t\tfor (Element removeBraces : currentElement.select(\":matchesOwn(\\\\((.*?)\\\\))\")) { // Removes characters in brackets\r\n\t\t\tremoveBraces.html(removeBraces.html().replaceAll(\"\\\\([^()]*\\\\)\", \"\"));\r\n\t\t}\r\n\t}", "@Override\n\tprotected void handleCloseBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "@Test\n public void testCurlyBracket() {\n String html = source.toHTML(new SEclipseStyle(), new SCurlyBracket());\n assertEquals(html, \"<pre style='color:\"\n + \"#000000;background:#ffffff;'>\"\n + \"public class MainClass {\\n\"\n + \" \\n\"\n + \" public static void main(String args[]){\\n\"\n + \" GradeBook myGradeBook=new GradeBook();\\n\"\n + \" String courseName=\\\"Java \\\";\\n\"\n + \" myGradeBook.displayMessage(courseName);\\n\"\n + \" \\n\"\n + \" }\\n\"\n + \" }public class Foo {\\n\"\n + \" \\n\"\n + \" public boolean bar(){\\n\"\n + \" super.foo();\\n\"\n + \" return false;\\n\"\n + \" \\n\"\n + \" }\\n\"\n + \" }</pre>\");\n }", "private void processBracket() {\r\n\t\tif (expression[currentIndex] == '(') {\r\n\t\t\ttoken = new Token(TokenType.OPEN_BRACKET, expression[currentIndex]);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.CLOSED_BRACKET, expression[currentIndex]);\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}", "static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }", "private static String fixBrackets(String reg) {\n while (reg.contains(\"()*\"))\n reg = removeChars(reg, reg.indexOf(\"()*\"), \"()*\".length());\n\n int i = reg.indexOf(\"(\");\n do {\n if (reg.charAt(i) == '(') {\n int j = 1;\n boolean leave = false;\n boolean removeBracket = true;\n do {\n if (reg.charAt(i + j) == '(') {\n bracketStack.push(i);\n bracketRemove.push(removeBracket);\n i = i + j;\n j = 1;\n removeBracket = true;\n } else if (reg.charAt(i + j) == ')') {\n if (removeBracket) {\n if (j == 2 && reg.contains(String.valueOf(QUOTE)))\n leave = false;\n else if (j > 2 && i + j + 1 < reg.length()\n && reg.charAt(i + j + 1) == '*') {\n i = i + j + 1;\n leave = true;\n }\n if (!leave) {\n reg = removeChars(reg, i + j, 1);\n reg = removeChars(reg, i, 1);\n if (bracketStack.size() > 0) {\n i = bracketStack.pop();\n removeBracket = bracketRemove.pop();\n j = 1;\n } else\n leave = true;\n }\n } else {\n if (bracketStack.size() > 0) {\n j = i + j + 1;\n i = bracketStack.pop();\n j = j - i;\n removeBracket = bracketRemove.pop();\n } else {\n i = i + j;\n leave = true;\n }\n }\n } else if (reg.charAt(i + j) == '|' && reg.charAt(i + j - 1) != QUOTE) {\n removeBracket = false;\n j++;\n } else\n j++;\n } while (!leave);\n }\n i++;\n } while (i < reg.length());\n\n return reg;\n }", "protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }", "protected String replaceAngleBrackets(String inString)\n {\n\tStringBuffer outString = new StringBuffer(inString.length());\n\tint p1 = 0; \n\tint p2 = 0;\n\tp1 = inString.indexOf(\"<\");\n\twhile (p1 >= 0)\n\t {\n outString.append(inString.substring(p2,p1));\n\t outString.append(\"&lt;\");\n\t p2 = p1 + 1;\n \t p1 = inString.indexOf(\"<\",p2);\n\t }\n if (p2 < inString.length())\n outString.append(inString.substring(p2));\n\treturn outString.toString();\n\t}", "@Override\n public void handleSpecialChar(\n com.globalsight.ling.docproc.extractor.html.HtmlObjects.Text t)\n {\n\n }", "private static String escapeTags(final String input) {\n if ((input == null) || (input.length() == 0)\n || (input.indexOf(\"<\") == -1 && input.indexOf(\">\") == -1)) {\n return input;\n }\n\n StringBuffer buf = new StringBuffer(input);\n return escapeTags(buf);\n }", "@Override\n\tpublic String toString() {\n\t\treturn text.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"[{]\\\\$\", \"\\\\\\\\{\\\\$\");\n\t}", "public boolean parseBracket(String s) {\n return false;\n }", "public static void assignCompoundTokens(ArrayList<String>scan){\n\nfor(int i=0;i<scan.size();i++){\n if( isUnaryPostOperator( scan.get(i) ) ){\n \n if(isNumber(scan.get(i-1))||isVariableString(scan.get(i-1))){ \n int index=i-1;\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\ni=j+1;\n }//end if\n\n else if(isClosingBracket(scan.get(i-1))){\n int index=MBracket.getComplementIndex(false, i-1, scan);\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\n i=j+1;\n }\n \n \n \n }\n \n \n \n}\n\n\n\n}", "@Test\n\tpublic void testBracketsWithoutOperators() throws BcException, IOException {\n\t\tString[] params = { \"((5)0)\" };\n\t\tbcApp.run(params, inStream, outStream);\n\t\tfail(\"Should have thrown exception but did not!\");\n\n\t}", "private String removeOuterBrackets(String expr) {\r\n int openPos = expr.indexOf(BRACKET_OPEN);\r\n if (openPos == -1) {\r\n throw new IllegalArgumentException(\"No opening bracket\");\r\n }\r\n \r\n int closePos = expr.lastIndexOf(BRACKET_CLOSE);\r\n if (closePos == -1) {\r\n throw new IllegalArgumentException(\"No closing bracket\");\r\n }\r\n \r\n String before = expr.substring(0, openPos);\r\n String middle = expr.substring(openPos + 1, closePos);\r\n String after = expr.substring(closePos + 1, expr.length());\r\n \r\n return before + middle + after;\r\n }", "public String getBracket()\r\n\t{\r\n\t\treturn _bracket;\r\n\t}", "@Override\n\tpublic void visit(Parenthesis arg0) {\n\t\t\n\t}", "@Override\n\tpublic void visit(Parenthesis arg0) {\n\n\t}", "private void tagBracketPrinter(String tag, int printType, String... token) {\n String temp = Arrays.toString(token).substring(1, Arrays.toString(token).length() - 1);\n tabPrinter();\n if (printType == 0) {\n writer.println(\"<\" + tag + \">\");\n tabs++;\n } else if (printType == 1) {\n tabs--;\n writer.println(\"</\" + tag + \">\");\n } else if (printType == 2)\n\n writer.println(\"<\" + tag + \"> \" + temp + \" </\" + tag + \">\");\n\n }", "@Test\n public void nonBracket(){\n assertTrue(BalancedBrackets.hasBalancedBrackets(\"\"));\n }", "public org.emftext.language.textAML3.resource.textAML3.ui.ITextAML3BracketHandler getBracketHandler();", "@Override\r\n\tpublic boolean getCurlyBracesDenoteCodeBlocks(int languageIndex) {\r\n\t\treturn true;\r\n\t}", "private static String escapeTags(final StringBuffer buf) {\n for (int i = 0; i < buf.length(); i++) {\n char ch = buf.charAt(i);\n if (ch == '<') {\n buf.replace(i, i + 1, \"&lt;\");\n } else if (ch == '>') {\n buf.replace(i, i + 1, \"&gt;\");\n }\n }\n return buf.toString();\n }", "private static String fixKleene(String reg) {\n int ind, beg, len;\n String expr;\n\n do {\n ind = reg.indexOf('*');\n if (ind != -1 && reg.charAt(ind - 1) == QUOTE)\n ind = 0;\n } while(ind == 0);\n\n while (ind >= 1) {\n char character = reg.charAt(ind - 1);\n if (character == ')') {\n beg = reg.substring(0, ind).lastIndexOf(\"(\");\n expr = reg.substring(beg + 1, ind - 1);\n len = expr.length();\n if (expr.contains(\"|\")) {\n if (ind + len + 2 < reg.length()\n && reg.substring(ind + 1, ind + 1 + len + 2).equals(\"(\" + expr + \")\")) {\n replace(reg, ind, '+');\n removeChars(reg, ind + 1, len + 2);\n }\n if (ind - (2 + len) * 2 >= 0\n && reg.substring(ind - (2 + len) * 2, ind - 2 - len).equals(\n \"(\" + expr + \")\")) {\n replace(reg, ind, '+');\n removeChars(reg, ind - (2 + len) * 2, len + 2);\n }\n } else {\n if (ind + len < reg.length()\n && reg.substring(ind + 1, ind + 1 + len).equals(expr)) {\n replace(reg, ind, '+');\n removeChars(reg, ind + 1, len);\n }\n if (ind - 2 - len * 2 >= 0\n && reg.substring(ind - 2 - len * 2, ind - 2 - len).equals(expr)) {\n replace(reg, ind, '+');\n removeChars(reg, ind - 2 - len * 2, len);\n }\n }\n } else if (reg.charAt(ind - 1) == QUOTE) {\n if (ind + 2 < reg.length() && reg.charAt(ind + 2) == character\n && reg.charAt(ind + 1) == QUOTE) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind + 1, 2);\n }\n if (ind - 2 * 2 >= 0 && reg.charAt(ind - 2 - 1) == character\n && reg.charAt(ind - 2 * 2) == QUOTE) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind - 2, 2);\n }\n } else {\n if (ind + 1 < reg.length() && reg.charAt(ind + 1) == character) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind + 1, 1);\n }\n if (ind - 2 >= 0 && reg.charAt(ind - 2) == character) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind - 2, 1);\n }\n }\n ind = reg.indexOf('*', ind + 1);\n }\n return reg;\n }", "private void emptyBracket() {\n\n\t\twhile (!stack.peek().matches(\"[(]\")) {\n\t\t\tqueue.add(stack.pop());\n\t\t}\n\t\t// Remove opening bracket from the stack.\n\t\tstack.pop();\n\t}", "public static final String escapeHTMLTags(String input) { \r\n if (input == null || input.length() == 0) {\r\n return input;\r\n } \r\n StringBuffer buf = new StringBuffer(input.length());\r\n char ch = ' ';\r\n for (int i = 0; i < input.length(); i++) {\r\n ch = input.charAt(i);\r\n if (ch == '<') {\r\n buf.append(LT);\r\n } else if (ch == '>') {\r\n buf.append(GT);\r\n } else if (ch == '\\'') {\r\n buf.append(S_QUTO);\r\n } else if (ch == '\"') {\r\n buf.append(D_QUTO);\r\n } else {\r\n buf.append(ch);\r\n }\r\n }\r\n return buf.toString();\r\n }", "@Override\n protected void paintAbsolute(Rectangle r, Graphics g, boolean inverted){\n int lry = r.height + r.y;\n int lrx = r.width + r.x - 1;\n // draw the bracket according to the OrientationType provided\n switch (this.getOrientation()) {\n case east:\n case west:\n if (! useCharacters) {\n // doesn't look better if enabled\n if (false && r.height <= this.fontHeight) {\n if (this.getOrientation() == Orientation.west) {\n g.drawString(\"[\", r.x, r.y + r.height);\n } else {\n g.drawString(\"]\", lrx - fontWidth, r.y + r.height);\n }\n } else {\n g.drawLine(r.x, r.y, lrx, r.y);\n g.drawLine(r.x, lry, lrx, lry);\n if (this.getOrientation() == Orientation.west) lrx = r.x;\n g.drawLine(lrx, r.y, lrx, lry);\n }\n } else {\n // This would be the preferred way of painting Brackets and Braces,\n // but the fonts are rendered strangely, and support seems incomplete?\n int bc = (this.getOrientation() == Orientation.west) ? 6 : 9;\n if (r.height <= this.fontHeight) {\n g.drawString(bc == 6 ? \"[\" : \"]\", r.x, r.y - this.fontOffset);\n } else {\n int y = r.y - this.fontOffset;\n int x = r.x;\n g.drawString(BRACKET_CHARS.substring(bc,bc+1), x , y );\n int yLast = r.y + r.height - this.fontHeight - this.fontOffset;\n g.drawString(BRACKET_CHARS.substring(bc+2,bc+3), x , yLast);\n yLast -= this.fontHeight;\n while (y < yLast) {\n y += this.fontHeight;\n g.drawString(BRACKET_CHARS.substring(bc+1,bc+2), x, y);\n }\n }\n }\n break;\n case north:\n case south:\n g.drawLine(r.x, lry, r.x, r.y);\n g.drawLine(lrx, r.y, lrx, lry);\n if (this.getOrientation() == Orientation.north) lry = r.y;\n g.drawLine(r.x, lry, lrx, lry);\n break;\n } // end switch\n }", "private static String printInTagElement(Element element) {\n\t\tif (element == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tif (element instanceof ElementFunction) {\n\t\t\treturn ParserDelimiters.FUNCTION_DELIMITER.getValue() + element.asText();\n\t\t}\n\t\t\n\t\tif (element instanceof ElementString) {\n\t\t\treturn ParserDelimiters.STRING_DELIMITER.getValue()\n\t\t\t\t\t+ addEscapes(\n\t\t\t\t\t\t\telement.asText(),\n\t\t\t\t\t\t\tEscapableArrays.stringEscpable(),\n\t\t\t\t\t\t\tParserDelimiters.ESCAPE_DELIMITER.getValue()\n\t\t\t\t\t\t)\n\t\t\t\t\t+ ParserDelimiters.STRING_DELIMITER.getValue();\n\t\t}\n\t\t\n\t\treturn element.asText();\n\t}", "private void createWord() {\n\t\tString value = \"\";\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isWhitespace(data[currentIndex])) {\n\t\t\tcurrentIndex++;\n\t\t}\n\t\tif (currentIndex + 1 < data.length && data[currentIndex] == '$'\n\t\t\t\t&& data[currentIndex + 1] == '}') {\n\t\t\tvalue += data[currentIndex++];\n\t\t\tvalue += data[currentIndex++];\n\t\t\ttoken = new Token(TokenType.WORD, value);\n\t\t\treturn;\n\t\t}\n\t\t// no escaping!\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& !Character.isWhitespace(data[currentIndex])) {\n\t\t\tif (data[currentIndex] == '\\\\') {\n\t\t\t\tthrow new LexerException(\"No exceping alowed.\");\n\t\t\t}\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\t\ttoken = new Token(TokenType.WORD, value);\n\n\t}", "@Test\n public void testMethod() {\n Engine e = new Engine( \"[[\", \"]]\", (int) '@', new HashMap<String, String>() );\n assertThat( e.isEscape( '@' ) ).isTrue();\n assertThat( e.isEscape( '\\\\' ) ).isFalse();\n }", "@Test\n public void testRegexWithNonEscapedCurlyBraces() throws Exception {\n final String html = \"<html><head><title>foo</title><script>\\n\"\n + \" function test() {\\n\"\n + \" var regexp = /(^|{)#([^}]+)(}|$)/;\\n\"\n + \" var str = '|{#abcd}|';\\n\"\n + \" alert(str.match(regexp))\\n\"\n + \" }\\n\"\n + \"</script></head><body onload='test()'>\\n\"\n + \"</body></html>\";\n \n final String[] expectedAlerts = {\"{#abcd},{,abcd,}\"};\n final List<String> collectedAlerts = new ArrayList<String>();\n createTestPageForRealBrowserIfNeeded(html, expectedAlerts);\n loadPage(html, collectedAlerts);\n assertEquals(expectedAlerts, collectedAlerts);\n }", "private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }", "@Override\r\n\tpublic void visit(RoundBracketExpression roundBracketExpression) {\n\r\n\t}", "private static final int skipBrackets(StringBuffer b) {\n\t\tint len1 = b.length()-1;\n\t\tint ini1 = 0;\n\t\tif (len1 <= 0) return(0);\n\t\twhile ((b.charAt(ini1) == '(') && (b.charAt(len1) == ')')) {\n\t\t\twhile (b.charAt(--len1) == ' ');\n\t\t\twhile (b.charAt(++ini1) == ' ');\n\t\t\tb.setLength(++len1);\n\t\t}\n\t\treturn(ini1);\n\t}", "public Nawiasy(String str) {\r\n super(str);\r\n openBracket = str.equals(\"(\");\r\n }", "private boolean isBracketAhead() {\r\n\t\treturn expression[currentIndex] == '(' || expression[currentIndex] == ')';\r\n\t}", "private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}", "@Test\n void shouldNotRenderVariableInsideNested() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[#2]][[11]] [[^4]][[15]][[/4]] [[/2]]\",\n new MapOf<CharSequence, Object>(\n new MapEntry<>(\"11\", \"AA\"),\n new MapEntry<>(\"15\", \"BB\")\n )\n ),\n Matchers.is(\"[[#2]][[11]] [[^4]][[15]][[/4]] [[/2]]\")\n );\n }", "private static String fixLeadingBracketSugar( String dotNotaton ) {\n\n if ( dotNotaton == null || dotNotaton.length() == 0 ) {\n return \"\";\n }\n\n char prev = dotNotaton.charAt( 0 );\n StringBuilder sb = new StringBuilder();\n sb.append( prev );\n\n for ( int index = 1; index < dotNotaton.length(); index++ ) {\n char curr = dotNotaton.charAt( index );\n\n if ( curr == '[' && prev != '\\\\') {\n if ( prev == '@' || prev == '.' ) {\n // no need to add an extra '.'\n }\n else {\n sb.append( '.' );\n }\n }\n\n sb.append( curr );\n prev = curr;\n }\n\n return sb.toString();\n }", "protected String escape(String replacement) {\n return replacement.replace(\"\\\\\", \"\\\\\\\\\").replace(\"$\", \"\\\\$\");\n }", "private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to double\n // escape slashes (4 slashes) and quotes (3 slashes + \") in those strings.\n // Since we need to write \\\\ and \\\", we end up with 8 and 7 slashes,\n // respectively.\n return in.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\\\\\"\");\n }", "private final String RemoveExtraBrackets(String expression) {\r\n String newExpression = expression;\r\n int openParanthesis = 0;\r\n int closeParanthesis = 0;\r\n if ((expression.startsWith(\"(\") && expression.endsWith(\")\"))) {\r\n for (int i = 0; (i \r\n < (expression.length() - 1)); i++) {\r\n String charExpression = expression.substring(i, 1);\r\n if (charExpression.equals(\"(\")) {\r\n openParanthesis++;\r\n }\r\n else if (charExpression.equals(\")\")) {\r\n closeParanthesis++;\r\n }\r\n \r\n }\r\n \r\n if (((openParanthesis - 1) \r\n == closeParanthesis)) {\r\n newExpression = expression.substring(1, (expression.length() - 2));\r\n }\r\n \r\n }\r\n \r\n return newExpression;\r\n }", "private void skipBrackets(char openingChar, char closingChar) {\r\n int nestedLevel = 0;\r\n int length = sourceCode.length();\r\n char stringType = 0;\r\n do {\r\n char character = sourceCode.charAt(index);\r\n if (stringType != 0) {\r\n // Currently in string skipping mode.\r\n if (character == stringType) {\r\n // Exit string skipping mode.\r\n stringType = 0;\r\n } else if (character == '\\\\') {\r\n // Skip escaped character.\r\n ++index;\r\n }\r\n } else if (character == '/') {\r\n // Skip the comment if there is any.\r\n skipComment();\r\n // skipComment skips to the first character after the comment but\r\n // the index is already incremented by this loop, so decrement it\r\n // to compensate.\r\n --index;\r\n } else if (character == openingChar) {\r\n // Entering brackets.\r\n ++nestedLevel;\r\n } else if (character == closingChar) {\r\n // Exiting brackets.\r\n --nestedLevel;\r\n } else if (character == '\\'' || character == '\"') {\r\n // Enter string skipping mode.\r\n stringType = character;\r\n }\r\n // Keep going until the end of the string or if all brackets are matched.\r\n } while (++index < length && nestedLevel > 0);\r\n }", "public interface QuotedL1Node {\n\n}", "private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }", "public static String chopBraces(String s) {\n\t\tif(s.startsWith(STRSQBRACKETSTART) && s.endsWith(STRSQBRACKETEND))\n\t\t\treturn s.substring(1,s.length()-1);\n//\t\tboolean changed;\n//\t\tdo {\n//\t\t\tchanged=true;\n//\t\t\tif(s.startsWith(STRSQBRACKETSTART)) s=s.substring(1);\n//\t\t\telse if(s.startsWith(STRCURLYSTART)) s=s.substring(1);\n//\t\t\telse if(s.startsWith(STRLT)) s=s.substring(1);\n//\t\t\telse if(s.endsWith(STRSQBRACKETEND)) s=s.substring(0,s.length()-1);\n//\t\t\telse if(s.endsWith(STRCURLYEND)) s=s.substring(0,s.length()-1);\n//\t\t\telse if(s.endsWith(STRGT)) s=s.substring(0,s.length()-1);\n//\t\t\telse changed=false;\n//\t\t} while(changed);\n\t\t\n\t\treturn s;\n//\t\t\n//\t\tif(s==null || (s.indexOf('[')<0 && s.indexOf('{')<0)) return s;\n//\t\treturn s.substring(1,s.length()-1);\t\t\n\t}", "public void quote() {\n text.append(\"\\'\");\n }", "private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }", "public ASTNode visitBracket(BracketContext ctx) {\n return visit(ctx.expr());\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[ (\");\n xPathLexer0.setPreviousToken((Token) null);\n assertEquals(\"[ (\", xPathLexer0.getXPath());\n }", "ParenthesisExpr createParenthesisExpr();", "public static String replaceEscapeChars(final String input) {\n if (input == null) return null;\n\n String retValue = LEFT_SQUARE_BRACKET_PATTERN.matcher(input).replaceAll(\"[\");\n retValue = RIGHT_SQUARE_BRACKET_PATTERN.matcher(retValue).replaceAll(\"]\");\n retValue = LEFT_BRACKET_PATTERN.matcher(retValue).replaceAll(\"(\");\n retValue = RIGHT_BRACKET_PATTERN.matcher(retValue).replaceAll(\")\");\n retValue = COLON_PATTERN.matcher(retValue).replaceAll(\":\");\n retValue = COMMA_PATTERN.matcher(retValue).replaceAll(\",\");\n retValue = EQUALS_PATTERN.matcher(retValue).replaceAll(\"=\");\n retValue = PLUS_PATTERN.matcher(retValue).replaceAll(\"+\");\n return MINUS_PATTERN.matcher(retValue).replaceAll(\"-\");\n }", "private static void render(String s)\n {\n if (s.equals(\"{\"))\n {\n buf_.append(\"\\n\");\n indent();\n buf_.append(s);\n _n_ = _n_ + INDENT_WIDTH;\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"(\") || s.equals(\"[\"))\n buf_.append(s);\n else if (s.equals(\")\") || s.equals(\"]\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\"}\"))\n {\n int t;\n _n_ = _n_ - INDENT_WIDTH;\n for(t=0; t<INDENT_WIDTH; t++) {\n backup();\n }\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\",\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\";\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"\")) return;\n else\n {\n buf_.append(s);\n buf_.append(\" \");\n }\n }", "protected Bracket() {\n _obj = null;\n _index = null;\n }", "String removeBrackets( String reference ) {\n return new String( reference.replace(\"[\", \"\").replace(\"]\", \"\").trim() );\n }", "private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n String string0 = JSONObject.quote(\"</IFXFL[\\u0007U86s$n`t?\");\n assertEquals(\"\\\"<\\\\/IFXFL[\\\\u0007U86s$n`t?\\\"\", string0);\n }", "private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }", "CharSequence escape(char c);", "default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }", "public static String escape(String string) throws UnsupportedEncodingException {\n\t\t\n fill();\n \n StringBuilder bufOutput = new StringBuilder(string);\n for (int i = 0; i < bufOutput.length(); i++) {\n //String replacement = (String) SPARQL_ESCAPE_SEARCH_REPLACEMENTS.get(\"\" + bufOutput.charAt(i));\n // if(replacement!=null) {\n if( SPARQL_ESCAPE_SEARCH_REPLACEMENTS.contains(bufOutput.charAt(i))) {\n String replacement = URLEncoder.encode( Character.toString(bufOutput.charAt(i)), \"UTF-8\");\n bufOutput.deleteCharAt(i);\n bufOutput.insert(i, replacement);\n // advance past the replacement\n i += (replacement.length() - 1);\n }\n }\n return bufOutput.toString();\n\t}", "@Test(timeout = 4000)\n public void test157() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"($mYG)Udli\");\n Token token0 = xPathLexer0.leftParen();\n assertEquals(1, token0.getTokenType());\n assertEquals(\"(\", token0.getTokenText());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(\"$\", token1.getTokenText());\n assertEquals(26, token1.getTokenType());\n }", "public static String escapeMarkup(final String s)\n\t{\n\t\treturn escapeMarkup(s, false);\n\t}", "static boolean validBrackets(String s){\n ArrayList<Character> arr = new ArrayList<Character>();\n for(int i = 0; i < s.length(); i++){\n if(s.charAt(i) == '{' || s.charAt(i) == '[' || s.charAt(i) == '('){\n arr.add(s.charAt(i));\n }else if(s.charAt(i) == '}'){\n if(arr.get(arr.size()-1) != '{'){\n return false;\n }\n arr.remove(arr.size()-1);\n }else if(s.charAt(i) == ']'){\n if(arr.get(arr.size()-1) != '['){\n return false;\n }\n arr.remove(arr.size()-1);\n }else if(s.charAt(i) == ')'){\n if(arr.get(arr.size()-1) != '('){\n return false;\n }\n arr.remove(arr.size()-1);\n }\n }\n return arr.isEmpty();\n }", "private static boolean je_operator(String regex, int index) {\n int count = 0;\n\n while (index - 1 >= 0 && regex.charAt(index - 1) == '\\\\') {\n count++;\n index--;\n }\n\n return count % 2 == 0;\n }", "@Override\n\tprotected void handleOpenParenthesis() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "private String encodeXSS(String s) { \n if (s == null || \"\".equals(s)) { \n return s; \n } \n StringBuilder sb = new StringBuilder(s.length() + 16); \n for (int i = 0; i < s.length(); i++) { \n char c = s.charAt(i); \n switch (c) { \n \n //handle the '<' and '>' which can be used for constructing <script> and </script> \n case '>': \n sb.append('>'); \n break; \n case '<': \n sb.append('<'); \n break; \n \n //since the html can support the characters using $#number format \n //so here also need to escape '#','&' and quote symbol \n case '\\'': \n sb.append('‘'); \n break; \n case '\\\"': \n sb.append('“'); \n break; \n case '&': \n sb.append('&'); \n break; \n case '\\\\': \n sb.append('\'); \n break; \n case '#': \n sb.append('#'); \n break; \n //if not the special characters ,then output it directly \n default: \n sb.append(c); \n break; \n } \n } \n return sb.toString(); \n }", "private String escapedValue(String value) {\n \t\tStringBuffer buf = new StringBuffer(value.length() * 2); // assume expansion by less than factor of 2\n \t\tfor (int i = 0; i < value.length(); i++) {\n \t\t\tchar character = value.charAt(i);\n \t\t\tif (character == '\\\\' || character == '\\t' || character == '\\r' || character == '\\n' || character == '\\f') {\n \t\t\t\t// handle characters requiring leading \\\n \t\t\t\tbuf.append('\\\\');\n \t\t\t\tbuf.append(character);\n \t\t\t} else if ((character < 0x0020) || (character > 0x007e)) {\n \t\t\t\t// handle characters outside base range (encoded)\n \t\t\t\tbuf.append('\\\\');\n \t\t\t\tbuf.append('u');\n \t\t\t\tbuf.append(HEX[(character >> 12) & 0xF]); // first nibble\n \t\t\t\tbuf.append(HEX[(character >> 8) & 0xF]); // second nibble\n \t\t\t\tbuf.append(HEX[(character >> 4) & 0xF]); // third nibble\n \t\t\t\tbuf.append(HEX[character & 0xF]); // fourth nibble\n \t\t\t} else {\n \t\t\t\t// handle base characters\n \t\t\t\tbuf.append(character);\n \t\t\t}\n \t\t}\n \t\treturn buf.toString();\n \t}", "@Override\r\n\tpublic void disableBracket(BracketsDTO bracket) throws DALException {\n\t\t\r\n\t}", "public interface HtmlEscaper {\n String escape(String string);\n}", "private void backslash() {\n // currentIndex points to '\\\\' character, so we move it to the next character\n ++currentIndex;\n \n // If wrong usage of '\\\\'\n if( !( \n currentIndex < dataLength && \n ( Character.isDigit( data[currentIndex] ) || data[currentIndex] == '\\\\' ) \n )\n ) {\n throw new LexerException(\"Wrong '\\' usage.\");\n }\n }", "@Override\n\tprotected void handleCloseParenthesis() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"d>%NV0\");\n xPathLexer0.leftParen();\n Token token0 = xPathLexer0.div();\n assertNull(token0);\n }", "public String htmlSpecialChar(String string){\n String res = string.replaceAll(\"&\",\"&amp;\");\n res = res.replace(\"'\",\"&#039;\");\n res = res.replace(\"\\\"\",\"&qout;\");\n res = res.replace(\"$\",\"&#036;\");\n res = res.replace(\"%\",\"&#037;\");\n res = res.replace(\"<\",\"&lt;\");\n res = res.replace(\">\",\"&gt;\");\n res = res.replace(\"\\n\",\"\\\\n\");\n return res;\n }", "private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}", "public static String escapeJS(String inText)\n {\n return inText\n .replaceAll(\"(?<!\\\\\\\\)'\", \"\\\\\\\\'\")\n .replaceAll(\"(?<!\\\\\\\\)\\\"\", \"\\\\\\\\\\\"\")\n .replaceAll(\"\\n\", \"\\\\\\\\n\");\n }", "@Test\n void shouldNotRenderVariableInside() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]\",\n new MapOf<>(\n new MapEntry<>(\"1\", \"A\"),\n new MapEntry<>(\"5\", \"B\"),\n new MapEntry<>(\"6\", \"C\")\n )\n ),\n Matchers.is(\n \"[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]\"\n )\n );\n }", "public String escape(String source) {\r\n\t\treturn null;\r\n\t}", "public String escapeSpetialCharecters(String string)\r\n {\r\n return string.replaceAll(\"(?=[]\\\\[+&|!(){}^\\\"~*?:\\\\\\\\-])\", \"\\\\\\\\\");\r\n }", "private boolean syntaxOkay(String in){\n\t\tint numOpenBraces = 0;\n\t\tint numCloseBraces = 0;\n\t\tint countQuote = 0;\n\t\tfor(int i = 0; i < in.length(); i++){\n\t\t\tchar currentChar = in.charAt(i);\n\t\t\tif(currentChar == '{'){\n\t\t\t\tint open = i;\n\t\t\t\tnumOpenBraces++;\n\t\t\t}else if(currentChar == '}'){\n\t\t\t\tint close = i;\n\t\t\t\tnumCloseBraces++;\n\t\t\t}else if(currentChar == '\"'){\n\t\t\t\tcountQuote++;\n\t\t\t}\n\t\t}\n\t\treturn numOpenBraces == numCloseBraces && countQuote % 2 == 0;\n\t}", "private void eatTripleQuote() {\n position += 3;\n while (position < length) {\n if (data.charAt(position) == '\\'' && isTripleQuoteAtPosition()) {\n tokenStart += 3;\n tokenEnd = position;\n isEscaped = true;\n position += 3;\n return;\n }\n\n position++;\n }\n\n tokenEnd = position;\n }", "@Test\n public void matchUTF8Postfix() throws Exception {\n tags.put(TAGK, \"Здравей'_хора\");\n TagVFilter filter = new TagVWildcardFilter(TAGK, \n \"*хора\");\n assertTrue(filter.match(tags).join());\n }", "private boolean parseOpeningBracket() {\n if (index < end && source.charAt(index) == '[') {\n index++;\n return true;\n }\n return false;\n }", "public static String escapeSpecialChars(String value) {\r\n if (value != null) {\r\n for (int c = 0; c < SPECIAL_CHARS.length; c++) {\r\n value = value.replaceAll(\"\" + SPECIAL_CHARS[c], SPECIAL_CHAR_NAME[c]);\r\n }\r\n }\r\n return value;\r\n }", "private String removeSpecialCharacters(String word)\n\t{\n\t\tString newString = \"\";\n\n\t\tfor (int i = 0; i < word.length(); i++)\n\t\t{\n\t\t\tif (word.charAt(i) != '?' && word.charAt(i) != '!' && word.charAt(i) != '\"' && word.charAt(i) != '\\''\n\t\t\t\t\t&& word.charAt(i) != '#' && word.charAt(i) != '(' && word.charAt(i) != ')' && word.charAt(i) != '$'\n\t\t\t\t\t&& word.charAt(i) != '%' && word.charAt(i) != ',' && word.charAt(i) != '&')\n\t\t\t{\n\t\t\t\tnewString += word.charAt(i);\n\t\t\t}\n\t\t}\n\n\t\treturn newString;\n\t}", "private void writeEsc(char ch[], int start, int length, boolean isAttVal) throws IOException {\n\t\tescapeHandler.escape(ch, start, length, isAttVal, output);\n\t}", "@Test(expected=AbstractMethodError.class)\n public void testNonEvaluatable() {\n TokenType.BRACKET_CLOSE.evaluate(null);\n }", "private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}", "@Override\n\tpublic Void visit(InBrackets ib) {\n\t\tib.expr.accept(this);\n\t\treturn null;\n\t}", "private boolean escape() {\r\n return backslash() && (\r\n (digits() && (CHAR(';') || true)) || SET(\"rnqdgb\"));\r\n }", "public void backSlash() {\n text.append(\"\\\\\");\n }", "@Override\n\tpublic void ignorableWhitespace(char ch[], int start, int length) throws SAXException {\n\t\ttry {\n\t\t\twriteEsc(ch, start, length, false);\n\t\t\tsuper.ignorableWhitespace(ch, start, length);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }", "public final void mRBRACKET() throws RecognitionException {\n try {\n int _type = RBRACKET;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2715:3: ( ']' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2716:3: ']'\n {\n match(']'); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }" ]
[ "0.5758591", "0.564697", "0.547709", "0.54470384", "0.5374081", "0.53686315", "0.53533286", "0.5338853", "0.53379965", "0.5310661", "0.5251911", "0.5240094", "0.5208275", "0.5198992", "0.5163937", "0.5080073", "0.5059119", "0.5058224", "0.5055543", "0.50537866", "0.5013908", "0.5001311", "0.49985683", "0.4998249", "0.49830362", "0.4948788", "0.49438643", "0.49341056", "0.49273014", "0.4926411", "0.49027568", "0.4896582", "0.48907286", "0.4882291", "0.48512203", "0.48298943", "0.4822432", "0.48160094", "0.48117232", "0.48006088", "0.47941017", "0.47775173", "0.47691524", "0.47451082", "0.4743505", "0.47393715", "0.47362632", "0.47077128", "0.4704302", "0.4700894", "0.47001365", "0.46978965", "0.4681262", "0.46807665", "0.46801487", "0.46716675", "0.4671183", "0.46560004", "0.46528247", "0.46475103", "0.4628574", "0.46209005", "0.46206212", "0.46198112", "0.4618194", "0.4613468", "0.4607363", "0.45980284", "0.45909134", "0.45882484", "0.4583977", "0.45775768", "0.45743683", "0.45689553", "0.4558001", "0.45411086", "0.4536266", "0.4533989", "0.4523234", "0.45077577", "0.45064065", "0.45062023", "0.45048574", "0.449191", "0.44911584", "0.44846246", "0.44806948", "0.44798672", "0.4477747", "0.44762877", "0.44693437", "0.4468227", "0.44650298", "0.44558817", "0.4438197", "0.44369513", "0.44356292", "0.4423861", "0.44211563", "0.441876" ]
0.6235916
0
Returns the center of the gap in the fence
public Point getGapCoordinates() { Point gap = new Point(50,50); return gap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getCenter() {\n return 0.5 * (lo + hi);\n }", "private double centerX() {\n return (piece.boundingBox().getWidth() % 2) / 2.0;\n }", "private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_point;\n }", "public Vec2 getCenter()\n {\n int numTriangles = numPoints - 2;\n\n // Calculate the average midpoint of each composite triangle\n Vec2 averageMidpoint = new Vec2(0, 0);\n float area = 0;\n for (int i=0; i<numTriangles; i++)\n {\n Triangle t = new Triangle(points[0], points[i+1], points[i+2]);\n Vec2 triangleMidpoint = t.getCenter();\n float triangleArea = t.getArea();\n\n averageMidpoint.addX(triangleMidpoint.getX() * triangleArea);\n averageMidpoint.addY(triangleMidpoint.getY() * triangleArea);\n\n area += triangleArea;\n\n// Color color;\n// if (i==0) color = Color.GREEN;\n// else color = Color.ORANGE;\n// SumoGame.ADD_DEBUG_DOT(points[0].getX(), points[0].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+1].getX(), points[i+1].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+2].getX(), points[i+2].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(triangleMidpoint.getX(), triangleMidpoint.getY(), triangleArea/2000, color);\n }\n\n averageMidpoint.div(area);\n\n// SumoGame.ADD_DEBUG_DOT(averageMidpoint.getX(), averageMidpoint.getY(), 20, Color.RED);\n\n return averageMidpoint;\n }", "public final int centerX() {\n return (left + right) >> 1;\n }", "Point getCenter();", "Point getCenter();", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "public static int getCenter() {\n\t\treturn Center;\n\t}", "public Point getCenter() {\n \treturn new Point(x+width/2,y+height/2);\n }", "public Point centeroid ()\r\n {\r\n return new Point ((v1.getX()+v2.getX()+v3.getX())/3,(v1.getY()+v2.getY()+v3.getY())/3);\r\n }", "public int getCenterX() {\n\t\t\treturn (int) origin.x + halfWidth;\n\t\t}", "public final Vector getCenter() {\n\t\treturn (center == null) ? computeCenter() : center;\n\t}", "public Line2D.Double\ncenterAtMidPt()\n{\n\tPoint2D midPt = this.getMidPt();\n\treturn new Line2D.Double(\n\t\tgetX1() - midPt.getX(),\n\t\tgetY1() - midPt.getY(),\n\t\tgetX2() - midPt.getX(),\n\t\tgetY2() - midPt.getY());\n}", "public double getCenterX() { return centerX.get(); \t}", "PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }", "private Point getCentreCoordinate(Point t)\n {\n \treturn new Point (t.x + Constants.cell_length /2f, t.y, t.z+Constants.cell_length/2f );\n }", "public Vector2 getCenter() {\n\t\treturn new Vector2(position.x + size / 4f, position.y + size / 4f);\n\t}", "public Coords getCenter()\r\n {\r\n return new Coords(Math.round(x + width / 2), Math.round(y + height / 2));\r\n }", "private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }", "public LatLng getCentrePos() {\n double lat = 0;\n double lon = 0;\n for (int i=0; i<newHazards.size(); i++) {\n lat += frags.get(i).getHazard().getLatitude();\n lon += frags.get(i).getHazard().getLongitude();\n }\n return new LatLng(lat / newHazards.size(), lon / newHazards.size());\n }", "public int getCenter() {\n\t\t\treturn center;\n\t\t}", "public PointF getCenter() {\n return center;\n }", "public float getCentreX() {\n return centreX;\n }", "public GJPoint2D center();", "public ImageWorkSpacePt findCurrentCenterPoint() {\n WebPlot plot= getPrimaryPlot();\n\n\n int screenW= plot.getScreenWidth();\n int screenH= plot.getScreenHeight();\n int sw= getScrollWidth();\n int sh= getScrollHeight();\n int cX;\n int cY;\n if (screenW<sw) {\n cX= screenW/2;\n }\n else {\n int scrollX = getScrollX();\n cX= scrollX+sw/2- wcsMarginX;\n }\n\n if (screenH<sh) {\n cY= screenH/2;\n }\n else {\n int scrollY = getScrollY();\n cY= scrollY+sh/2- wcsMarginY;\n }\n\n ScreenPt pt= new ScreenPt(cX,cY);\n\n return plot.getImageWorkSpaceCoords(pt);\n }", "public Point getCenter() {\r\n\t\treturn center;\r\n\t}", "final public Vector2 getCenter()\n\t{\n\t\treturn center;\n\t}", "public double getCenterX()\n {\n return mainVBox.getTranslateX() + (mainVBox.getWidth() / 2);\n }", "public int getMidPos ()\r\n {\r\n if (getLine()\r\n .isVertical()) {\r\n // Fall back value\r\n return (int) Math.rint((getFirstPos() + getLastPos()) / 2.0);\r\n } else {\r\n return (int) Math.rint(\r\n getLine().yAt((getStart() + getStop()) / 2.0));\r\n }\r\n }", "public Point getCenter() {\n return center;\n }", "public double getBorderCenterX()\n {\n return borderCenterX;\n }", "public Coordinate getCenteredCoordinate() {\n return coordinate.add(getHalfSize());\n }", "private int get_x() {\n return center_x;\n }", "public Vector2 getCenter() {\n return new Vector2(rectangle.centerX(), rectangle.centerY());\n }", "public FPointType calculateCenter() {\n fRectBound = getBounds2D();\n FPointType fptCenter = new FPointType();\n fptCenter.x = fRectBound.x + fRectBound.width / 2.0f;\n fptCenter.y = fRectBound.y + fRectBound.height / 2.0f;\n calculate(fptCenter);\n \n rotateRadian = 0.0f;\n \n return fptCenter;\n }", "public int centerX() {\n return mRect.centerX();\n }", "public double getCenterX() {\n return this.getLayoutSlot().getX() + (int) (this.getLayoutSlot().getWidth() / 2);\n }", "public Point getCenter() {\r\n return this.center;\r\n }", "private double centerY() {\n return (piece.boundingBox().getHeight() % 2) / 2.0;\n }", "long getMid();", "long getMid();", "private static Point areaCentre() {\r\n\t\tvar centreLon = (lonLB + lonUB)/2;\r\n\t\tvar centreLat = (latLB + latUB)/2;\r\n\t\treturn Point.fromLngLat(centreLon, centreLat);\r\n\t}", "public Point2D centerOfMass() \n {\n double cx = 0, cy = 0;\n double area = areaUnsigned();\n double factor = 0;\n for (Line2D line : lines) \n {\n factor = line.getP1().getX() * line.getP2().getY() - line.getP2().getX() * line.getP1().getY();\n cx += (line.getP1().getX() + line.getP2().getX()) * factor;\n cy += (line.getP1().getY() + line.getP2().getY()) * factor;\n }\n area *= 6.0d;\n factor = 1 / area;\n cx *= factor;\n cy *= factor;\n return new Point2D.Double(cx, cy);\n }", "public int getCenterX(){\r\n return centerX;\r\n }", "public Coordinate getCenter() {\n return center;\n }", "public Point middle() {\r\n Point middlePoint = new Point(((this.end.getX() + this.start.getX()) / 2),\r\n ((this.end.getY() + this.start.getY()) / 2));\r\n return middlePoint;\r\n }", "public Vector2 getCenter() {\n return center;\n }", "public float getCenterX() {\n return cPosition.getX() + (float) cFishSizeX / 2;\n }", "public Point2D.Float getCenter() {\r\n\t\treturn center;\r\n\t}", "public Point2D getCentre() {\n return new Point2D.Float(centreX, centreY);\n }", "public Coord3d getCenter() {\n return new Coord3d((xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2);\n }", "public Vector3D getCentrePosition()\n\t{\n\t\treturn centrePosition;\n\t}", "@NotNull\n public Location<World> getCenterBlock() {\n int centerX = getMinChunk().getX() + 16;\n int centerZ = getMinChunk().getZ() + 16;\n return Tungsten.INSTANCE.getIslandWorld().getLocation(centerX * 16, 86, centerZ * 16);\n }", "public Point2D getGraphViewCenter() {\n \n \t\t// be explicit\n \t\treturn (graphViewCenterX != null && graphViewCenterY != null) ? new Point2D.Double(\n \t\t\t\tgraphViewCenterX.doubleValue(), graphViewCenterY.doubleValue())\n \t\t\t\t: null;\n \t}", "public Double2D getCentral() {\n\n int width = (int)Math.sqrt(state.numAgents);\n if (Math.sqrt(state.numAgents) / width == 1.0) {\n\n double halfWidth = width / 2.0;\n int x = id / width;\n int y = id % width;\n\n double length = state.simWidth / width;\n double halfLength = length / 2.0;\n\n double dx = ((x - halfWidth) * length + halfLength) + meanLocation.getX();\n double dy = ((y - halfWidth) * length + halfLength) + meanLocation.getY();\n //state.printlnSynchronized(\"Dx = \" + dx + \" dy = \" + dy);\n return new Double2D(dx, dy);\n }else {\n return meanLocation;\n }\n }", "public Point2d get2DCenter() {\n double xOfCenter = 0;\n double yOfCenter = 0;\n for (IAtom atom : atoms) {\n xOfCenter += atom.getPoint2d().x;\n yOfCenter += atom.getPoint2d().y;\n }\n\n return new Point2d(xOfCenter / ((double) getAtomCount()),\n yOfCenter / ((double) getAtomCount()));\n }", "public double getCenterX() {\n\t\treturn centerX;\n\t}", "private double getRangeCenter(int lowerBound, int upperBound) {\n return (lowerBound + upperBound) / 2.0;\n }", "public Vector3f getCenter() {\r\n return center;\r\n }", "public Vector2D getArithmeticCenter()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tVector2D center = Vector2D.ZERO;\n\n\t\tfor (Unit unit : this)\n\t\t{\n\t\t\tcenter = center.add(Vector2DMath.toVector(unit.getPosition()));\n\t\t}\n\t\tcenter = center.scale(1.0f / size());\n\n\t\treturn center;\n\t}", "public Point getCenter() {\n return new Point((int) getCenterX(), (int) getCenterY());\n }", "public native vector kbAreaGetCenter(int areaID);", "public final Point getCenterPointOnScreen() {\n\t\treturn Calculations.tileToScreen(getLocalRegionX(), getLocalRegionY(),\n\t\t\t\t0.5D, 0.5D, 0);\n\t}", "public Position getMidPoint() {\n return midPoint;\n }", "float getLgap();", "public Point3d get3DCenter() {\n double xOfCenter = 0;\n double yOfCenter = 0;\n double zOfCenter = 0;\n for (IAtom atom : atoms) {\n xOfCenter += atom.getPoint3d().x;\n yOfCenter += atom.getPoint3d().y;\n zOfCenter += atom.getPoint3d().z;\n }\n\n return new Point3d(xOfCenter / getAtomCount(),\n yOfCenter / getAtomCount(),\n zOfCenter / getAtomCount());\n }", "public double[] getCenter() {\n return this.center;\n }", "public Location3D getCenter() {\n\t\treturn new Location3D(world, lowPoint.getBlockX() + getXSize() / 2, lowPoint.getBlockY() + getYSize() / 2, lowPoint.getBlockZ() + getZSize() / 2);\n\t}", "public abstract Vector computeCenter();", "public int getXCenter() {\n return getXOrigin() + panelWidth/2;\n }", "private double distanceToCenterOfDisplay(double x, double y) {\n\t\t// A^2 + B^2 = C^2\n\t\tdouble centerx = VIEWING_AREA_WIDTH / 2;\n\t\tdouble centery = VIEWING_AREA_HEIGHT / 2;\n\t\tdouble diffx = abs(centerx - x);\n\t\tdouble diffy = abs(centery - y);\n\t\tdiffx *= diffx;\n\t\tdiffy *= diffy;\n\t\treturn sqrt(diffx + diffy);\n\t}", "public Vector3D getCenter() {\n return center;\n }", "public double getMeanCenterDifferenceFromStart(){\n double[] meanCenter = getMeanCenter();\n float[] trans = getTranslationVector(center.getX(),center.getY(),BITMAP_SIZE,BITMAP_SIZE,CONSTANT);\n Log.e(\"Points\",\"Actual (X,Y) = \"+\"(\"+((center.getX()*CONSTANT)+trans[0])+\",\"+((center.getY()*CONSTANT)+trans[1])+\")\");\n Log.e(\"Points\",\"Mean (X,Y) = \" + \"(\"+meanCenter[0]+\",\"+meanCenter[1]+\")\");\n double result = Math.sqrt(\n Math.pow(((center.getX()*CONSTANT)+trans[0]) - meanCenter[0],2)+\n Math.pow(((center.getY()*CONSTANT)+trans[1]) - meanCenter[1],2)\n );\n return result;\n }", "public Point2D.Double GetCentrePoint() {\n \t\treturn new Point2D.Double(centrePoint.getX(), centrePoint.getY());\n \t}", "public Vector3d getCurrentCollisionCenter() {\r\n return new Vector3d(collisionCenter.x + currentPosition.x, collisionCenter.y + currentPosition.y, collisionCenter.z + currentPosition.z);\r\n }", "private PointF getCenterOfCropRect() {\n return new PointF(\n cropRect.centerX(),\n cropRect.centerY());\n }", "public Point getCenter() {\n return location.center();\n }", "public final int centerY() {\n return (top + bottom) >> 1;\n }", "public static double getCenter(int index) {\n\t\tif (index==0) return -1.0;\n\t\telse return DEFAULT_CENTERS[index-1];\n\t}", "public Point getCenterPx(){\n\t\tint centerX = images[0].getWidth()/2;\n\t\tint centerY = images[0].getHeight()/2;\n\t\tPoint centerPx = new Point(centerX,centerY);\n\t\treturn centerPx;\n\t}", "public float getWidth()\n {\n return getUpperRightX() - getLowerLeftX();\n }", "public ViewPosition getCenterPosition() {\n\t\treturn null;\n\t}", "public Point2D getLeftCenterPoint()\n {\n double x = mainVBox.getTranslateX();\n double y = mainVBox.getTranslateY() + (mainVBox.getHeight() / 2);\n return new Point2D(x, y);\n }", "public GPoint midpoint() {\n return(new GPoint((point1.getFirst()+point2.getFirst())/2.0,\n (point1.getSecond()+point2.getSecond())/2.0));\n }", "public VectorI getEntryOffset() {\n\t\treturn new VectorI(dimensionCenterX - parentCenterX, 0, dimensionCenterZ - parentCenterZ);\n\t}", "public Vect3d getCenter (){\r\n Vect3d v = new Vect3d();\r\n v.x = (min.x + max.x) / 2;\r\n v.y = (min.y + max.y) / 2;\r\n v.z = (min.z + max.z) / 2;\r\n return v;\r\n }", "public BoardCell getCenterCell() {\n\t\treturn null;\n\t}", "public Point getPointMiddle()\n {\n Point temp = new Point();\n temp.x = Math.round((float)(rettangoloX + larghezza/2));\n temp.y = Math.round((float)(rettangoloY + altezza/2)); \n return temp;\n }", "private void calculateCentre() {\n \t\t// The size of the centre is presently one 5th of the maze size\n \t\tcentreSize = size / 5;\n \t\t// System.out.println(\"centreSize is: \" + centreSize);\n \n \t\t// Min and max are the start points of the centre\n \t\tint min = (int) Math.ceil((centreSize * 2.0));\n \t\tint max = min + centreSize;\n \t\tmin++; // this adjusts for the border\n \t\tmax++;\n \t\t// System.out.println(\"min is: \" + min);\n \t\t// System.out.println(\"max is: \" + max);\n \n \t\t// centre is the centre point of the maze\n \t\tdouble centre = (centreSize / 2.0) + min;\n \t\t// System.out.println(\"centre is: \" + centre);\n \t\tcentrePoint = new Point2D.Double(centre, centre);\n \t\t\n \t\t//set the min and max points for the centre\n \t\tcentreMin = min;\n \t\tcentreMax = max;\n \t}", "public int getMid() {\r\n return mid;\r\n }", "private int getMiddlePositon()\n\t{\n\t\tint count = getChildCount();\n\t\tif (count!= 0)\n\t\t{\n\t\t\tint width = getWidth();\n\t\t\tint childNumber =0;\n\t\t\tView child = null;\n\t\t\t// take next child starting from left until one is reached whose right edge is over the middle\n\t\t\tdo\n\t\t\t{\n\t\t\t\tchild = getChildAt(childNumber);\n\t\t\t\tchildNumber++;\n\t\t\t}\n\t\t\twhile (childNumber < count && child.getRight()<width/2);\n\t\t\treturn getAdapterIndexNumber(mLeftViewIndex + childNumber);\n\t\t}\n\t\treturn 0;\n\t}", "public final Point getCenterPointOnScreen() {\n return bot.getManagers().getCalculations().tileToScreen(localRegionX, localRegionY,\n 0.5D, 0.5D, 0);\n }", "double[] circleCentre()\n\t{\n\t\tdouble toOriginLength = Math.sqrt(originX*originX + originY*originY);\n\t\tdouble toCentreLength = toOriginLength + radius;\n\t\t\n\t\tdouble[] centrePoint = new double[2];\n\t\t\n\t\tcentrePoint[0] = (toCentreLength * originX)/toOriginLength;\n\t\tcentrePoint[1] = (toCentreLength * originY)/toOriginLength;\n\t\t\n\t\treturn centrePoint;\n\t}", "public abstract Vector2 getCentreOfMass();", "public float getLeftRectF () { return atomSpriteBoundary.left; }", "double compute_lift_pos () {\n return AC_OFFSET_K * this.chord + \n (convert_moments_to_AC_offset ? -1*this.moment/this.lift : 0);\n }", "public Point2D.Double getImageCenter();", "public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}", "public Point topMiddle() {\n return this.topLeft.add(new Vector2D(getWidth() / 2, 0)).asPoint();\n }" ]
[ "0.7031531", "0.6742292", "0.66370624", "0.638051", "0.6360404", "0.6359498", "0.6359498", "0.63454795", "0.6345397", "0.62867963", "0.6268514", "0.6246428", "0.6209144", "0.61911476", "0.61696404", "0.6158889", "0.6124263", "0.6122486", "0.6118784", "0.6100891", "0.6098243", "0.60935956", "0.60818416", "0.60548604", "0.60522616", "0.60126275", "0.60048676", "0.6001904", "0.5995481", "0.59935516", "0.59877336", "0.59871125", "0.59864", "0.5985631", "0.5975932", "0.5973331", "0.59611195", "0.59526277", "0.5951707", "0.59454304", "0.5945298", "0.5945298", "0.5927113", "0.59002554", "0.5893444", "0.5883991", "0.58823055", "0.5878278", "0.58744544", "0.587144", "0.5868765", "0.5829608", "0.58237803", "0.5823345", "0.5818608", "0.5816023", "0.5807395", "0.5799397", "0.5771669", "0.5756838", "0.5755413", "0.57548267", "0.57507795", "0.57366043", "0.5732602", "0.572226", "0.570631", "0.56946665", "0.5688035", "0.56879854", "0.5674748", "0.56746143", "0.5671433", "0.56633055", "0.56466204", "0.5626736", "0.5619374", "0.56080055", "0.56031865", "0.5594559", "0.55917764", "0.5572908", "0.556999", "0.5564987", "0.55600554", "0.55538917", "0.5552412", "0.5541781", "0.5541232", "0.5531133", "0.55309725", "0.5529057", "0.5514546", "0.5502107", "0.54985046", "0.5494477", "0.5492993", "0.54909396", "0.547941", "0.54793006" ]
0.6664009
2
Returns a new position of dog
public Point getBasicMove(Point[] dogs, Point[] sheeps) { Point me = dogs[mId]; //If dog on the left side of fence, move dog towards the gap if(Calculator.getSide(dogs[mId].x) == SIDE.WHITE_GOAL_SIDE) { return Calculator.getMoveTowardPoint(me, getGapCoordinates()); } else { Point gap = getGapCoordinates(); ArrayList<Integer> undeliveredIndices = Calculator.undeliveredWhiteSheep(sheeps); int chosenSheepIndex = getClosestSheepToPoint(sheeps, gap, undeliveredIndices); Point targetSheep = sheeps[chosenSheepIndex]; targetSheep = anticipateSheepMovement(me, targetSheep); double angleGapToSheep = Calculator.getAngleOfTrajectory(gap, targetSheep); Point idealLocation = Calculator.getMoveInDirection(targetSheep, angleGapToSheep, DOG_SHEEP_MIN_DIST); Point moveLocation = Calculator.getMoveTowardPoint(me, idealLocation); makePointValid(moveLocation); return moveLocation; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Position getNewPosition();", "Position getOldPosition();", "Object getPosition();", "int getPosition();", "public int getPosition();", "public int getPos();", "public int getPos();", "public int PositionGet();", "public int getOriginalPos() {\n return originalPos;\n }", "Position getPosition();", "Position getPosition();", "public void change_dragon_pos(int i) {\n\t\tif (dragoes[i].isAlive()) {\n\t\t\tif (labirinto.getLab()[dragoes[i].getX_coord()][dragoes[i].getY_coord()] == 'E') {\n\t\t\t\tlabirinto.setLabCell(dragoes[i].getX_coord(), dragoes[i].getY_coord(), 'F');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (dragoes[i].getStatus() == 1)\n\t\t\t\t\tlabirinto.setLabCell(dragoes[i].getX_coord(), dragoes[i].getY_coord(), 'd');\n\t\t\t\telse\n\t\t\t\t\tlabirinto.setLabCell(dragoes[i].getX_coord(), dragoes[i].getY_coord(), 'D');\n\t\t\t}\n\t\t}\n\t\t/*else {\n\t\t\tif (labirinto.getLab()[dragoes[i].getX_coord()][dragoes[i].getY_coord()] == 'd' || \n\t\t\t\t\tlabirinto.getLab()[dragoes[i].getX_coord()][dragoes[i].getY_coord()] == 'D')\n\t\t\t\tlabirinto.setLabCell(dragoes[i].getX_coord(), dragoes[i].getY_coord(), ' ');\n\t\t}*/\n\t}", "private Vector2d generateNewPositionForChild()\n {\n\n Random generator = new Random();\n List<Vector2d> freePositions = new LinkedList<>(); //tutaj przechowywane sa wolne pozycje wokol\n Vector2d position;\n Directions directionToAdd;\n\n for(int i = 0; i<8; i++)\n {\n directionToAdd = new Directions(i); //wykorzystujemy klase directions do generowania pozycji wokol\n position = this.position.add(directionToAdd.move());\n if(map.animalsAt(position).isEmpty())\n {\n freePositions.add(position);\n }\n }\n\n if(freePositions.isEmpty()) //jezeli nie ma wolnych pozycji\n {\n //jesli nie ma wolnych pozycji\n int x = generator.nextInt(8);\n directionToAdd = new Directions(x);\n return this.position.add(directionToAdd.move());\n }\n\n //jezeli mamy wolne pozycje to generujemy dowolna z listy\n int x = generator.nextInt(freePositions.size());\n Vector2d newPosition = freePositions.get(x);\n\n return newPosition;\n }", "public void flap(){\n bird.setY(bird.getY() - 6);\n }", "public abstract int positionBonus();", "public Point move(Point[] dogs, // positions of dogs\n Point[] sheeps) { // positions of the sheeps\n Point current = dogs[id-1];\n\n // Move dogs toward gate\n if (current.x < 50) {\n return Functions.getMoveTowardPoint(current, GAP);\n // Move sheep towards center\n } else {\n if (calculateNewHull) {\n HashMap<Integer, Point> undeliveredSheep = Functions.undeliveredWhiteSheep(sheeps);\n convexHull = GrahamScan.getConvexHull(new ArrayList<Point>(undeliveredSheep.values()));\n calculateNewHull = false;\n }\n \n \n if (pushingSheep) {\n Point pointToMoveTo = Functions.getMoveTowardPoint(current, convexHull.get(vertexNumber));\n if (Functions.dist(current, pointToMoveTo) < 1) {\n vertexNumber++;\n if (vertexNumber > convexHull.size()) {\n vertexNumber = 0;\n calculateNewHull = true;\n }\n }\n return pointToMoveTo;\n }\n }\n\n return current;\n }", "public int getX() { return position.x; }", "public void frogReposition() {\n\t\tsetY(FrogPositionY);\n\t\tsetX(FrogPositionX);\t\t\n\t\t}", "public int getPos()\n {\n return pos;\n }", "@Override\n\tpublic int getPosition() {\n\t\treturn 0;\n\t}", "public abstract String getPos();", "public DoubleSolenoid.Value getPosition() {\n return m_ballholder.get();\n }", "public int getPosition(){\n return -1;\n }", "public long getPosition();", "Point getPosition();", "Point getPosition();", "public Integer getPosition();", "public Position position();", "@Override\n public int getPosition() {\n return position;\n }", "public int getPos()\n {\n return pos;\n }", "private Vector2 getNewBombPosition() {\n float xx=heroBody.getBody().getPosition().x*16, yy=heroBody.getBody().getPosition().y*16;\n if(heroBody.getCurrentState() == HeroBody.State.STAND_UP || heroBody.getCurrentState() == HeroBody.State.WALK_UP)\n yy+=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_DOWN || heroBody.getCurrentState() == HeroBody.State.WALK_DOWN)\n yy-=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_RIGHT || heroBody.getCurrentState() == HeroBody.State.WALK_RIGHT)\n xx+=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_LEFT || heroBody.getCurrentState() == HeroBody.State.WALK_LEFT)\n xx-=16;\n return new Vector2(xx,yy);\n }", "public void set(int spot, int age, String name) {\n\t\tif (spot < pups.length) {\r\n\t\t\tpups[spot] = new Dog(age, name);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No more space\");\r\n\t\t}\r\n\t}", "@Override\n public long getPosition() {\n return startPosition + super.getPosition();\n }", "public final int getPos() { return i; }", "Tile getPosition();", "public Position getPosition();", "public Position getPosition();", "public Position getPosition();", "Position createPosition();", "public int getX(){ return xPosition; }", "public void increasePosition(float dx, float dy, float dz);", "public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}", "public Point.Double getPosition(){\r\n return new Point.Double(x, y);\r\n }", "public int position() {\n return pos;\n }", "public abstract Position getPosition();", "Vector getPos();", "public Point getPosition();", "public Position randposition()\r\n\t{\n\t\tRandom random = new Random();\r\n\t\tPosition position = new Position(random.nextInt(7680), random.nextInt(4320), random.nextDouble());\r\n\t\treturn position;\r\n\t}", "@Override\n\tpublic int getPos() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int moveAnimal() {\n\t\treturn 0;\n\t}", "public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}", "int getTargetPos();", "public Vector2D getPosition ();", "@Override\n public Position getPosition() {\n return new Position(this.x, this.y);\n }", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "void locate(int pos, int [] ind)\n\t{\n\t\tind[0] = (int) pos / dimy; // x\n\t\tind[1] = pos % dimy; // y\t\n\t}", "public Point getPosition(){\r\n return new Point(this.position);\r\n }", "public void calcNewPos() {\n if (!this.isDying) {\n //super.calcNewPos();\n //this.velY+=gravity;\n this.velY = 5;\n newX = posX + velX;\n newY = posY + velY;\n this.animState = monster.getNext(action, direction);\n\n collBottom = false;\n collLeftRight = false;\n } else {\n // We're dying, let's fall through the ground..\n this.newY += this.velY;\n if (deadCycleCount < 2) {\n this.animState = monster.getNext(action, direction);\n }\n }\n }", "Position_Position createPosition_Position();", "public int getPosition()\r\n {\r\n return position;\r\n }", "public abstract Vec2 doorPosition();", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "String getPosY();", "abstract public char drawGadget(Vect position);", "godot.wire.Wire.Vector2 getPosition();", "double getPositionX();", "double getPositionX();", "double getPositionX();", "@Override\n\tpublic D3int getPos() {\n\t\treturn myPos;\n\t}", "public Vector2 getPosition();", "RealLocalizable getPosition();", "public int getXPos();", "public abstract int getStartPosition();", "public void setPosition(Point newPosition);", "@Override\n public PosDeg getPosition() {\n return tracker.getPosition();\n }", "String getPosX();", "public void place(Object animal, Position position) {\n field[position.getRow()][position.getColumn()] = animal;\n }", "Vector2 getPosition();", "public abstract int ranXPos();", "godot.wire.Wire.Vector3 getPosition();", "public Coordinate getPosition();", "public Position gibPosition()\n {\n return position;\n }", "@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}", "int getStartPosition();", "int getStartPosition();", "void copyOffsetPosition (DVector3 pos);", "public int getPosition() {\r\n return position;\r\n }", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "public void move() {\n\t\tsetHealth(getHealth() - 1);\n\t\t//status();\n\t\tint row = getPosition().getRow() ;\n\t\tint column = getPosition().getColumn();\n\t\tint randomInt = (int)((Math.random()*2) - 1);\n\t\t\n\t\tif(hunter == false && row < 33) {\n\t\t\tif(row == 32) {\n\t\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(row == 0) {\n\t\t\t\tgetPosition().setCoordinates(row + 1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 99) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column - 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 0) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column + 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t}\n\t\tif(hunter == false && row > 32) {\n\t\t\t//setHealth(100);\n\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\tsetPosition(getPosition()) ;\n\t\t}\n\t\telse {\n\t\t\tif(row < 65 && hunter == true) {\n\t\t\t\tgetPosition().setCoordinates(row + 1, column);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetPosition().setCoordinates(65, column);\n\t\t\t\tsetPosition(getPosition());\n\t\t\t\t//Check if there is a gazelle\n\t\t\t\tPair [][] range = {{Drawer.pairs[row+1][column-1],Drawer.pairs[row+1][column],\n\t\t\t\t\t\t\t Drawer.pairs[row+1][column+1]}, {\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column-1],\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column],Drawer.pairs[row+2][column+1]}};\n\t\t\t\t\n\t\t\t\tfor(Pair [] line: range) {\n\t\t\t\t\tfor(Pair prey: line) {\n\t\t\t\t\t\tif(prey.getAnimal() instanceof Gazelle ) {\n\t\t\t\t\t\t\tattack();\n\t\t\t\t\t\t\tprey.getAnimal().die();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int getPosition()\n\t{\n\t\treturn position;\n\t}", "public Position getRobotPadPosition();", "PositionEffect getPositionEffect();", "public PVector getPosition() { return position; }", "public double getNewXPosition() {\n return newPosX;\n }", "Builder addPosition(Text value);", "public void originalSpace() {\n\t\tpos.x = 65;\n\t\tpos.y = p.height/2 + 100;\n\t\t\n\t}", "double getXPosition();", "public void addPos(String word, IPosition pos);", "@Override\n public Point getAdvancedMove(Point[] dogs, Point[] whiteSheep,\n Point[] blackSheep) {\n return null;\n }" ]
[ "0.65832514", "0.6445841", "0.6351317", "0.6346009", "0.631291", "0.6275398", "0.6275398", "0.60566306", "0.59845483", "0.5977065", "0.5977065", "0.5965455", "0.59374785", "0.5929411", "0.5899614", "0.58833945", "0.58725053", "0.5846176", "0.5823589", "0.58163565", "0.580526", "0.5799915", "0.5797675", "0.5797345", "0.57844007", "0.57844007", "0.57726717", "0.57688975", "0.5736141", "0.5729649", "0.5728167", "0.57159084", "0.57118076", "0.57093745", "0.56841147", "0.5669695", "0.5669695", "0.5669695", "0.56669885", "0.5665858", "0.56545645", "0.56204164", "0.56197095", "0.5618712", "0.5614949", "0.5603612", "0.560001", "0.5591828", "0.55831623", "0.55728054", "0.5572176", "0.55696034", "0.55625695", "0.5552057", "0.55518913", "0.55518913", "0.5538438", "0.55378777", "0.55356157", "0.5535366", "0.55349714", "0.5523635", "0.5522809", "0.5512617", "0.54977393", "0.54949015", "0.549193", "0.549193", "0.549193", "0.5490616", "0.5489187", "0.54821235", "0.54817295", "0.5479926", "0.5474304", "0.5465873", "0.5464944", "0.546026", "0.54565346", "0.54561335", "0.54537636", "0.5452707", "0.5450331", "0.54361665", "0.54256463", "0.54256463", "0.5423733", "0.54183406", "0.5414751", "0.5413013", "0.5412487", "0.5411366", "0.5401847", "0.5398392", "0.5390296", "0.5386859", "0.5383268", "0.53831726", "0.53815776", "0.53749156" ]
0.5397589
94
Do nothing, this brain is only for a basic player
@Override public Point getAdvancedMove(Point[] dogs, Point[] whiteSheep, Point[] blackSheep) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playerWon()\r\n {\r\n \r\n }", "public void playerLost()\r\n {\r\n \r\n }", "@Override\n public void landedOn(Player player) {}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "@Override\n\tpublic void play() {\n\t\t\n\t}", "public void play(){\n\t\t\n\t}", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "@Override\n\tpublic void play() {\n\n\t}", "@Override\r\n public void playGame() {\r\n printInvalidCommandMessage();\r\n }", "public void play() {\n\t\t\r\n\t}", "void skipNextPlayer() {\n endTurn();\n }", "@Override\r\n\tpublic Bet whatToPlay() {\n\t\treturn null;\r\n\t}", "public void initPlayer();", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"We played Snokker today\");\n\t\t\n\t\t\n\t}", "private void humanTurn() \n {\n \n playTurn();\n }", "@Override\n public void beHelpful() {\n this.playPiano();\n this.takeABow();\n }", "@Override\n\tpublic void onRun(PlatformPlayer player) {\n\t\t\n\t}", "public static play() {\n\t\t\n\t}", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "void initializePlayer();", "public void playTurn() {\r\n\r\n }", "public void Play();", "@Override\n\tpublic void attiva(Player player) {\n\n\t}", "public void playSnare() {\n\t\tSystem.out.println(\"bang bang ba-bang\");\n\t\t\n\t}", "public void use(Player player) {\n\n\t}", "public Player(){\n reset();\n }", "public static void handleMagicImbue(Player player) {\n\t\t\n\t}", "@Override\n public void run() {\n if (plugin.getGm().getPlayersInGame().size() < plugin.getAm().getMinPlayers()) {\n plugin.getGm().setCheckStart(true);\n plugin.getServer().getOnlinePlayers().forEach(pl -> pl.setLevel(0));\n GameState.state = GameState.LOBBY;\n cancel();\n return;\n }\n \n plugin.getGm().getPlayersInGame().stream().forEach(players -> {\n plugin.getMsg().sendActionBar(players, \"&a&lEl juego empieza en: \" + count);\n });\n\n switch (count){\n case 30:\n plugin.getMsg().sendBroadcast(\"&7El juego empezará en &c30 &7segundos\");\n break;\n case 5:\n GameState.state = GameState.GAME;\n plugin.getGm().getPlayersInGame().forEach(p -> {\n plugin.getAm().teleport(p);\n TntWars.getPlayer(p).setCleanPlayer(GameMode.SURVIVAL);\n });\n break;\n case 4:\n case 3:\n case 2:\n case 1:\n plugin.getMsg().sendBroadcast(\"&7El juego empezará en &c\" + count + \" &7segundos\");\n plugin.getGm().getPlayersInGame().forEach(p -> p.playSound(p.getLocation(), Sound.NOTE_PLING, 1F, 1F));\n break;\n case 0:\n plugin.getGm().setDañoEnCaida(false);\n\n //Iniciar hilo de la fase de esconder (Ja, still nope)\n new GameTask(plugin).runTaskTimer(plugin, 20, 20);\n cancel();\n break;\n }\n --count; \n }", "public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "private void playAI (int actualAI) {\n }", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "void makePlay(int player) {\n }", "public void welcomePlayer(Player p);", "@Override\n public final boolean canStand(Playery player) {\n return true;\n }", "public boolean needPlayer() {\n\t\treturn false;\n\t}", "@Override\n \tpublic boolean imprisonPlayer(String playerName) {\n \t\treturn false;\n \t}", "@Override\r\n\t\t\tpublic void playGame() {\n\t\t\t\tSystem.out.println(\"隐式调用接口\");\r\n\t\t\t}", "private void notWorthy(final Player player) {\n\t\tplayer.getInterfaceManager().closeChatBoxInterface();\n\t\tplayer.lock(15);\n\t\tplayer.setNextFaceWorldTile(new WorldTile(3084, 3483, 0));\n\t\tWorldTasksManager.schedule(new WorldTask() {\n\t\t\tint phase = 0;\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinal int[] randomNPC = { 6935, 3283, 4344, 6966 };\n\t\t\t\tswitch (phase) {\n\t\t\t\tcase 0:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(857));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(915));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(857));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tplayer.setNextGraphics(new Graphics(86));\n\t\t\t\t\tplayer.getGlobalPlayerUpdater().transformIntoNPC(randomNPC[Utils.random(randomNPC.length - 1)]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tplayer.setNextForceTalk(new ForceTalk(\".... what in Helwyr is going on..!?\"));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tplayer.setNextGraphics(new Graphics(86));\n\t\t\t\t\tplayer.getGlobalPlayerUpdater().transformIntoNPC(-1);\n\t\t\t\t\tplayer.setNextAnimation(new Animation(10070));\n\t\t\t\t\t//player.setNextForceMovement(new ForceMovement(new WorldTile(3084, 3485, 0), 0, 2));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t//player.setNextWorldTile(new WorldTile(3084, 3485, 0)); TODO find out why force movement doesn't work <.>\n\t\t\t\t\tNPC guard = World.findNPC(5941);\n\t\t\t\t\tsendNPCDialogue(4405, GOOFY_LAUGH, \"Looks like Dahmaroc had a sense of humour!\");\n\t\t \t // player.faceEntity(guard);\n\t\t \t // guard.faceEntity(player);\n\t\t\t\t\tplayer.unlock();\n\t\t\t\t\tstage = 99;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tphase++;\n\t\t\t}\n\t\t}, 0, 2);\n\t}", "void play();", "public void play() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "public abstract void use(Player player) throws GameException;", "@Override\r\npublic void Play() {\n\t\r\n}", "public abstract void attackPlayer(Player p);", "public abstract void isUsedBy(Player player);", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "private Boolean infect( Player player ){\n try {\n player.setHealth( false );\n return true;\n } catch (Exception e) {\n System.out.println(\"Something went wrong.\");\n return false;\n }\n }", "public static void main(String[] args) \r\n {\n new improvedPlayerOne();\r\n }", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "private void BlueEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n BluePlayer player_to_eat = (BluePlayer) player;\n player_to_be_eaten = checkIfEatsRedPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsGreenPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsYellowPlayer(player_to_eat);\n }\n }\n //player_to_be_eaten.println(\"blue_player_to_be_eaten\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "public abstract void execute(Player p);", "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 deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "public abstract boolean isPlayer();", "public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }", "public static void handleDream(Player player) {\n\t\t\n\t}", "protected abstract void internalPlay();", "void play ();", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public abstract void play();", "public abstract void play();", "void playerPassedStart(Player player);", "@Override\r\n public void play()\r\n {\n\r\n }", "public PlayerImplementation(String name) {\n super(name);\n p1 = this; // hack for easy access to player\n\n // TODO find a better place to put these\n this.getDispatcher().getRole().addBehaviorTemplate(FrankKillsVictim.makeLatent());\n\n // prevent player from making toasts or random approaches\n removeBehavior(GroupChat.class);\n removeBehavior(ApproachBehavior.class);\n removeBehavior(RandomizedMoveTo.class);\n removeBehavior(UseRandomAnnotatedItem.class);\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\t\t\r\n\t}", "private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "void playerTurn(Player actualPlayer) {\n aiPlayer.chooseAction(actualPlayer);\n actualPlayer.setTheirTurn(false);\n }", "public void playerTurnStart() {\n\r\n\t}", "public void cantPlayGoNext() {\n\t switchTurn();\n }", "public void OnPlayer(Joueur joueur);", "@Override\n\tpublic void nowPlaying() {\n\t}", "private void pause() { player.pause();}", "public Player() {\t\n\t}", "abstract void koPlayerAttack(final Player attacker);", "static void drop(Player player, String what) {\n if (player.drop(what)) {\n System.out.println(\"You dropped \" + what);\n }\n else {\n System.out.println(\"You aren't carrying \" + what);\n }\n }", "public RockOnlyComputer() {\n playerResult = null;\n setPlayerName(\"Rock Man\");\n numWins = 0;\n numLosses = 0;\n }", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "void play(boolean fromUser);", "private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}", "public void play() {\n if (!isHungry()) {\n hunger += 2;\n mood += 2;\n fatigue += 3;\n\n if (!muted) {\n System.out.println(\"play\\t|\\tPlaying is fun!\");\n }\n }\n }", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\r\n\t}", "Player getDormantPlayer();", "void win(Player player);", "public abstract void fire(Player holder);", "Player currentPlayer();", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "public void preGame() {\n\n\t}", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "public void moveEveryoneExcept(Player player) throws IOException, InterruptedException { }", "private void warSeed(Player player) {\n\t\t\n\t}", "private void manualCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new HumanPlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }", "private void YellowEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n YellowPlayer player_to_eat = (YellowPlayer) player;\n player_to_be_eaten = checkIfEatsGreenPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsBluePlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsRedPlayer(player_to_eat);\n }\n }\n //println(\"yellow_player_to_be_eaten=\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "public void play() {\r\n\t\tSystem.out.println(\"Playing Cricket with ball and bat\");\r\n\t}", "public abstract void activatedBy(Player player);", "@Override\n public void play() {\n quest();\n if ((int) (Math.random() * 10) % 2 == 0) {\n won = true;\n System.out.println(\"You beat the last quest!\");\n } else {\n System.out.println(\"There are many more adventures for you, young warrior\");\n }\n }", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}" ]
[ "0.719997", "0.6970534", "0.69540924", "0.69111913", "0.68908006", "0.6844081", "0.68082714", "0.6788702", "0.67699915", "0.6760969", "0.67106014", "0.6708876", "0.664945", "0.663499", "0.6632335", "0.66314703", "0.6595324", "0.6591967", "0.65911335", "0.65849954", "0.65826464", "0.65824795", "0.6569007", "0.65671796", "0.6559888", "0.65511954", "0.65387666", "0.6537066", "0.6535193", "0.6531151", "0.65275913", "0.6524291", "0.6519868", "0.6518343", "0.6508686", "0.6505134", "0.6485125", "0.6470176", "0.6469704", "0.646706", "0.6453604", "0.6446735", "0.64464766", "0.644388", "0.6438727", "0.64320415", "0.6426582", "0.64250124", "0.6418987", "0.64072967", "0.64035505", "0.64030504", "0.640157", "0.63977724", "0.6396295", "0.6395262", "0.6388542", "0.6383103", "0.63738257", "0.6372892", "0.635983", "0.63568574", "0.63568574", "0.6353724", "0.6342231", "0.6340721", "0.6339893", "0.63366365", "0.63366365", "0.63365734", "0.6336202", "0.63310575", "0.63303113", "0.6329339", "0.63290423", "0.6325314", "0.6324455", "0.63223636", "0.63179195", "0.63174164", "0.6309962", "0.63088715", "0.63082576", "0.6307291", "0.6305983", "0.63051707", "0.62971723", "0.6295339", "0.6292237", "0.62857646", "0.62831134", "0.6281381", "0.6279119", "0.6273035", "0.6268156", "0.6265928", "0.6257262", "0.6256762", "0.62551224", "0.62548345", "0.6251791" ]
0.0
-1
Fragment fragment = getFragmentManager().findFragmentById(R.id.fragmentlayout); FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.detach(fragment); ft.attach(fragment); ft.commit();
@Override public void onRequestFinished(Request<Object> request) { Intent i = new Intent(CabSharing.this, CabSharing.class); finish(); overridePendingTransition(0, 0); startActivity(i); overridePendingTransition(0, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getFragment(Fragment fragment) {\n // create a FragmentManager\n FragmentManager fm = getFragmentManager();\n // create a FragmentTransaction to begin the transaction and replace the Fragment\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n // replace the FrameLayout with new Fragment\n fragmentTransaction.replace(R.id.fragment_layout, fragment);\n // save the changes\n fragmentTransaction.commit();\n }", "private void updateFragment() {\n Fragment fragment = getSupportFragmentManager().findFragmentByTag(CURRENT_FRAGMENT);\n if (fragment != null) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n ft.detach(fragment).attach(fragment).commit();\n }\n }", "public void onUPP()\r\n {\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .show(frag)\r\n .commit();\r\n\r\n }", "private void loadFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(com.limkee1.R.id.flContent, fragment);\n fragmentTransaction.commit();\n\n }", "@Override\n public void onClick(View v) {\n fragment = fragmentManager.findFragmentByTag(\"frag1\"); // you gonna find a fragment by a tag ..u defined that in acitivty when you called that fragment\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if (fragment != null) {\n fragmentTransaction.remove(fragment); // remove Transaction\n }\n\n // now calling and adding another fragment after remove its parent fragment (where you are calling fragmetn from) fragment to fragment call\n fragment = new Fragment2();\n fragmentTransaction.add(R.id.base_layout, fragment, \"frag2\"); //giving tag to fragment\n fragmentTransaction.commit();\n }", "private void loadFragment(Fragment fragment, String tag) {\n\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ft.replace(R.id.frame_tut, fragment, tag);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);\n ft.commit();\n }", "private void fragmentChange(){\n HCFragment newFragment = new HCFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.hc_layout, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "private void loadFragment(String name) {\n FragmentTransaction fragmentTransaction = MainActivity.fm.beginTransaction();\n // replace the FrameLayout with the new Fragment\n fragmentTransaction.replace(R.id.mainFrameLayout, MainActivity.currentFragment);\n fragmentTransaction.addToBackStack(name);\n fragmentTransaction.commit();\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.main_frame, fragment);\n// fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "private void loadFragment(Fragment fragment)\n {\n if(fragment != null)\n {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.frameLayout, fragment);\n fragmentTransaction.addToBackStack(\"fragment\");\n fragmentTransaction.commit();\n }\n }", "public void run() {\n assert getFragmentManager() != null;\n Fragment currentFragment = getActivity().getSupportFragmentManager().findFragmentById(R.id.content_main);\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n if (Build.VERSION.SDK_INT >= 26) {\n ft.setReorderingAllowed(false);\n }\n ft.detach(currentFragment).attach(currentFragment).commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_activity_summary, container, false);\n\n // Transaction party\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction ft = fragmentManager.beginTransaction();\n\n if(fragmentManager.findFragmentById(R.id.frame1)!=null) {\n ft.remove(fragmentManager.findFragmentById(R.id.frame1));\n }\n Fragment fragment = new SummaryFragment();\n ft.replace(R.id.frame1, fragment).commit();\n return v;\n }", "@Override\r\n \tpublic void onDetach() {\r\n \t super.onDetach();\r\n \t try {\r\n \t Field childFragmentManager = Fragment.class.getDeclaredField(\"mChildFragmentManager\");\r\n \t childFragmentManager.setAccessible(true);\r\n \t childFragmentManager.set(this, null);\r\n\r\n \t } catch (NoSuchFieldException e) {\r\n \t throw new RuntimeException(e);\r\n \t } catch (IllegalAccessException e) {\r\n \t throw new RuntimeException(e);\r\n \t }\r\n\r\n \t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_work_history, container, false);\n addwork=view.findViewById(R.id.btnaddwork);\n nextdu=view.findViewById(R.id.nextedu);\n l12=view.findViewById(R.id.workexper2);\n nextdu.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n\n\n\n\n\n Fragment someFragment = new EducationFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragment_container, someFragment ); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n }\n });\n addwork.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addwork.setVisibility(View.INVISIBLE);\n l12.setVisibility(View.VISIBLE);\n }\n });\n return view;\n }", "public void loadFragment(Fragment fragment) { Animation connectingAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.slide_up);\n//\n FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();\n transaction.replace(R.id.nowShowingFrame, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame, fragment);\n fragmentTransaction.commit();\n\n }", "private void loadFragment(Fragment fragment) {\n // load fragment\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n transaction.replace(R.id.frame_container, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.activity_list,container);\n Button button = (Button) rootView.findViewById(R.id.fragment_button);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n android.app.FragmentManager fragmentManager = getActivity().getFragmentManager();\n android.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n Bundle bundle = new Bundle();\n bundle.putString(\"main\", null);\n fragmentTransaction.replace(R.id.fragment_container_framelayout, null);\n fragmentTransaction.addToBackStack(\"next\");\n fragmentTransaction.commit();\n }\n });\n return rootView;\n }", "@Override\n public void onDestroyView() {\n super.onDestroyView();\n\n/* try {\n Fragment fragment = (getFragmentManager()\n .findFragmentById(R.id.mandiMap));\n if(fragment!=null) {\n FragmentTransaction ft = getActivity().getSupportFragmentManager()\n .beginTransaction();\n ft.remove(fragment);\n ft.commit();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }*/\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashbord_, container, false);\n Button button = view.findViewById(R.id.next);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Fragment fragment = new RightDownFlow_Fragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.mainlayout, fragment ); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n\n }\n });\n return view;\n }", "@Override\n public void onClick(View view) {\n\n Fragment fragment1 = getSupportFragmentManager().findFragmentByTag(fragment1Tag);\n if(fragment1 == null) {\n fragment1 = new IngrediantFragment();\n getSupportFragmentManager().beginTransaction()\n .add(R.id.fram1, fragment1,fragment1Tag)\n .commit();\n }\n else\n Toast.makeText(getApplicationContext(),\"fragment = null\",Toast.LENGTH_LONG).show();\n }", "@Override\r\n public void setFragment(FragmentManager fragmentManager) {\n\r\n }", "private void loadFragment(String fragmentTag)\n {\n\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ft.setCustomAnimations(android.R.anim.slide_in_left, android.R.anim.slide_out_right);\n\n Fragment taggedFragment = (Fragment) fm.findFragmentByTag(fragmentTag);\n if (taggedFragment == null)\n {\n\n if (fragmentTag == LondonFragment.TAG)\n {\n taggedFragment = new LondonFragment();\n }\n\n if (fragmentTag == ParisFragment.TAG)\n {\n taggedFragment = new ParisFragment();\n }\n\n if (fragmentTag == CopenhagenFragment.TAG)\n {\n taggedFragment = new CopenhagenFragment();\n }\n\n if (fragmentTag == DualFragment.TAG)\n {\n taggedFragment = new DualFragment();\n }\n\n }\n ft.replace(R.id.container, taggedFragment, fragmentTag);\n ft.commit();\n\n //Ezt fontos hívni\n getSupportFragmentManager().executePendingTransactions();\n\n Fragment frag2 = (Fragment) fm.findFragmentByTag(fragmentTag);\n frag2.getActivity();\n\n\n\n\n\n drawerLayout.closeDrawer(Gravity.LEFT);\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame_layout, fragment);\n fragmentTransaction.commit();\n\n }", "public void switchToAddFragment() {\n FragmentManager manager = getSupportFragmentManager();\n manager.beginTransaction().replace(R.id.fragment_container, new AddActivity()).commit();\n }", "private void setFragment(Fragment fragment, String tag){\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n //fragmentTransaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n //fragmentTransaction.add(R.id.content, fragment, tag);\n fragmentTransaction.replace(R.id.content, fragment);\n fragmentTransaction.commit();\n }", "private void fillUpFragment() {\n try {\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n sensorFragment = getSensorFragment();\n transaction.replace(R.id.sensor_frame, sensorFragment, getSensorName());\n transaction.commit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void replaceFragment(Fragment fragment, String TAG) {\n\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.popBackStack(TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n FragmentTransaction fragmentTransaction = fragmentManager .beginTransaction();\n fragmentTransaction .replace(R.id.content_restaurant_main_cl_fragment, fragment);\n fragmentTransaction .addToBackStack(TAG);\n fragmentTransaction .commit();\n//\n// getSupportFragmentManager()\n// .beginTransaction()\n// .disallowAddToBackStack()\n//// .setCustomAnimations(R.anim.slide_left, R.anim.slide_right)\n// .replace(R.id.content_restaurant_main_cl_fragment, fragment, TAG)\n// .commit();\n }", "public void openFragment(Fragment fragment) {\n\n transaction = getSupportFragmentManager().beginTransaction();\n\n transaction.addToBackStack(null);\n transaction.replace(R.id.container, fragment);\n transaction.commit();\n\n\n }", "private void setViewFragment(Fragment fragment) {\n currentFragment = fragment;\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.replace(R.id.container, fragment);\n transaction.commit();\n }", "private void placeNewFragment(Fragment f) {\r\n\t\tFragmentManager manager = getSupportFragmentManager();\r\n FragmentTransaction fragmentTransaction = manager.beginTransaction();\r\n fragmentTransaction.replace(R.id.fragmentHolder, f);\r\n fragmentTransaction.addToBackStack(null);\r\n fragmentTransaction.commit();\r\n\t}", "private void setFragment(Fragment fragments) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.framelayout,fragments);\n fragmentTransaction.commit();\n }", "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "public void goToPortfolioFragment(){\n Fragment fragment = new PortfolioFragment();\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction transaction = fm.beginTransaction();\n transaction.replace(R.id.contentFragment, fragment);\n transaction.commit();\n }", "private void replaceFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n android.support.v4.app.FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.addToBackStack(null);\n if (fragment == listFragment) {\n transaction.replace(R.id.fragment_content, fragment, LIST_FRAGMENT_TAG);\n } else if (fragment == supportMapFragment) {\n transaction.replace(R.id.fragment_content, fragment, SUPPORT_FRAGMENT_TAG);\n }\n transaction.commit();\n }", "@Override\n public void onFragmentAttached() {\n }", "@Override\n public void onClick(View v) {\n CompteEnsg nextFrag = new CompteEnsg();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "public void createFragment() {\n\n }", "private void setFragment(Fragment fragment) {\n Log.d(\"setFragments\", \"setFragments: start\");\n fragmentTransaction = getSupportFragmentManager().beginTransaction();\n Log.d(\"setFragments\", \"setFragments: begin\");\n Fragment hideFragment = getLast();\n fragmentTransaction.hide(hideFragment);\n fragmentTransaction.show(fragment);\n if (userHomeFragment.equals(fragment)) {\n lastFragment = \"userHomeFragment\";\n } else if (scheduleFragment.equals(fragment)) {\n lastFragment = \"scheduleFragment\";\n } else if (medicineFragment.equals(fragment)) {\n lastFragment = \"medicineFragment\";\n } else {\n lastFragment = \"calendarFragment\";\n }\n fragmentTransaction.commit();\n }", "private void setupFragments() {\n FragmentManager fm = getSupportFragmentManager();\n sb_frag = (StatusBar)fm.findFragmentById(R.id.statusmarket);\n\n if(sb_frag == null)\n {\n sb_frag = new StatusBar();\n fm.beginTransaction().add(R.id.statusmarket, sb_frag).commit();\n }\n sb_frag.setupInitial(currentPlayer);\n\n ai_frag = (AreaInfo) fm.findFragmentById(R.id.overviewlayout);\n\n //try find the fragment, if it doesnt exist then create it\n if (ai_frag == null) {\n //create the fragment if not exist\n ai_frag = new AreaInfo();\n fm.beginTransaction().add(R.id.overviewlayout, ai_frag).commit();\n }\n\n ai_frag.setCurrentArea(null);\n\n\n\n\n }", "@Override\n // The onCreateView is where you will create the fragment and all the listeners in the fragment\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n View view = inflater.inflate(R.layout.fragment_tutorial, container, false); //create the view of the fragment\n // the next lines are finding the elements that are inside the fragment to then set the listeners and things\n ((MainActivity)getActivity()).setAddToBackStack(true);\n\n return view; // This returns the view(Fragment) with all the initializers\n }", "@Override\n public View onCreateView(LayoutInflater inflater, final ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.registrado, container, false);\n\n // aButton = (Button)rootView.findViewById(R.id.button_registrado);\n\n ((Button) rootView.findViewById(R.id.button_registrado)).setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n //Log.d(\"ENTRO\", \"ENTRAAAAAA***************************************************888888888\");\n FragmentManager manager=getActivity().getSupportFragmentManager();\n FragmentTransaction ft = manager.beginTransaction();\n PerfilFragment perfil= new PerfilFragment();\n //Eventos perfil= new Eventos();\n Fragment newFragment = perfil;\n Fragment actual= visualiza();\n actual.onDestroy();\n ft.remove(actual);\n ft.replace(container.getId(),newFragment);\n //container is the ViewGroup of current fragment\n ft.addToBackStack(null);\n ft.commit();\n }\n });\n\n return rootView;\n }", "@Override\n public void onClick(View view) {\n Fragment newCase=new TripNoteAddFragment();\n FragmentTransaction transaction=getFragmentManager().beginTransaction();\n transaction.replace(R.id.content_frames,newCase); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n }", "private void displaySelectedFragment(Fragment fragment) {\n// if (fragmentName == null || !fragment.getClass().getSimpleName().equals(fragmentName)) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame_container, fragment);\n fragmentTransaction.commit();\n fragmentName = fragment.getClass().getSimpleName();\n// }\n }", "private void refreshFragmentAfterdownloadedData() {\n Fragment fragmentToday = new FragmentToday();\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n ft.replace(R.id.fragmentToday, fragmentToday, \"FragmentToday\");\n ft.commit();\n\n Fragment fragment5days = new Fragment5days();\n FragmentTransaction ft5days = getSupportFragmentManager().beginTransaction();\n ft5days.replace(R.id.fragment5days, fragment5days, \"Fragment5days\");\n ft5days.commit();\n }", "private void switchToFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(binding.frame.getId(), fragment);\n fragmentTransaction.commit();\n }", "private void changeFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.flContainer, fragment);\n fragmentTransaction.commit();\n closeDrawer();\n }", "@Override\n public void onSClicked() {\n Log.d(TAG, \"onSClicked: starts\");\n\n //calling Fragment Manager\n FragmentManager fManager = getSupportFragmentManager();\n //finding Fragment which needs to be removed using its Container ID\n Fragment fragment = fManager.findFragmentById(R.id.task_detail_container);\n //checking if there is that present or not\n if(fragment!=null){\n //if fragment present remove it\n /*FragmentTransaction fTransaction = fManager.beginTransaction();\n fTransaction.remove(fragment);\n fTransaction.commit();*/\n\n //short for above code\n getSupportFragmentManager().beginTransaction().remove(fragment).commit();\n }\n\n }", "public void replaceFragment(Fragment fragment, String tag) {\n for (int i = 0; i < fragmentManager.getBackStackEntryCount(); ++i) {\n fragmentManager.popBackStackImmediate();\n }\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, fragment);\n fragmentTransaction.commit();\n fragmentTransaction.addToBackStack(tag);\n\n }", "private void showHome(){\n fragment = new HomeFragment();\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.mainLayout, fragment, fragment.getTag()).commit();\n }", "@Override\n public void onResume(){\n fm = getFragmentManager();\n super.onResume();\n }", "public void initFragments() {\n Log.d(\"initFragments\", \"initFragments: start\");\n if (!focus) {\n Log.d(\"initFragments\", \"initFragments: not focused\");\n return;\n }\n\n if (calendarFragment != null)\n getSupportFragmentManager().beginTransaction().remove(calendarFragment).commit();\n if (scheduleFragment != null)\n getSupportFragmentManager().beginTransaction().remove(scheduleFragment).commit();\n if (userHomeFragment != null)\n getSupportFragmentManager().beginTransaction().remove(userHomeFragment).commit();\n if (medicineFragment != null)\n getSupportFragmentManager().beginTransaction().remove(medicineFragment).commit();\n\n Log.d(\"initFragments\", \"initFragments: new\");\n calendarFragment = new CalendarFragment();\n scheduleFragment = new CheckupFragment();\n userHomeFragment = new UserHomeFragment();\n medicineFragment = new MedicationFragment();\n\n fragmentTransaction = getSupportFragmentManager().beginTransaction();\n Log.d(\"initFragments\", \"initFragments: begin transaction\");\n fragmentTransaction.add(R.id.navigationFrame, calendarFragment);\n fragmentTransaction.hide(calendarFragment);\n fragmentTransaction.add(R.id.navigationFrame, scheduleFragment);\n fragmentTransaction.hide(scheduleFragment);\n fragmentTransaction.add(R.id.navigationFrame, userHomeFragment);\n fragmentTransaction.hide(userHomeFragment);\n fragmentTransaction.add(R.id.navigationFrame, medicineFragment);\n fragmentTransaction.hide(medicineFragment);\n fragmentTransaction.commit();\n\n if (lastFragment == null) {\n Log.d(\"initFragments\", \"initFragments: null last fragment\");\n lastFragment = \"calendarFragment\";\n setFragment(calendarFragment);\n }\n else {\n Log.d(\"initFragments\", \"initFragments: set last fragment\");\n setLastFragment();\n }\n }", "protected void pushFragment(Fragment fragment){\n\n if(fragment == null)\n return;\n\n android.app.FragmentManager fragmentManager = getFragmentManager();\n\n if(fragmentManager != null){\n android.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if(fragmentTransaction != null){\n //vacio hace referencia al id de la pantalla de bienvenida\n //fragmentTransaction.replace(R.id.vacio, fragment);\n //fragmentTransaction.commit();\n fragmentManager.beginTransaction().replace(R.id.vacio, fragment).addToBackStack(null).commit();\n }\n }\n\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main_requisition, container, false);\r\n\r\n saveDrafts=view.findViewById(R.id.tvSaveDrafts);\r\n saveDrafts.setPaintFlags(saveDrafts.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);\r\n attachmentIcon = view.findViewById(R.id.ivAttachmentIcon);\r\n attachmentIcon.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n AttachmentFragment attachmentFragment = new AttachmentFragment();\r\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\r\n transaction.replace(R.id.mainlayout, attachmentFragment);\r\n transaction.addToBackStack(null);\r\n transaction.commit();\r\n }\r\n });\r\n return view;\r\n }", "private void loadFragment(Fragment fragment, String tag, int containerId) {\r\n\r\n fragmentManager = getSupportFragmentManager();\r\n\r\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\r\n\r\n // delete previous instant message fragment if exist, before adding new\r\n // one\r\n Fragment previousInstanceOfTheFragment = fragmentManager\r\n .findFragmentByTag(tag);\r\n\r\n if (previousInstanceOfTheFragment != null) {\r\n fragmentTransaction.remove(previousInstanceOfTheFragment);\r\n }\r\n\r\n fragmentTransaction.add(containerId, fragment, tag);\r\n fragmentTransaction.commit();\r\n }", "@Override\n public void onClick(View v) {\n android.app.Fragment onjF = null;\n onjF = new BlankFragment();\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.fragment,onjF).commit();\n }", "private void loadFragment(Fragment fragment, boolean addToBackStack) {\n FragmentTransaction transaction = getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.frame, fragment);\n if(addToBackStack) {\n transaction.addToBackStack(null);\n }\n transaction.commit();\n }", "private void loadFragment(Fragment fragment){\n FragmentTransaction trans = getSupportFragmentManager().beginTransaction();\n trans.replace(R.id.frame_event, fragment);\n trans.commit();\n\n appbar.setExpanded(true);\n }", "public void onfff() {\r\n\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n if(!(frag.isHidden()))\r\n {\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .hide(frag)\r\n .commit();\r\n }\r\n }", "public void goAddFriends (View view){\n Fragment newFragment = new AddFriendsFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n\n }", "public void goMainStampCard() {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager\n .beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_fade_in,\n R.anim.abc_fade_out);\n fragmentTransaction.addToBackStack(null);\n FragmentMainStampCard fragmentMain = FragmentMainStampCard\n .newInstances();\n fragmentTransaction.replace(R.id.container, fragmentMain);\n fragmentTransaction.commit();\n }", "private void openTeacherCheck() {\n FragmentTransaction fr1 = getFragmentManager().beginTransaction().addToBackStack(\"Tag\");\n fr1.replace(R.id.fragment_container, new Fragment_View_In_Out());\n fr1.commit();\n }", "@Override\n\tpublic void onDetach() {\n\t\tsuper.onDetach();\n\t\tLog.d(\"Fragment02\",\"onDetach\");\n\t}", "void switchToFragment(Fragment newFrag) {\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment, newFrag)\n .addToBackStack(null)\n .commit();\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tFragment fragment = null;\n\n\t\tint id = v.getId();\n\t\tif (id == R.id.btn_edit) {\n\t\t\tfragment = new EditDetailsFragment();\n\t\t}\n\t\n\tif (fragment != null) {\n\t\tFragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n\t\tfragmentManager.beginTransaction()\n\t\t\t\t.replace(R.id.container_body, fragment).addToBackStack( null ).commit();\n}\n\telse {\n\t\t// error in creating fragment\n\t\tLog.e(\"MainActivity\", \"Error in creating fragment\");\n\t}\n\t/*fragment.getView().setFocusableInTouchMode(true);\n\tfragment.getView().requestFocus();\n\tfragment.getView().setOnKeyListener( new OnKeyListener()\n\t{\n\t @Override\n\t public boolean onKey( View v, int keyCode, KeyEvent event )\n\t {\n\t if( keyCode == KeyEvent.KEYCODE_BACK )\n\t {\n\t return true;\n\t }\n\t return false;\n\t }\n\t} );*/\n}", "public void homeFragment() {\n\n Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.main_container);\n\n if (!(fragment instanceof HomeFragment)) {\n\n HomeFragment homeFragment = new HomeFragment(MainActivity.this);\n getSupportFragmentManager().beginTransaction()\n .add(R.id.main_container, homeFragment)\n .commit();\n }\n }", "public void cargarFragment (Fragment fragment, String tag){\r\n FragmentManager manager = getSupportFragmentManager();\r\n // Consigo el fragment que esta actualmente en el contenedor, puede ser null\r\n Fragment fragmentContenedor = manager.findFragmentById(R.id.contenedorFragmentsAparatos);\r\n //Si esta vacio o es diferente al que esta en el contenedor\r\n if(fragmentContenedor == null || fragmentContenedor.getTag() != tag ){\r\n FragmentTransaction transaction = manager.beginTransaction();\r\n transaction.replace(R.id.contenedorFragmentsAparatos, fragment);\r\n //TODO -- chequear que no falta data en el if\r\n if(fragmentContenedor != null ){\r\n transaction.addToBackStack(null);\r\n }\r\n transaction.commit();\r\n }\r\n\r\n\r\n }", "@Override\n public void onClick(View v){\n SignUpFragment fragment = new SignUpFragment();\n FragmentManager manager = getFragmentManager();\n manager.beginTransaction().replace(R.id.fragmentHolder,fragment,\"Sign Up\").commit();\n }", "private void setFragment(Fragment fragment){\n FragmentTransaction fragmentTransaction = getActivity().getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.slide_from_right,R.anim.slideout_from_left);\n fragmentTransaction.replace(parentFrameLayout.getId(),fragment);\n fragmentTransaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_k_y_c_, container, false);\n Button button = view.findViewById(R.id.btn);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Fragment fragment= new FloatButton_Fragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.mainlayout, fragment); // fragmen container id in first parameter is the container(Main layout id) of Activity\n transaction.addToBackStack(null); // this will manage backstack\n transaction.commit(); }\n });\n\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_three,container,false);\n\n\n\n\n return rootView;\n }", "private void showHomeOnClick(){\n //create a new fragment and transaction\n homeFragment = new HomeFragment();\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n //replace whatever is in the fragment container view with this fragment\n //and add the transaction to the back stack\n ft.add(R.id.fragment_container,homeFragment);\n ft.addToBackStack(null);\n ft.commit();\n }", "@Override\n public void onDetach() {\n super.onDetach();\n Log.i(sFragmentName, \"onDetach()\");\n }", "private void resetFragment() {\n\t\tFragment fragment = hMapTabs.get(mSelectedTab).get(0);\n\t\thMapTabs.get(mSelectedTab).clear();\n\t\thMapTabs.get(mSelectedTab).add(fragment);\n\t\tFragmentManager manager = getSupportFragmentManager();\n\t\tFragmentTransaction ft = manager.beginTransaction();\n\t\tft.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n\t\tft.replace(R.id.realtabcontent, fragment);\n\t\tft.commit();\n\n\t\tshouldDisplayHomeUp();\n\n\t}", "@Override\n public void onClick(View v) {\n FragmentTransaction FT = getSupportFragmentManager().beginTransaction();\n //FT.add(R.id.Frame_Fragments,new Another Fragment());\n if (simplefragment2.isAdded()){\n FT.show(simplefragment2);\n FT.remove(simplefragment);\n Toast.makeText(getApplicationContext(), \"Fragment di tambahkan sebelumnya\", Toast.LENGTH_SHORT).show();\n }\n else {\n FT.replace(R.id.Frame_Fragments,simplefragment2);\n }\n FT.addToBackStack(null);\n FT.commit();\n\n button2.setVisibility(View.VISIBLE);\n button.setVisibility(View.GONE);\n }", "public void showFragment(Fragment fragment, String tagFragment) {\n // In tablet layout, do not try to display the Home Fragment again. Show empty fragment.\n if (isDualPanel() && tagFragment.equalsIgnoreCase(BudgetListFragment.class.getName())) {\n fragment = new Fragment();\n tagFragment = \"Empty\";\n }\n\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n transaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_right,\n R.anim.slide_out_left);\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack.\n if (isDualPanel()) {\n transaction.replace(R.id.fragmentDetail, fragment, tagFragment);\n } else {\n // Single panel UI.\n transaction.replace(R.id.fragmentMain, fragment, tagFragment);\n\n // todo: enable going back only if showing the list.\n// boolean showingList = tagFragment.equals(BudgetListFragment.class.getName());\n// setDisplayHomeAsUpEnabled(showingList);\n\n transaction.addToBackStack(null);\n }\n\n // Commit the transaction\n transaction.commit();\n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH2 demoFragment = new ShowFragmentXXH2();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "private void initFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.add(R.id.contentFrame, fragment);\n transaction.commit();\n }", "@Override\n public void onClick(View v) {\n Fragment newFragment = new NewMovimientoFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack\n transaction.replace(R.id.frame_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "private void switchFragment(int pos) {\n Fragment fragment=bottomBarList.get(pos);\n String backStateName = fragment.getClass().getName();\n String fragmentTag = backStateName;\n\n FragmentManager manager = getSupportFragmentManager();\n boolean fragmentPopped = manager.popBackStackImmediate (backStateName, 0);\n\n if (!fragmentPopped && manager.findFragmentByTag(fragmentTag) == null){ //fragment not in back stack, create it.\n FragmentTransaction ft = manager.beginTransaction();\n ft.replace(R.id.bottomNavFrameLayout, fragment, fragmentTag);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n ft.addToBackStack(backStateName);\n ft.commit();\n }\n\n\n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH1 demoFragment = new ShowFragmentXXH1();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "private void removeLessonFragment() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\tFragment fragment = (Fragment) fm\n\t\t\t\t.findFragmentById(R.id.detailFragmentContainer);\n\t\tif (fragment != null) {\n\t\t\tFragmentTransaction ft = fm.beginTransaction();\n\t\t\tft.remove(fragment);\n\t\t\tft.commit();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n CompteEtudiant nextFrag = new CompteEtudiant();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void onComplete(@NonNull Task<Void> task)\n {\n FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, new Fragment_VacatureOmschrijving()).addToBackStack(\"tag\").commit();\n Toast.makeText(getActivity(), \"Uw sollicitatie is succesvol verzonden\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n FragmentTransaction FT = getSupportFragmentManager().beginTransaction();\n FT.replace(R.id.Frame_Fragments, new simplefragment());\n FT.commit();\n\n button2.setVisibility(View.GONE);\n button.setVisibility(View.VISIBLE);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate( R.layout.fragment_perfil_fragmento, container, false );\n cambiarDato = rootView.findViewById(R.id.cambiarDatos);\n cambiarDato.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n RelativeLayout f1 = (RelativeLayout) getActivity().findViewById(R.id.fragPer);\n f1.removeAllViews();\n FragmentTransaction transaction = getChildFragmentManager().beginTransaction();\n transaction.replace(R.id.fragPer, new AjustesFragmento());\n transaction.addToBackStack(null);\n TextView textTitle = getActivity().findViewById(R.id.textTitle);\n textTitle.setText(\"Ajustes\");\n transaction.commit();\n }\n });\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View retView = inflater.inflate(R.layout.fragment_food_list, container, false);\n\n\n //FragmentManager fragmentManager = this.getFragmentManager();\n //FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n //FoodFragment foodFragment = (FoodFragment)fragmentManager.findFragmentById(R.id.foodFragment);\n // fragmentTransaction.hide(foodFragment);\n //fragmentTransaction.commit();\n\n ImageButton newFood = (ImageButton) retView.findViewById(R.id.fragmentFoodListAddFoodButton);\n newFood.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n addFood(view);\n }\n });\n\n buildList(retView);\n return retView;\n }", "@Override\r\n public void changeFragment() {\r\n fm.beginTransaction()\r\n .replace(R.id.fragmentContainer, new ListWonderFragment())\r\n .commit();\r\n }", "public void restartFragment(String fragmentTag) {\r\n\r\n fragmentManager = getSupportFragmentManager();\r\n\r\n Fragment fragment = fragmentManager\r\n .findFragmentByTag(fragmentTag);\r\n\r\n FragmentTransaction fragmentTransaction = fragmentManager\r\n .beginTransaction();\r\n fragmentTransaction.detach(fragment);\r\n fragmentTransaction.attach(fragment);\r\n\r\n try {\r\n\r\n fragmentTransaction.commit();\r\n\r\n } catch (IllegalStateException e) {\r\n\r\n try {\r\n fragmentTransaction.commitAllowingStateLoss();\r\n } catch (IllegalStateException ex) {\r\n Log.d(TAG,\r\n \"Fatal Exception: java.lang.IllegalStateException commit already called\"\r\n + ex.getMessage()\r\n );\r\n }\r\n Log.d(TAG, \"Failed to commit fragment.\");\r\n }\r\n }", "private void initFragment(Fragment newsFragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.fl_news, newsFragment);\n transaction.commit();\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n int layout_id = R.layout.fragment_layout_support;\n View v = inflater.inflate(layout_id, container, false);\n\n // PostListFragment titles = (PostListFragment)\n // getFragmentManager().findFragmentById(R.id.titles);\n // if (titles == null) {\n // Make new fragment to show this selection.\n PostListFragment titles = new PostListFragment();\n titles.setArguments(getArguments());\n\n // Execute a transaction, replacing any existing fragment\n // with this one inside the frame.\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n ft.replace(R.id.titles, titles);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n ft.commit();\n \n return v;\n }", "private void loadBookPageFragment() {\n\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.addToBackStack(\"ListView\"); // enables to press \"return\" and go back to the list view\n transaction.replace(R.id.main_fragment_container, new BookPageFragment());\n transaction.commit();\n }", "private void changeFragment() {\n TeacherAddNotificationFragment fragment = new TeacherAddNotificationFragment();\n // Put classIds to bundle and set bundle to fragment\n Bundle bundle = new Bundle();\n bundle.putString(\"ListIDs\", classesIds);\n fragment.setArguments(bundle);\n\n // Replace fragment\n getFragmentManager().beginTransaction().replace(R.id.main, fragment)\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void onClick(View v) {\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n Fragment fragment = new FavoriteFragment();\n ft.replace(R.id.layout_fragment, fragment, \"FavoriteFragment\");\n ft.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(\n R.layout.fragment_first, container, false);\n\n txt = v.findViewById(R.id.txt);\n txt.setText(\"First Fragment\");\n return v;\n }", "private void addBaseFragment(Fragment fragment) {\n\n if (mFragmentManager == null)\n mFragmentManager = getSupportFragmentManager();\n\n FragmentTransaction mFragmentTransaction = mFragmentManager.beginTransaction();\n mFragmentTransaction.replace(R.id.content_frame, fragment, fragment.getClass().getSimpleName().toString()).commit();\n\n }", "@Override\n public void onClick(View v){\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.frame_layout,new final_confirmation());\n transaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_permit_valid, container, false);\n\n // Button Exit\n Button btnExitVerifiedPermits = (Button) v.findViewById(R.id.btnExitVerifiedPermits);\n btnExitVerifiedPermits.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Toast.makeText(getActivity(), \"Exit clicked\", Toast.LENGTH_SHORT).show();\n sendJSON();\n\n// // Works...but crashes\n// // https://www.youtube.com/watch?v=eUG3VWnXFtg\n// // https://www.programcreek.com/java-api-examples/?class=android.support.v4.app.FragmentManager&method=popBackStack\n// FragmentManager manager = getActivity().getSupportFragmentManager();\n// manager.popBackStack(null, POP_BACK_STACK_INCLUSIVE);\n\n\n// FragmentManager manager = getActivity().getSupportFragmentManager();\n// manager.popBackStack(\"fragment map B\", POP_BACK_STACK_INCLUSIVE);\n\n FragmentManager manager = getActivity().getSupportFragmentManager();\n manager.popBackStack();\n\n\n\n// final PermitValidFragment fragment = new PermitValidFragment();\n// FragmentManager manager = getActivity().getSupportFragmentManager();\n// android.support.v4.app.FragmentTransaction trans = manager.beginTransaction();\n// trans.remove(fragment);\n// trans.commit();\n// manager.popBackStack();\n\n// FragmentManager fm = getActivity().getSupportFragmentManager();\n// fm.popBackStack(FragmentManager.POP_BACK_STACK_INCLUSIVE);\n// fm.popBackStack(\"PermitValidFragment\", FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n\n// MapAFragment fragment = new MapAFragment();\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map A\");\n// ft.commit();\n\n// String userid = \"1429392\";\n// String uuidTwelve = \"defaultTwelve\";\n//\n// MapBFragment fragment = null;\n// fragment = new MapBFragment().newInstance(userid, uuidTwelve);\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map B\");\n// ft.commit();\n\n// if (getFragmentManager().getBackStackEntryCount() == 0) {\n// getActivity().finish();\n// } else {\n// getFragmentManager().popBackStack();\n// }\n\n// getActivity().getFragmentManager().beginTransaction().remove(fragment).commit();\n\n// getActivity().getSupportFragmentManager().popBackStackImmediate();\\\n\n\n// FragmentActivity myContext = null;\n//\n// final FragmentManager fragManager = myContext.getSupportFragmentManager();\n// while (fragManager.getBackStackEntryCount() != 0) {\n// fragManager.popBackStackImmediate();\n// }\n\n// MapAFragment fragment = new MapAFragment();\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map A\");\n// ft.commit();\n\n// MapAFragment fragment = new MapAFragment();\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map A\");\n// ft.commit();\n\n// // This portion works\n// String userid = \"1429392\";\n// String uuidTwelve = \"defaultTwelve\";\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, new MapBFragment().newInstance(userid, uuidTwelve), \"waiting fragment\");\n// ft.commit();\n\n\n }\n });\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.root_fragment, container, false);\n//replace root_frame with newGameView\n FragmentTransaction transaction = getFragmentManager()\n .beginTransaction();\n transaction.replace(R.id.root_frame, new NewGameView());\n transaction.commit();\n\n return view;\n }", "@Override\n public void onClick(View v) {\n Fragment fragmento = null;\n\n switch (v.getId()){\n case R.id.fragment1_button:\n fragmento = new Fragment1();\n break;\n case R.id.fragment2_button:\n fragmento = new Fragment2();\n break;\n }\n\n if(fragmento != null){\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n ft.replace(R.id.place_holder, fragmento);\n ft.commit();\n }\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().setMaxLifecycle(fragment, Lifecycle.State.RESUMED);\n\n view = inflater.inflate(R.layout.fragment_dynamic, container, false);\n Log.d(TAG, \"onCreateView: \");\n return view;\n }" ]
[ "0.75881577", "0.755415", "0.7261173", "0.7243079", "0.7182614", "0.70909786", "0.7081198", "0.7030125", "0.7001046", "0.69880956", "0.69816554", "0.6920909", "0.68905956", "0.6883965", "0.6879337", "0.6868281", "0.6846343", "0.68381417", "0.6828096", "0.68175143", "0.6815872", "0.6793665", "0.678222", "0.6764563", "0.6747969", "0.6733417", "0.6715295", "0.67030853", "0.67011046", "0.668136", "0.66793615", "0.66793287", "0.66620475", "0.6660305", "0.66512036", "0.6647309", "0.66407967", "0.6627019", "0.6620476", "0.6616475", "0.65986514", "0.65958494", "0.65845555", "0.656945", "0.65624624", "0.65571094", "0.6551347", "0.6551339", "0.654547", "0.65348494", "0.65344024", "0.6534022", "0.6531024", "0.65217376", "0.6517708", "0.65165055", "0.6512824", "0.6509356", "0.65017885", "0.64955103", "0.6476233", "0.6461364", "0.64484465", "0.64451814", "0.64433944", "0.64392924", "0.6436221", "0.6435021", "0.6431076", "0.64285296", "0.6413948", "0.6413715", "0.64054066", "0.64037913", "0.6396298", "0.63898844", "0.6389487", "0.63867956", "0.63761395", "0.63755214", "0.6372149", "0.63710225", "0.6363145", "0.6361044", "0.63556814", "0.6339037", "0.6337579", "0.6326023", "0.6324711", "0.63127905", "0.6292055", "0.6290506", "0.6268407", "0.62637705", "0.6256129", "0.62478113", "0.6242848", "0.6233156", "0.6232022", "0.6230052", "0.6229984" ]
0.0
-1
/ GETTERS Y SETTERS
@Override public double getMaxX() { return this.getPosition().getX(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Set method_1559();", "public void setdat()\n {\n }", "private void assignment() {\n\n\t\t\t}", "void setParameters() {\n\t\t\n\t}", "String setValue();", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void getExras() {\n }", "private void setUserData(){\n }", "private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n setDate();\n setISBN();\n setDescription();\n setPageCount();\n setNumRatings();\n }", "private void setData() {\n\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void setRes(){\r\n \r\n }", "@Override\n public void get() {}", "public void get() {\n }", "public void setAge(int age) { this.age = age; }", "public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "private void setOtherParam(Settings set) {\n URL_SQL_RU = set.getValue(\"app.urlSqlRu\");\n NAME_DATA_BASE = set.getValue(\"app.nameDataBase\");\n DAT_NAME = set.getValue(\"app.datName\");\n VACANCY = set.getValue(\"app.vacancy\");\n TABLE_NAME = set.getValue(\"app.tableName\");\n ZERO = Integer.parseInt(set.getValue(\"app.zero\"));\n SKIP_ROW = Integer.parseInt(set.getValue(\"app.skipRow\"));\n CLASS = set.getValue(\"app.class\");\n POSTS_LIST_TOPIC = set.getValue(\"app.postsListTopic\");\n LAST_YEAR = set.getValue(\"app.lastYear\");\n }", "@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}", "@Test\n\tpublic void testSet() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void Ordenamiento() {\n\n\t}", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public void setupProperties() {\n // left empty for subclass to override\n }", "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}", "private void initValues() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void setNombre(String nombre) {this.nombre = nombre;}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@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 }", "public void setItems(){\n }", "@Override\npublic void setAttributes() {\n\t\n}", "public void asetaTeksti(){\n }", "public void setEnqueteur(Enqueteur enqueteur)\r\n/* */ {\r\n/* 65 */ this.enqueteur = enqueteur;\r\n/* */ }", "@Test\n public void testGetSets() {\n ref.setKey(\"test23\");\n assertEquals(\"test23\", ref.getKey());\n ref.setAuthor(\"test23\");\n assertEquals(\"test23\", ref.getAuthor());\n ref.setEditor(\"test23\");\n assertEquals(\"test23\", ref.getEditor());\n ref.setTitle(\"test23\");\n assertEquals(\"test23\", ref.getTitle());\n ref.setBooktitle(\"test23\");\n assertEquals(\"test23\", ref.getBooktitle());\n ref.setYear(\"1839\");\n assertEquals(\"1839\", ref.getYear());\n ref.setPublisher(\"Otava\");\n assertEquals(\"Otava\", ref.getPublisher());\n ref.setJournal(\"test23\");\n assertEquals(\"test23\", ref.getJournal());\n ref.setVolume(\"3\");\n assertEquals(\"3\", ref.getVolume());\n ref.setNumber(\"123\");\n assertEquals(\"123\", ref.getNumber());\n ref.setSeries(\"test23\");\n assertEquals(\"test23\", ref.getSeries());\n ref.setEdition(\"3rd\");\n assertEquals(\"3rd\", ref.getEdition());\n ref.setPages(\"12-35\");\n assertEquals(\"12-35\", ref.getPages());\n ref.setMonth(\"May\");\n assertEquals(\"May\", ref.getMonth());\n ref.setNote(\"test23\");\n assertEquals(\"test23\", ref.getNote());\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void setName(String name){this.name=name;}", "SetCommand getSetl();", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "protected void setupParameters() {\n \n \n\n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "private void setValues() {\n textViewPrice = findViewById(R.id.textViewPrice);\n textViewStoreName = findViewById(R.id.textViewStoreName);\n textViewLocation = findViewById(R.id.textViewLocation);\n buttonAcceptOrder = findViewById(R.id.buttonAcceptOrder);\n\n order = Parcels.unwrap(getIntent().getParcelableExtra(Order.class.getSimpleName()));\n\n textViewPrice.setText(\"$\" + decimalFormat.format(order.getPrice()));\n textViewStoreName.setText(\"Store: \"+ order.getStore().getName());\n textViewLocation.setText(\"Address: \" + order.getStore().getAddress());\n }", "protected void initVars() {}", "public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "@Override\n\tprotected void setParameterValues() {\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}", "@Override\n\tpublic void setData() {\n\n\t}", "public int getSet() {\n return set;\n }", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public abstract void userValues();", "@Override\n public void memoria() {\n \n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private void Initialized_Data() {\n\t\t\r\n\t}", "@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void setTest() {\n\t}", "public void setX(int x) { this.x=x; }", "@Override\n\tpublic void initializeValues() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void setName(String name){this.name = name;}", "@Override\n protected void updateProperties() {\n }", "public void setGender(Gender_Tp gender) { this.gender = gender; }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "protected void storeCurrentValues() {\n }", "@Override\n public void onSetSuccess() {\n }", "@Override\n public void onSetSuccess() {\n }", "public void setNewValues(){\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n time = simTime.getText();\n simulation.setTime(time);\n simulation.setD(doorT);\n simulation.setP(phoneT);\n simulation.setQ(questionT);\n }", "void set(Model model);", "@Override\n public void saveValues() {\n \n }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "@Override\n void init() {\n }", "void setAge(int age);", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}" ]
[ "0.6853763", "0.6566471", "0.61641645", "0.60970545", "0.6088786", "0.608431", "0.6077973", "0.5996197", "0.5992376", "0.5941046", "0.5916055", "0.5899122", "0.5840344", "0.58308196", "0.5801569", "0.57986885", "0.57860744", "0.57772064", "0.5764398", "0.57620966", "0.57583", "0.57479346", "0.57443285", "0.5733935", "0.5705789", "0.5695025", "0.5693557", "0.5672997", "0.56664145", "0.56649786", "0.5664641", "0.5664176", "0.56618935", "0.5660054", "0.56599057", "0.5646871", "0.5644273", "0.563999", "0.563372", "0.5627459", "0.56265265", "0.56128114", "0.56095225", "0.55972236", "0.559057", "0.5584992", "0.5583236", "0.5581129", "0.5579515", "0.5575522", "0.55666643", "0.5566381", "0.5553566", "0.55533385", "0.5550886", "0.5549634", "0.5535923", "0.5535923", "0.5535923", "0.5535923", "0.5535923", "0.5535923", "0.5529648", "0.5526577", "0.55211425", "0.5520746", "0.550004", "0.54943836", "0.5492493", "0.54920757", "0.5490425", "0.548589", "0.5485709", "0.5482786", "0.5481077", "0.54774404", "0.54774404", "0.5471734", "0.5470617", "0.5459692", "0.5458267", "0.54495305", "0.54425335", "0.54419726", "0.5441508", "0.5438701", "0.543858", "0.5437782", "0.5431503", "0.5431503", "0.5430061", "0.5430026", "0.54289407", "0.542884", "0.54263824", "0.5424707", "0.54206485", "0.54167336", "0.54167336", "0.54167336", "0.5408664" ]
0.0
-1